blob: 0317d64ae0f4d6939a2f5698575799d957b1f28d [file] [log] [blame]
//===- ----------------------*- tablegen -*-===//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// This file contains a set of interfaces for derived attribute op interface.
include "mlir/IR/"
def DerivedAttributeOpInterface : OpInterface<"DerivedAttributeOpInterface"> {
let description = [{
Interface to query derived attribute characteristics.
Derived attributes are not stored in the operation but are instead derived
from information of the operation. ODS generates convenience accessors for
derived attributes and can be used to simplify translations.
let cppNamespace = "::mlir";
let methods = [
/*desc=*/"Returns whether name corresponds to a derived attribute.",
/*args=*/(ins "::mlir::StringRef":$name)
Materializes the derived attributes. Returns null attribute where
unable to materialize a derived attribute as attribute.