/home/arjun/llvm-project/build/tools/mlir/include/mlir/Interfaces/CallInterfaces.h.inc
Line | Count | Source (jump to first uncovered line) |
1 | | /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |
2 | | |* *| |
3 | | |* Operation Interface Declarations *| |
4 | | |* *| |
5 | | |* Automatically generated file, do not edit! *| |
6 | | |* *| |
7 | | \*===----------------------------------------------------------------------===*/ |
8 | | |
9 | | namespace detail { |
10 | | struct CallOpInterfaceInterfaceTraits { |
11 | | class Concept { |
12 | | public: |
13 | 0 | virtual ~Concept() = default; |
14 | | virtual CallInterfaceCallable getCallableForCallee(Operation *tablegen_opaque_op) = 0; |
15 | | virtual Operation::operand_range getArgOperands(Operation *tablegen_opaque_op) = 0; |
16 | | virtual Operation * resolveCallable(Operation *tablegen_opaque_op) = 0; |
17 | | }; |
18 | | template<typename ConcreteOp> |
19 | | class Model : public Concept { |
20 | | public: |
21 | 0 | CallInterfaceCallable getCallableForCallee(Operation *tablegen_opaque_op) final { |
22 | 0 | auto op = llvm::cast<ConcreteOp>(tablegen_opaque_op); |
23 | 0 | (void)op; |
24 | 0 | return op.getCallableForCallee(); |
25 | 0 | } Unexecuted instantiation: _ZN4mlir6detail30CallOpInterfaceInterfaceTraits5ModelINS_14CallIndirectOpEE20getCallableForCalleeEPNS_9OperationE Unexecuted instantiation: _ZN4mlir6detail30CallOpInterfaceInterfaceTraits5ModelINS_6CallOpEE20getCallableForCalleeEPNS_9OperationE |
26 | 0 | Operation::operand_range getArgOperands(Operation *tablegen_opaque_op) final { |
27 | 0 | auto op = llvm::cast<ConcreteOp>(tablegen_opaque_op); |
28 | 0 | (void)op; |
29 | 0 | return op.getArgOperands(); |
30 | 0 | } Unexecuted instantiation: _ZN4mlir6detail30CallOpInterfaceInterfaceTraits5ModelINS_14CallIndirectOpEE14getArgOperandsEPNS_9OperationE Unexecuted instantiation: _ZN4mlir6detail30CallOpInterfaceInterfaceTraits5ModelINS_6CallOpEE14getArgOperandsEPNS_9OperationE |
31 | 0 | Operation * resolveCallable(Operation *tablegen_opaque_op) final { |
32 | 0 | auto op = llvm::cast<ConcreteOp>(tablegen_opaque_op); |
33 | 0 | (void)op; |
34 | 0 |
|
35 | 0 | // If the callable isn't a value, lookup the symbol reference. |
36 | 0 | CallInterfaceCallable callable = op.getCallableForCallee(); |
37 | 0 | if (auto symbolRef = callable.dyn_cast<SymbolRefAttr>()) |
38 | 0 | return SymbolTable::lookupNearestSymbolFrom(op, symbolRef); |
39 | 0 | return callable.get<Value>().getDefiningOp(); |
40 | 0 | |
41 | 0 | } Unexecuted instantiation: _ZN4mlir6detail30CallOpInterfaceInterfaceTraits5ModelINS_14CallIndirectOpEE15resolveCallableEPNS_9OperationE Unexecuted instantiation: _ZN4mlir6detail30CallOpInterfaceInterfaceTraits5ModelINS_6CallOpEE15resolveCallableEPNS_9OperationE |
42 | | }; |
43 | | }; |
44 | | } // end namespace detail |
45 | | class CallOpInterface : public OpInterface<CallOpInterface, detail::CallOpInterfaceInterfaceTraits> { |
46 | | public: |
47 | | using OpInterface<CallOpInterface, detail::CallOpInterfaceInterfaceTraits>::OpInterface; |
48 | | template <typename ConcreteOp> |
49 | | struct CallOpInterfaceTrait : public OpInterface<CallOpInterface, detail::CallOpInterfaceInterfaceTraits>::Trait<ConcreteOp> { |
50 | | }; |
51 | | template <typename ConcreteOp> |
52 | | struct Trait : public CallOpInterfaceTrait<ConcreteOp> {}; |
53 | | CallInterfaceCallable getCallableForCallee(); |
54 | | Operation::operand_range getArgOperands(); |
55 | | Operation * resolveCallable(); |
56 | | }; |
57 | | namespace detail { |
58 | | struct CallableOpInterfaceInterfaceTraits { |
59 | | class Concept { |
60 | | public: |
61 | 0 | virtual ~Concept() = default; |
62 | | virtual Region * getCallableRegion(Operation *tablegen_opaque_op) = 0; |
63 | | virtual ArrayRef<Type> getCallableResults(Operation *tablegen_opaque_op) = 0; |
64 | | }; |
65 | | template<typename ConcreteOp> |
66 | | class Model : public Concept { |
67 | | public: |
68 | 0 | Region * getCallableRegion(Operation *tablegen_opaque_op) final { |
69 | 0 | auto op = llvm::cast<ConcreteOp>(tablegen_opaque_op); |
70 | 0 | (void)op; |
71 | 0 | return op.getCallableRegion(); |
72 | 0 | } |
73 | 0 | ArrayRef<Type> getCallableResults(Operation *tablegen_opaque_op) final { |
74 | 0 | auto op = llvm::cast<ConcreteOp>(tablegen_opaque_op); |
75 | 0 | (void)op; |
76 | 0 | return op.getCallableResults(); |
77 | 0 | } |
78 | | }; |
79 | | }; |
80 | | } // end namespace detail |
81 | | class CallableOpInterface : public OpInterface<CallableOpInterface, detail::CallableOpInterfaceInterfaceTraits> { |
82 | | public: |
83 | | using OpInterface<CallableOpInterface, detail::CallableOpInterfaceInterfaceTraits>::OpInterface; |
84 | | template <typename ConcreteOp> |
85 | | struct CallableOpInterfaceTrait : public OpInterface<CallableOpInterface, detail::CallableOpInterfaceInterfaceTraits>::Trait<ConcreteOp> { |
86 | | }; |
87 | | template <typename ConcreteOp> |
88 | | struct Trait : public CallableOpInterfaceTrait<ConcreteOp> {}; |
89 | | Region * getCallableRegion(); |
90 | | ArrayRef<Type> getCallableResults(); |
91 | | }; |