14 #ifndef MLIR_INTERFACES_CALLINTERFACES_H
15 #define MLIR_INTERFACES_CALLINTERFACES_H
19 #include "llvm/ADT/PointerUnion.h"
28 class CallOpInterface;
30 namespace call_interface_impl {
67 bool mustParseEmptyResult =
true);
81 ArrayAttr argAttrs,
bool isVariadic,
82 TypeRange resultTypes, ArrayAttr resultAttrs,
84 bool printEmptyResult =
true);
93 StringAttr argAttrsName, StringAttr resAttrsName);
97 StringAttr argAttrsName, StringAttr resAttrsName);
106 template <
typename To>
108 :
public CastInfo<To, mlir::CallInterfaceCallable::PointerUnion> {};
110 template <
typename To>
112 :
public CastInfo<To, const mlir::CallInterfaceCallable::PointerUnion> {};
117 #include "mlir/Interfaces/CallInterfaces.h.inc"
This class is a general helper class for creating context-global objects like types,...
The OpAsmParser has methods for interacting with the asm parser: parsing things from it,...
This is a pure-virtual base class that exposes the asmprinter hooks necessary to implement a custom p...
Operation is the basic unit of execution within MLIR.
This class contains a list of basic blocks and a link to the parent operation it is attached to.
This class represents a collection of SymbolTables.
This class provides an abstraction over the various different ranges of value types.
The OpAsmOpInterface, see OpAsmInterface.td for more details.
void printFunctionSignature(OpAsmPrinter &p, TypeRange argTypes, ArrayAttr argAttrs, bool isVariadic, TypeRange resultTypes, ArrayAttr resultAttrs, Region *body=nullptr, bool printEmptyResult=true)
Print a function signature for a call or callable operation.
Operation * resolveCallable(CallOpInterface call, SymbolTableCollection *symbolTable=nullptr)
Resolve the callable operation for given callee to a CallableOpInterface, or nullptr if a valid calla...
ParseResult parseFunctionResultList(OpAsmParser &parser, SmallVectorImpl< Type > &resultTypes, SmallVectorImpl< DictionaryAttr > &resultAttrs)
Parse a function or call result list.
ParseResult parseFunctionSignature(OpAsmParser &parser, SmallVectorImpl< Type > &argTypes, SmallVectorImpl< DictionaryAttr > &argAttrs, SmallVectorImpl< Type > &resultTypes, SmallVectorImpl< DictionaryAttr > &resultAttrs, bool mustParseEmptyResult=true)
Parses a function signature using parser.
void addArgAndResultAttrs(Builder &builder, OperationState &result, ArrayRef< DictionaryAttr > argAttrs, ArrayRef< DictionaryAttr > resultAttrs, StringAttr argAttrsName, StringAttr resAttrsName)
Adds argument and result attributes, provided as argAttrs and resultAttrs arguments,...
Include the generated interface declarations.
A callable is either a symbol, or an SSA value, that is referenced by a call-like operation.
This represents an operation in an abstracted form, suitable for use with the builder APIs.