LLZK 3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
CallLikeOpInterfaces.h.inc
Go to the documentation of this file.
1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* Interface Declarations *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* *|
7\*===----------------------------------------------------------------------===*/
8
9namespace llzk {
10
12
13} // namespace llzk
14namespace llzk {
15
16namespace detail {
18 struct Concept {
20 ::mlir::Value (*getSelfValue)(const Concept *impl, ::mlir::Operation *);
21 ::mlir::FunctionType (*getTypeSignature)(const Concept *impl, ::mlir::Operation *);
22 ::mlir::FailureOr<::llzk::UnificationMap> (*unifyTypeSignatureWithNamespace)(const Concept *impl, ::mlir::Operation *, ::mlir::FunctionType, ::mlir::ArrayRef<::llvm::StringRef>);
23 ::mlir::FailureOr<::llzk::UnificationMap> (*unifyTypeSignature)(const Concept *impl, ::mlir::Operation *, ::mlir::FunctionType);
24 ::llvm::SmallVector<::mlir::ValueRange> (*toVectorOfValueRange)(::mlir::OperandRangeRange);
25 ::mlir::LogicalResult (*verifyTemplateParamValueCompatibility)(const Concept *impl, ::mlir::Operation *, ::mlir::Attribute, ::llzk::polymorphic::TemplateParamOp);
26 ::mlir::LogicalResult (*verifyTemplateParamValuesCompatibility)(const Concept *impl, ::mlir::Operation *, ::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp>>);
27 ::mlir::LogicalResult (*verifyTemplateParamsMatchInferred)(const Concept *impl, ::mlir::Operation *, ::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp>>, const ::llzk::UnificationMap &);
29 const ::mlir::ArgAndResultAttrsOpInterface::Concept *implArgAndResultAttrsOpInterface = nullptr;
30 const ::mlir::CallOpInterface::Concept *implCallOpInterface = nullptr;
31 const ::mlir::SymbolUserOpInterface::Concept *implSymbolUserOpInterface = nullptr;
32
33 void initializeInterfaceConcept(::mlir::detail::InterfaceMap &interfaceMap) {
34 implArgAndResultAttrsOpInterface = interfaceMap.lookup<::mlir::ArgAndResultAttrsOpInterface>();
35 assert(implArgAndResultAttrsOpInterface && "`::llzk::LLZKCallLikeOpInterface` expected its base interface `::mlir::ArgAndResultAttrsOpInterface` to be registered");
36 implCallOpInterface = interfaceMap.lookup<::mlir::CallOpInterface>();
37 assert(implCallOpInterface && "`::llzk::LLZKCallLikeOpInterface` expected its base interface `::mlir::CallOpInterface` to be registered");
38 implSymbolUserOpInterface = interfaceMap.lookup<::mlir::SymbolUserOpInterface>();
39 assert(implSymbolUserOpInterface && "`::llzk::LLZKCallLikeOpInterface` expected its base interface `::mlir::SymbolUserOpInterface` to be registered");
40 }
41 };
42 template<typename ConcreteOp>
43 class Model : public Concept {
44 public:
47
48 static inline ::mlir::Value getSelfValue(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
49 static inline ::mlir::FunctionType getTypeSignature(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
50 static inline ::mlir::FailureOr<::llzk::UnificationMap> unifyTypeSignatureWithNamespace(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::FunctionType other, ::mlir::ArrayRef<::llvm::StringRef> rhsReversePrefix);
51 static inline ::mlir::FailureOr<::llzk::UnificationMap> unifyTypeSignature(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::FunctionType other);
52 static inline ::llvm::SmallVector<::mlir::ValueRange> toVectorOfValueRange(::mlir::OperandRangeRange input);
53 static inline ::mlir::LogicalResult verifyTemplateParamValueCompatibility(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::Attribute paramFromCallOp, ::llzk::polymorphic::TemplateParamOp targetParam);
54 static inline ::mlir::LogicalResult verifyTemplateParamValuesCompatibility(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp>> targetParamDefs);
55 static inline ::mlir::LogicalResult verifyTemplateParamsMatchInferred(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp>> targetParamDefs, const ::llzk::UnificationMap & unifications);
56 };
57 template<typename ConcreteOp>
58 class FallbackModel : public Concept {
59 public:
62
63 static inline ::mlir::Value getSelfValue(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
64 static inline ::mlir::FunctionType getTypeSignature(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
65 static inline ::mlir::FailureOr<::llzk::UnificationMap> unifyTypeSignatureWithNamespace(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::FunctionType other, ::mlir::ArrayRef<::llvm::StringRef> rhsReversePrefix);
66 static inline ::mlir::FailureOr<::llzk::UnificationMap> unifyTypeSignature(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::FunctionType other);
67 static inline ::llvm::SmallVector<::mlir::ValueRange> toVectorOfValueRange(::mlir::OperandRangeRange input);
68 static inline ::mlir::LogicalResult verifyTemplateParamValueCompatibility(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::Attribute paramFromCallOp, ::llzk::polymorphic::TemplateParamOp targetParam);
69 static inline ::mlir::LogicalResult verifyTemplateParamValuesCompatibility(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp>> targetParamDefs);
70 static inline ::mlir::LogicalResult verifyTemplateParamsMatchInferred(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp>> targetParamDefs, const ::llzk::UnificationMap & unifications);
71 };
72 template<typename ConcreteModel, typename ConcreteOp>
73 class ExternalModel : public FallbackModel<ConcreteModel> {
74 public:
75 using ConcreteEntity = ConcreteOp;
76 ::mlir::FunctionType getTypeSignature(::mlir::Operation *tablegen_opaque_val) const;
77 ::mlir::FailureOr<::llzk::UnificationMap> unifyTypeSignatureWithNamespace(::mlir::Operation *tablegen_opaque_val, ::mlir::FunctionType other, ::mlir::ArrayRef<::llvm::StringRef> rhsReversePrefix) const;
78 ::mlir::FailureOr<::llzk::UnificationMap> unifyTypeSignature(::mlir::Operation *tablegen_opaque_val, ::mlir::FunctionType other) const;
79 static ::llvm::SmallVector<::mlir::ValueRange> toVectorOfValueRange(::mlir::OperandRangeRange input);
80 ::mlir::LogicalResult verifyTemplateParamValueCompatibility(::mlir::Operation *tablegen_opaque_val, ::mlir::Attribute paramFromCallOp, ::llzk::polymorphic::TemplateParamOp targetParam) const;
81 ::mlir::LogicalResult verifyTemplateParamValuesCompatibility(::mlir::Operation *tablegen_opaque_val, ::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp>> targetParamDefs) const;
82 ::mlir::LogicalResult verifyTemplateParamsMatchInferred(::mlir::Operation *tablegen_opaque_val, ::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp>> targetParamDefs, const ::llzk::UnificationMap &unifications) const;
83 };
84};
85template <typename ConcreteOp>
87
88} // namespace detail
89class LLZKCallLikeOpInterface : public ::mlir::OpInterface<LLZKCallLikeOpInterface, detail::LLZKCallLikeOpInterfaceInterfaceTraits> {
90public:
91 using ::mlir::OpInterface<LLZKCallLikeOpInterface, detail::LLZKCallLikeOpInterfaceInterfaceTraits>::OpInterface;
92 template <typename ConcreteOp>
93 struct Trait : public detail::LLZKCallLikeOpInterfaceTrait<ConcreteOp> {};
94
96 ::mlir::Value getSelfValue();
97
99 ::mlir::FunctionType getTypeSignature();
100
103 ::mlir::FailureOr<::llzk::UnificationMap> unifyTypeSignatureWithNamespace(::mlir::FunctionType other, ::mlir::ArrayRef<::llvm::StringRef> rhsReversePrefix);
104
106 ::mlir::FailureOr<::llzk::UnificationMap> unifyTypeSignature(::mlir::FunctionType other);
107
110 ::llvm::SmallVector<::mlir::ValueRange> toVectorOfValueRange(::mlir::OperandRangeRange input);
111
113 ::mlir::LogicalResult verifyTemplateParamValueCompatibility(::mlir::Attribute paramFromCallOp, ::llzk::polymorphic::TemplateParamOp targetParam);
114
120 ::mlir::LogicalResult verifyTemplateParamValuesCompatibility(::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp>> targetParamDefs);
121
127 ::mlir::LogicalResult verifyTemplateParamsMatchInferred(::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp>> targetParamDefs, const ::llzk::UnificationMap & unifications);
128 //===----------------------------------------------------------------===//
129 // Inherited from ::mlir::ArgAndResultAttrsOpInterface
130 //===----------------------------------------------------------------===//
131
132 operator ::mlir::ArgAndResultAttrsOpInterface () const {
133 if (!*this) return nullptr;
134 return ::mlir::ArgAndResultAttrsOpInterface(*this, getImpl()->implArgAndResultAttrsOpInterface);
135 }
136
137
142 ::mlir::ArrayAttr getArgAttrsAttr();
143
148 ::mlir::ArrayAttr getResAttrsAttr();
149
151 void setArgAttrsAttr(::mlir::ArrayAttr attrs);
152
154 void setResAttrsAttr(::mlir::ArrayAttr attrs);
155
159 ::mlir::Attribute removeArgAttrsAttr();
160
164 ::mlir::Attribute removeResAttrsAttr();
165 //===----------------------------------------------------------------===//
166 // Inherited from ::mlir::CallOpInterface
167 //===----------------------------------------------------------------===//
168
169 operator ::mlir::CallOpInterface () const {
170 if (!*this) return nullptr;
171 return ::mlir::CallOpInterface(*this, getImpl()->implCallOpInterface);
172 }
173
174
179 ::mlir::CallInterfaceCallable getCallableForCallee();
180
186 void setCalleeFromCallable(::mlir::CallInterfaceCallable callee);
187
190 ::mlir::Operation::operand_range getArgOperands();
191
194 ::mlir::MutableOperandRange getArgOperandsMutable();
195
200 ::mlir::Operation *resolveCallableInTable(::mlir::SymbolTableCollection * symbolTable);
201
204 ::mlir::Operation *resolveCallable();
205 //===----------------------------------------------------------------===//
206 // Inherited from ::mlir::SymbolUserOpInterface
207 //===----------------------------------------------------------------===//
208
209 operator ::mlir::SymbolUserOpInterface () const {
210 if (!*this) return nullptr;
211 return ::mlir::SymbolUserOpInterface(*this, getImpl()->implSymbolUserOpInterface);
212 }
213
214
216 ::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection & symbolTable);
217};
218
219} // namespace llzk
220namespace llzk::detail {
221
222 template <typename ConcreteOp>
223 struct LLZKCallLikeOpInterfaceTrait : public ::mlir::OpInterface<LLZKCallLikeOpInterface, detail::LLZKCallLikeOpInterfaceInterfaceTraits>::Trait<ConcreteOp> {
224
226 ::mlir::FunctionType getTypeSignature() {
227 return ::mlir::FunctionType::get(
228 (*static_cast<ConcreteOp *>(this)).getContext(),
229 (*static_cast<ConcreteOp *>(this)).getArgOperands().getTypes(),
230 (*static_cast<ConcreteOp *>(this))->getResultTypes());
231 }
232
235 ::mlir::FailureOr<::llzk::UnificationMap> unifyTypeSignatureWithNamespace(::mlir::FunctionType other, ::mlir::ArrayRef<::llvm::StringRef> rhsReversePrefix) {
236 ::llzk::UnificationMap unifications;
237 if (::llzk::functionTypesUnify((*static_cast<ConcreteOp *>(this)).getTypeSignature(), other, rhsReversePrefix, &unifications)) {
238 return unifications;
239 } else {
240 return ::mlir::failure();
241 }
242 }
243
245 ::mlir::FailureOr<::llzk::UnificationMap> unifyTypeSignature(::mlir::FunctionType other) {
246 return (*static_cast<ConcreteOp *>(this)).unifyTypeSignatureWithNamespace(other, {});
247 }
248
251 static ::llvm::SmallVector<::mlir::ValueRange> toVectorOfValueRange(::mlir::OperandRangeRange input) {
252 ::llvm::SmallVector<::mlir::ValueRange, 4> output;
253 output.reserve(input.size());
254 output.insert(output.end(), input.begin(), input.end());
255 return output;
256 }
257
259 ::mlir::LogicalResult verifyTemplateParamValueCompatibility(::mlir::Attribute paramFromCallOp, ::llzk::polymorphic::TemplateParamOp targetParam) {
260 return ::llzk::verifyTemplateParamValueCompatibility(
261 (*static_cast<ConcreteOp *>(this)).getOperation(), paramFromCallOp, targetParam);
262 }
263
269 ::mlir::LogicalResult verifyTemplateParamValuesCompatibility(::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp>> targetParamDefs) {
270 return ::llzk::verifyTemplateParamValuesCompatibility(
271 (*static_cast<ConcreteOp *>(this)).getOperation(), (*static_cast<ConcreteOp *>(this)).getTemplateParamsAttr(), targetParamDefs);
272 }
273
279 ::mlir::LogicalResult verifyTemplateParamsMatchInferred(::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp>> targetParamDefs, const ::llzk::UnificationMap & unifications) {
280 return ::llzk::verifyTemplateParamsMatchInferred(
281 (*static_cast<ConcreteOp *>(this)).getOperation(), (*static_cast<ConcreteOp *>(this)).getTemplateParamsAttr(), targetParamDefs, unifications);
282 }
283 };
284
285} // namespace llzk::detail
286namespace llzk {
287
288template<typename ConcreteOp>
289::mlir::Value detail::LLZKCallLikeOpInterfaceInterfaceTraits::Model<ConcreteOp>::getSelfValue(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
290 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getSelfValue();
291}
292template<typename ConcreteOp>
293::mlir::FunctionType detail::LLZKCallLikeOpInterfaceInterfaceTraits::Model<ConcreteOp>::getTypeSignature(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
294 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getTypeSignature();
295}
296template<typename ConcreteOp>
297::mlir::FailureOr<::llzk::UnificationMap> detail::LLZKCallLikeOpInterfaceInterfaceTraits::Model<ConcreteOp>::unifyTypeSignatureWithNamespace(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::FunctionType other, ::mlir::ArrayRef<::llvm::StringRef> rhsReversePrefix) {
298 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).unifyTypeSignatureWithNamespace(other, rhsReversePrefix);
299}
300template<typename ConcreteOp>
301::mlir::FailureOr<::llzk::UnificationMap> detail::LLZKCallLikeOpInterfaceInterfaceTraits::Model<ConcreteOp>::unifyTypeSignature(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::FunctionType other) {
302 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).unifyTypeSignature(other);
303}
304template<typename ConcreteOp>
305::llvm::SmallVector<::mlir::ValueRange> detail::LLZKCallLikeOpInterfaceInterfaceTraits::Model<ConcreteOp>::toVectorOfValueRange(::mlir::OperandRangeRange input) {
306 return ConcreteOp::toVectorOfValueRange(input);
307}
308template<typename ConcreteOp>
309::mlir::LogicalResult detail::LLZKCallLikeOpInterfaceInterfaceTraits::Model<ConcreteOp>::verifyTemplateParamValueCompatibility(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::Attribute paramFromCallOp, ::llzk::polymorphic::TemplateParamOp targetParam) {
310 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).verifyTemplateParamValueCompatibility(paramFromCallOp, targetParam);
311}
312template<typename ConcreteOp>
313::mlir::LogicalResult detail::LLZKCallLikeOpInterfaceInterfaceTraits::Model<ConcreteOp>::verifyTemplateParamValuesCompatibility(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp>> targetParamDefs) {
314 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).verifyTemplateParamValuesCompatibility(targetParamDefs);
315}
316template<typename ConcreteOp>
317::mlir::LogicalResult detail::LLZKCallLikeOpInterfaceInterfaceTraits::Model<ConcreteOp>::verifyTemplateParamsMatchInferred(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp>> targetParamDefs, const ::llzk::UnificationMap & unifications) {
318 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).verifyTemplateParamsMatchInferred(targetParamDefs, unifications);
319}
320template<typename ConcreteOp>
322 return static_cast<const ConcreteOp *>(impl)->getSelfValue(tablegen_opaque_val);
323}
324template<typename ConcreteOp>
325::mlir::FunctionType detail::LLZKCallLikeOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getTypeSignature(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
326 return static_cast<const ConcreteOp *>(impl)->getTypeSignature(tablegen_opaque_val);
327}
328template<typename ConcreteOp>
329::mlir::FailureOr<::llzk::UnificationMap> detail::LLZKCallLikeOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::unifyTypeSignatureWithNamespace(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::FunctionType other, ::mlir::ArrayRef<::llvm::StringRef> rhsReversePrefix) {
330 return static_cast<const ConcreteOp *>(impl)->unifyTypeSignatureWithNamespace(tablegen_opaque_val, other, rhsReversePrefix);
331}
332template<typename ConcreteOp>
333::mlir::FailureOr<::llzk::UnificationMap> detail::LLZKCallLikeOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::unifyTypeSignature(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::FunctionType other) {
334 return static_cast<const ConcreteOp *>(impl)->unifyTypeSignature(tablegen_opaque_val, other);
335}
336template<typename ConcreteOp>
337::llvm::SmallVector<::mlir::ValueRange> detail::LLZKCallLikeOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::toVectorOfValueRange(::mlir::OperandRangeRange input) {
338 return ConcreteOp::toVectorOfValueRange(input);
339}
340template<typename ConcreteOp>
341::mlir::LogicalResult detail::LLZKCallLikeOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::verifyTemplateParamValueCompatibility(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::Attribute paramFromCallOp, ::llzk::polymorphic::TemplateParamOp targetParam) {
342 return static_cast<const ConcreteOp *>(impl)->verifyTemplateParamValueCompatibility(tablegen_opaque_val, paramFromCallOp, targetParam);
343}
344template<typename ConcreteOp>
345::mlir::LogicalResult detail::LLZKCallLikeOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::verifyTemplateParamValuesCompatibility(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp>> targetParamDefs) {
346 return static_cast<const ConcreteOp *>(impl)->verifyTemplateParamValuesCompatibility(tablegen_opaque_val, targetParamDefs);
347}
348template<typename ConcreteOp>
349::mlir::LogicalResult detail::LLZKCallLikeOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::verifyTemplateParamsMatchInferred(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp>> targetParamDefs, const ::llzk::UnificationMap & unifications) {
350 return static_cast<const ConcreteOp *>(impl)->verifyTemplateParamsMatchInferred(tablegen_opaque_val, targetParamDefs, unifications);
351}
352template<typename ConcreteModel, typename ConcreteOp>
354return ::mlir::FunctionType::get(
355 (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getContext(),
356 (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getArgOperands().getTypes(),
357 (llvm::cast<ConcreteOp>(tablegen_opaque_val))->getResultTypes());
358}
359template<typename ConcreteModel, typename ConcreteOp>
360::mlir::FailureOr<::llzk::UnificationMap> detail::LLZKCallLikeOpInterfaceInterfaceTraits::ExternalModel<ConcreteModel, ConcreteOp>::unifyTypeSignatureWithNamespace(::mlir::Operation *tablegen_opaque_val, ::mlir::FunctionType other, ::mlir::ArrayRef<::llvm::StringRef> rhsReversePrefix) const {
361::llzk::UnificationMap unifications;
362 if (::llzk::functionTypesUnify((llvm::cast<ConcreteOp>(tablegen_opaque_val)).getTypeSignature(), other, rhsReversePrefix, &unifications)) {
363 return unifications;
364 } else {
365 return ::mlir::failure();
366 }
367}
368template<typename ConcreteModel, typename ConcreteOp>
369::mlir::FailureOr<::llzk::UnificationMap> detail::LLZKCallLikeOpInterfaceInterfaceTraits::ExternalModel<ConcreteModel, ConcreteOp>::unifyTypeSignature(::mlir::Operation *tablegen_opaque_val, ::mlir::FunctionType other) const {
370return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).unifyTypeSignatureWithNamespace(other, {});
371}
372template<typename ConcreteModel, typename ConcreteOp>
374::llvm::SmallVector<::mlir::ValueRange, 4> output;
375 output.reserve(input.size());
376 output.insert(output.end(), input.begin(), input.end());
377 return output;
378}
379template<typename ConcreteModel, typename ConcreteOp>
380::mlir::LogicalResult detail::LLZKCallLikeOpInterfaceInterfaceTraits::ExternalModel<ConcreteModel, ConcreteOp>::verifyTemplateParamValueCompatibility(::mlir::Operation *tablegen_opaque_val, ::mlir::Attribute paramFromCallOp, ::llzk::polymorphic::TemplateParamOp targetParam) const {
381return ::llzk::verifyTemplateParamValueCompatibility(
382 (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getOperation(), paramFromCallOp, targetParam);
383}
384template<typename ConcreteModel, typename ConcreteOp>
385::mlir::LogicalResult detail::LLZKCallLikeOpInterfaceInterfaceTraits::ExternalModel<ConcreteModel, ConcreteOp>::verifyTemplateParamValuesCompatibility(::mlir::Operation *tablegen_opaque_val, ::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp>> targetParamDefs) const {
386return ::llzk::verifyTemplateParamValuesCompatibility(
387 (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getOperation(), (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getTemplateParamsAttr(), targetParamDefs);
388}
389template<typename ConcreteModel, typename ConcreteOp>
390::mlir::LogicalResult detail::LLZKCallLikeOpInterfaceInterfaceTraits::ExternalModel<ConcreteModel, ConcreteOp>::verifyTemplateParamsMatchInferred(::mlir::Operation *tablegen_opaque_val, ::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp>> targetParamDefs, const ::llzk::UnificationMap &unifications) const {
391return ::llzk::verifyTemplateParamsMatchInferred(
392 (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getOperation(), (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getTemplateParamsAttr(), targetParamDefs, unifications);
393}
394
395} // namespace llzk
::mlir::ArrayAttr getResAttrsAttr()
Get the array of result attribute dictionaries.
::llvm::SmallVector<::mlir::ValueRange > toVectorOfValueRange(::mlir::OperandRangeRange input)
Allocates consecutive storage for operand groups so they can be passed to builders as an ArrayRef<Val...
::mlir::Value getSelfValue()
Returns the "self" value from the callee (or nullptr if it's not a struct target).
::mlir::CallInterfaceCallable getCallableForCallee()
Returns the callee of this call-like operation.
void setResAttrsAttr(::mlir::ArrayAttr attrs)
Set the array of result attribute dictionaries.
void setCalleeFromCallable(::mlir::CallInterfaceCallable callee)
Sets the callee of this call-like operation.
::mlir::MutableOperandRange getArgOperandsMutable()
Returns the operands within this call that are used as arguments to the callee as a mutable range.
::mlir::Attribute removeArgAttrsAttr()
Remove the array of argument attribute dictionaries.
::mlir::Attribute removeResAttrsAttr()
Remove the array of result attribute dictionaries.
::mlir::ArrayAttr getArgAttrsAttr()
Get the array of argument attribute dictionaries.
::mlir::LogicalResult verifyTemplateParamsMatchInferred(::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp > > targetParamDefs, const ::llzk::UnificationMap &unifications)
Checks that explicit template parameters agree with their inferred values.
::mlir::FailureOr<::llzk::UnificationMap > unifyTypeSignatureWithNamespace(::mlir::FunctionType other, ::mlir::ArrayRef<::llvm::StringRef > rhsReversePrefix)
Unifies this call site's inferred signature with other, resolving paths in other relative to rhsRever...
::mlir::Operation * resolveCallableInTable(::mlir::SymbolTableCollection *symbolTable)
Resolve the callable operation for given callee to a CallableOpInterface, or nullptr if a valid calla...
::mlir::FailureOr<::llzk::UnificationMap > unifyTypeSignature(::mlir::FunctionType other)
Unifies this call site's inferred signature with other.
::mlir::FunctionType getTypeSignature()
Returns the function signature inferred from this call site.
::mlir::LogicalResult verifyTemplateParamValueCompatibility(::mlir::Attribute paramFromCallOp, ::llzk::polymorphic::TemplateParamOp targetParam)
Checks a template parameter value against the declared type of its target parameter.
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
Verify the symbol uses held by this operation.
void setArgAttrsAttr(::mlir::ArrayAttr attrs)
Set the array of argument attribute dictionaries.
::mlir::Operation::operand_range getArgOperands()
Returns the operands within this call that are used as arguments to the callee.
::mlir::LogicalResult verifyTemplateParamValuesCompatibility(::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp > > targetParamDefs)
Checks each explicit template parameter against its corresponding declared parameter.
::mlir::Operation * resolveCallable()
Resolve the callable operation for given callee to a CallableOpInterface, or nullptr if a valid calla...
::mlir::FunctionType getTypeSignature(::mlir::Operation *tablegen_opaque_val) const
static inline ::mlir::LogicalResult verifyTemplateParamsMatchInferred(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp > > targetParamDefs, const ::llzk::UnificationMap &unifications)
static inline ::llvm::SmallVector<::mlir::ValueRange > toVectorOfValueRange(::mlir::OperandRangeRange input)
static inline ::mlir::FailureOr<::llzk::UnificationMap > unifyTypeSignature(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::FunctionType other)
static inline ::mlir::LogicalResult verifyTemplateParamValueCompatibility(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::Attribute paramFromCallOp, ::llzk::polymorphic::TemplateParamOp targetParam)
static inline ::mlir::FailureOr<::llzk::UnificationMap > unifyTypeSignatureWithNamespace(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::FunctionType other, ::mlir::ArrayRef<::llvm::StringRef > rhsReversePrefix)
static inline ::mlir::LogicalResult verifyTemplateParamValuesCompatibility(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp > > targetParamDefs)
static inline ::mlir::FunctionType getTypeSignature(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::mlir::Value getSelfValue(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::mlir::LogicalResult verifyTemplateParamValueCompatibility(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::Attribute paramFromCallOp, ::llzk::polymorphic::TemplateParamOp targetParam)
static inline ::mlir::FailureOr<::llzk::UnificationMap > unifyTypeSignatureWithNamespace(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::FunctionType other, ::mlir::ArrayRef<::llvm::StringRef > rhsReversePrefix)
static inline ::mlir::FailureOr<::llzk::UnificationMap > unifyTypeSignature(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::FunctionType other)
static inline ::mlir::LogicalResult verifyTemplateParamValuesCompatibility(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp > > targetParamDefs)
static inline ::mlir::Value getSelfValue(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::llvm::SmallVector<::mlir::ValueRange > toVectorOfValueRange(::mlir::OperandRangeRange input)
static inline ::mlir::LogicalResult verifyTemplateParamsMatchInferred(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp > > targetParamDefs, const ::llzk::UnificationMap &unifications)
static inline ::mlir::FunctionType getTypeSignature(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
Provides the necessary information to the RemoveUnusedDiscardableAllocations pass about operations th...
Definition Ops.cpp.inc:41
LogicalResult verifyTemplateParamsMatchInferred(Operation *origin, ArrayAttr explicitParams, llvm::iterator_range< Region::op_iterator< TemplateParamOp > > targetParamDefs, const UnificationMap &unifications)
mlir::DenseMap< std::pair< mlir::SymbolRefAttr, Side >, mlir::Attribute > UnificationMap
Optional result from type unifications.
Definition TypeHelper.h:208
LogicalResult verifyTemplateParamValueCompatibility(Operation *origin, Attribute value, TemplateParamOp targetParam)
LogicalResult verifyTemplateParamValuesCompatibility(Operation *origin, ArrayAttr explicitParams, llvm::iterator_range< Region::op_iterator< TemplateParamOp > > targetParamDefs)
bool functionTypesUnify(FunctionType lhs, FunctionType rhs, ArrayRef< StringRef > rhsReversePrefix, UnificationMap *unifications)
const ::mlir::ArgAndResultAttrsOpInterface::Concept * implArgAndResultAttrsOpInterface
The base classes of this interface.
::mlir::LogicalResult(* verifyTemplateParamValuesCompatibility)(const Concept *impl, ::mlir::Operation *, ::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp > >)
const ::mlir::SymbolUserOpInterface::Concept * implSymbolUserOpInterface
::mlir::FunctionType(* getTypeSignature)(const Concept *impl, ::mlir::Operation *)
::mlir::Value(* getSelfValue)(const Concept *impl, ::mlir::Operation *)
The methods defined by the interface.
::mlir::LogicalResult(* verifyTemplateParamsMatchInferred)(const Concept *impl, ::mlir::Operation *, ::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp > >, const ::llzk::UnificationMap &)
::llvm::SmallVector<::mlir::ValueRange >(* toVectorOfValueRange)(::mlir::OperandRangeRange)
::mlir::FailureOr<::llzk::UnificationMap >(* unifyTypeSignatureWithNamespace)(const Concept *impl, ::mlir::Operation *, ::mlir::FunctionType, ::mlir::ArrayRef<::llvm::StringRef >)
::mlir::LogicalResult(* verifyTemplateParamValueCompatibility)(const Concept *impl, ::mlir::Operation *, ::mlir::Attribute, ::llzk::polymorphic::TemplateParamOp)
::mlir::FailureOr<::llzk::UnificationMap >(* unifyTypeSignature)(const Concept *impl, ::mlir::Operation *, ::mlir::FunctionType)
void initializeInterfaceConcept(::mlir::detail::InterfaceMap &interfaceMap)
::mlir::LogicalResult verifyTemplateParamValueCompatibility(::mlir::Attribute paramFromCallOp, ::llzk::polymorphic::TemplateParamOp targetParam)
Checks a template parameter value against the declared type of its target parameter.
static ::llvm::SmallVector<::mlir::ValueRange > toVectorOfValueRange(::mlir::OperandRangeRange input)
Allocates consecutive storage for operand groups so they can be passed to builders as an ArrayRef<Val...
::mlir::FailureOr<::llzk::UnificationMap > unifyTypeSignatureWithNamespace(::mlir::FunctionType other, ::mlir::ArrayRef<::llvm::StringRef > rhsReversePrefix)
Unifies this call site's inferred signature with other, resolving paths in other relative to rhsRever...
::mlir::FailureOr<::llzk::UnificationMap > unifyTypeSignature(::mlir::FunctionType other)
Unifies this call site's inferred signature with other.
::mlir::LogicalResult verifyTemplateParamValuesCompatibility(::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp > > targetParamDefs)
Checks each explicit template parameter against its corresponding declared parameter.
::mlir::FunctionType getTypeSignature()
Returns the function signature inferred from this call site.
::mlir::LogicalResult verifyTemplateParamsMatchInferred(::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp > > targetParamDefs, const ::llzk::UnificationMap &unifications)
Checks that explicit template parameters agree with their inferred values.