MLIR: include/mlir/Interfaces/CallInterfaces.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14 #ifndef MLIR_INTERFACES_CALLINTERFACES_H

15 #define MLIR_INTERFACES_CALLINTERFACES_H

16

19 #include "llvm/ADT/PointerUnion.h"

20

21 namespace mlir {

22

23

26 };

27

28 class CallOpInterface;

29

30 namespace call_interface_impl {

31

32

33

34

35

38

39

40

41

42

43

44

45

46

47

48 ParseResult

51

52

53

54

55

56

57

58

59

60

61

67 bool mustParseEmptyResult = true);

68

69

70

71

72

73

74

75

76

77

78

79

81 ArrayAttr argAttrs, bool isVariadic,

82 TypeRange resultTypes, ArrayAttr resultAttrs,

83 Region *body = nullptr,

84 bool printEmptyResult = true);

85

86

87

88

89

93 StringAttr argAttrsName, StringAttr resAttrsName);

97 StringAttr argAttrsName, StringAttr resAttrsName);

98

99 }

100

101 }

102

103 namespace llvm {

104

105

106 template

108 : public CastInfo<To, mlir::CallInterfaceCallable::PointerUnion> {};

109

110 template

112 : public CastInfo<To, const mlir::CallInterfaceCallable::PointerUnion> {};

113

114 }

115

116

117 #include "mlir/Interfaces/CallInterfaces.h.inc"

118

119 #endif

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.