Changeset View
Changeset View
Standalone View
Standalone View
mlir/include/mlir/IR/Function.h
Show All 24 Lines | |||||
// Function Operation. | // Function Operation. | ||||
//===--------------------------------------------------------------------===// | //===--------------------------------------------------------------------===// | ||||
/// FuncOp represents a function, or an operation containing one region that | /// FuncOp represents a function, or an operation containing one region that | ||||
/// forms a CFG(Control Flow Graph). The region of a function is not allowed to | /// forms a CFG(Control Flow Graph). The region of a function is not allowed to | ||||
/// implicitly capture global values, and all external references must use | /// implicitly capture global values, and all external references must use | ||||
/// Function arguments or attributes that establish a symbolic connection(e.g. | /// Function arguments or attributes that establish a symbolic connection(e.g. | ||||
/// symbols referenced by name via a string attribute). | /// symbols referenced by name via a string attribute). | ||||
class FuncOp | class FuncOp : public Op<FuncOp, OpTrait::ZeroOperands, OpTrait::ZeroResult, | ||||
: public Op<FuncOp, OpTrait::ZeroOperands, OpTrait::ZeroResult, | OpTrait::IsIsolatedFromAbove, OpTrait::FunctionLike, | ||||
OpTrait::IsIsolatedFromAbove, OpTrait::Symbol, | OpTrait::AutomaticAllocationScope, | ||||
OpTrait::FunctionLike, OpTrait::AutomaticAllocationScope, | CallableOpInterface::Trait, SymbolOpInterface::Trait> { | ||||
CallableOpInterface::Trait> { | |||||
public: | public: | ||||
using Op::Op; | using Op::Op; | ||||
using Op::print; | using Op::print; | ||||
static StringRef getOperationName() { return "func"; } | static StringRef getOperationName() { return "func"; } | ||||
static FuncOp create(Location location, StringRef name, FunctionType type, | static FuncOp create(Location location, StringRef name, FunctionType type, | ||||
ArrayRef<NamedAttribute> attrs = {}); | ArrayRef<NamedAttribute> attrs = {}); | ||||
▲ Show 20 Lines • Show All 105 Lines • Show Last 20 Lines |