LLZK 2.1.1
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
Ops.h.inc
Go to the documentation of this file.
1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* Op Declarations *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* From: Ops.td *|
7|* *|
8\*===----------------------------------------------------------------------===*/
9
10namespace llzk {
11namespace verif {
12class ContractEndOp;
13} // namespace verif
14} // namespace llzk
15namespace llzk {
16namespace verif {
17class ContractOp;
18} // namespace verif
19} // namespace llzk
20namespace llzk {
21namespace verif {
22class EnsureComputeOp;
23} // namespace verif
24} // namespace llzk
25namespace llzk {
26namespace verif {
28} // namespace verif
29} // namespace llzk
30namespace llzk {
31namespace verif {
32class IncludeOp;
33} // namespace verif
34} // namespace llzk
35namespace llzk {
36namespace verif {
38} // namespace verif
39} // namespace llzk
40namespace llzk {
41namespace verif {
43} // namespace verif
44} // namespace llzk
45#ifdef GET_OP_CLASSES
46#undef GET_OP_CLASSES
47
48namespace llzk {
49namespace verif {
50
51//===----------------------------------------------------------------------===//
52// ::llzk::verif::ContractEndOp declarations
53//===----------------------------------------------------------------------===//
54
55namespace detail {
57public:
58protected:
59 ::mlir::DictionaryAttr odsAttrs;
60 ::std::optional<::mlir::OperationName> odsOpName;
61 ::mlir::RegionRange odsRegions;
62public:
63 ContractEndOpGenericAdaptorBase(::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), odsRegions(regions) { if (odsAttrs)
64 odsOpName.emplace("verif.contract_end", odsAttrs.getContext());
65 }
66
67 ContractEndOpGenericAdaptorBase(::mlir::Operation *op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), odsRegions(op->getRegions()) {}
68
69 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
70 return {index, 1};
71 }
72
73 ::mlir::DictionaryAttr getAttributes() {
74 return odsAttrs;
75 }
76
77};
78} // namespace detail
79template <typename RangeT>
81 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
83public:
84 ContractEndOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
85
86 ContractEndOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : ContractEndOpGenericAdaptor(values, attrs, (properties ? *properties.as<::mlir::EmptyProperties *>() : ::mlir::EmptyProperties{}), regions) {}
87
88 ContractEndOpGenericAdaptor(RangeT values, const ContractEndOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
89
90 template <typename LateInst = ContractEndOp, typename = std::enable_if_t<std::is_same_v<LateInst, ContractEndOp>>>
91 ContractEndOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
92
93 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
94 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
95 }
96
97 RangeT getODSOperands(unsigned index) {
98 auto valueRange = getODSOperandIndexAndLength(index);
99 return {std::next(odsOperands.begin(), valueRange.first),
100 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
101 }
102
103 RangeT getOperands() {
104 return odsOperands;
105 }
106
107private:
108 RangeT odsOperands;
109};
110class ContractEndOpAdaptor : public ContractEndOpGenericAdaptor<::mlir::ValueRange> {
111public:
114
115 ::llvm::LogicalResult verify(::mlir::Location loc);
116};
117class ContractEndOp : public ::mlir::Op<ContractEndOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::HasParent<::llzk::verif::ContractOp>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::IsTerminator> {
118public:
119 using Op::Op;
120 using Op::print;
122 template <typename RangeT>
125 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
126 return {};
127 }
128
129 static constexpr ::llvm::StringLiteral getOperationName() {
130 return ::llvm::StringLiteral("verif.contract_end");
131 }
132
133 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
134 return {index, 1};
135 }
136
137 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
138 auto valueRange = getODSOperandIndexAndLength(index);
139 return {std::next(getOperation()->operand_begin(), valueRange.first),
140 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
141 }
142
143 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
144 return {index, 1};
145 }
146
147 ::mlir::Operation::result_range getODSResults(unsigned index) {
148 auto valueRange = getODSResultIndexAndLength(index);
149 return {std::next(getOperation()->result_begin(), valueRange.first),
150 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
151 }
152
153 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
154 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
155 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
156 ::llvm::LogicalResult verifyInvariantsImpl();
157 ::llvm::LogicalResult verifyInvariants();
158 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
159 void print(::mlir::OpAsmPrinter &_odsPrinter);
160 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
161public:
162};
163} // namespace verif
164} // namespace llzk
165MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::verif::ContractEndOp)
166
167namespace llzk {
168namespace verif {
169
170//===----------------------------------------------------------------------===//
171// ::llzk::verif::ContractOp declarations
172//===----------------------------------------------------------------------===//
173
174namespace detail {
176public:
177 struct Properties {
178 using arg_attrsTy = ::mlir::ArrayAttr;
180
181 auto getArgAttrs() {
182 auto &propStorage = this->arg_attrs;
183 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage);
184 }
185 void setArgAttrs(const ::mlir::ArrayAttr &propValue) {
186 this->arg_attrs = propValue;
187 }
188 using function_typeTy = ::mlir::TypeAttr;
190
192 auto &propStorage = this->function_type;
193 return ::llvm::cast<::mlir::TypeAttr>(propStorage);
194 }
195 void setFunctionType(const ::mlir::TypeAttr &propValue) {
196 this->function_type = propValue;
197 }
198 using sym_nameTy = ::mlir::StringAttr;
200
201 auto getSymName() {
202 auto &propStorage = this->sym_name;
203 return ::llvm::cast<::mlir::StringAttr>(propStorage);
204 }
205 void setSymName(const ::mlir::StringAttr &propValue) {
206 this->sym_name = propValue;
207 }
208 using targetTy = ::mlir::SymbolRefAttr;
210
211 auto getTarget() {
212 auto &propStorage = this->target;
213 return ::llvm::cast<::mlir::SymbolRefAttr>(propStorage);
214 }
215 void setTarget(const ::mlir::SymbolRefAttr &propValue) {
216 this->target = propValue;
217 }
218 bool operator==(const Properties &rhs) const {
219 return
220 rhs.arg_attrs == this->arg_attrs &&
221 rhs.function_type == this->function_type &&
222 rhs.sym_name == this->sym_name &&
223 rhs.target == this->target &&
224 true;
225 }
226 bool operator!=(const Properties &rhs) const {
227 return !(*this == rhs);
228 }
229 };
230protected:
231 ::mlir::DictionaryAttr odsAttrs;
232 ::std::optional<::mlir::OperationName> odsOpName;
234 ::mlir::RegionRange odsRegions;
235public:
236 ContractOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
237 odsOpName.emplace("verif.contract", odsAttrs.getContext());
238 }
239
241
242 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
243 return {index, 1};
244 }
245
247 return properties;
248 }
249
250 ::mlir::DictionaryAttr getAttributes() {
251 return odsAttrs;
252 }
253
254 ::mlir::StringAttr getSymNameAttr() {
255 auto attr = ::llvm::cast<::mlir::StringAttr>(getProperties().sym_name);
256 return attr;
257 }
258
259 ::llvm::StringRef getSymName();
260 ::mlir::SymbolRefAttr getTargetAttr() {
261 auto attr = ::llvm::cast<::mlir::SymbolRefAttr>(getProperties().target);
262 return attr;
263 }
264
265 ::mlir::SymbolRefAttr getTarget();
266 ::mlir::TypeAttr getFunctionTypeAttr() {
267 auto attr = ::llvm::cast<::mlir::TypeAttr>(getProperties().function_type);
268 return attr;
269 }
270
271 ::mlir::FunctionType getFunctionType();
272 ::mlir::ArrayAttr getArgAttrsAttr() {
273 auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().arg_attrs);
274 return attr;
275 }
276
277 ::std::optional< ::mlir::ArrayAttr > getArgAttrs();
278 ::mlir::Region &getBody() {
279 return *odsRegions[0];
280 }
281
282 ::mlir::RegionRange getRegions() {
283 return odsRegions;
284 }
285
286};
287} // namespace detail
288template <typename RangeT>
290 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
292public:
293 ContractOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
294
295 ContractOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : ContractOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
296
297 ContractOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ContractOpGenericAdaptor(values, attrs, Properties{}, {}) {}
298
299 ContractOpGenericAdaptor(RangeT values, const ContractOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
300
301 template <typename LateInst = ContractOp, typename = std::enable_if_t<std::is_same_v<LateInst, ContractOp>>>
302 ContractOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
303
304 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
305 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
306 }
307
308 RangeT getODSOperands(unsigned index) {
309 auto valueRange = getODSOperandIndexAndLength(index);
310 return {std::next(odsOperands.begin(), valueRange.first),
311 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
312 }
313
314 RangeT getOperands() {
315 return odsOperands;
316 }
317
318private:
319 RangeT odsOperands;
320};
321class ContractOpAdaptor : public ContractOpGenericAdaptor<::mlir::ValueRange> {
322public:
325
326 ::llvm::LogicalResult verify(::mlir::Location loc);
327};
328class ContractOp : public ::mlir::Op<ContractOp, ::mlir::OpTrait::OneRegion, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::HasParent<::mlir::ModuleOp, ::llzk::polymorphic::TemplateOp>::Impl, ::mlir::OpTrait::SingleBlock, ::mlir::OpTrait::SingleBlockImplicitTerminator<::llzk::verif::ContractEndOp>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::SymbolUserOpInterface::Trait, ::mlir::OpTrait::AffineScope, ::mlir::OpTrait::AutomaticAllocationScope, ::mlir::SymbolOpInterface::Trait, ::mlir::CallableOpInterface::Trait, ::mlir::FunctionOpInterface::Trait, ::mlir::OpTrait::IsIsolatedFromAbove> {
329public:
330 using Op::Op;
331 using Op::print;
333 template <typename RangeT>
337 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
338 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("arg_attrs"), ::llvm::StringRef("function_type"), ::llvm::StringRef("sym_name"), ::llvm::StringRef("target")};
339 return ::llvm::ArrayRef(attrNames);
340 }
341
342 ::mlir::StringAttr getArgAttrsAttrName() {
343 return getAttributeNameForIndex(0);
344 }
345
346 static ::mlir::StringAttr getArgAttrsAttrName(::mlir::OperationName name) {
347 return getAttributeNameForIndex(name, 0);
348 }
349
350 ::mlir::StringAttr getFunctionTypeAttrName() {
351 return getAttributeNameForIndex(1);
352 }
353
354 static ::mlir::StringAttr getFunctionTypeAttrName(::mlir::OperationName name) {
355 return getAttributeNameForIndex(name, 1);
356 }
357
358 ::mlir::StringAttr getSymNameAttrName() {
359 return getAttributeNameForIndex(2);
360 }
361
362 static ::mlir::StringAttr getSymNameAttrName(::mlir::OperationName name) {
363 return getAttributeNameForIndex(name, 2);
364 }
365
366 ::mlir::StringAttr getTargetAttrName() {
367 return getAttributeNameForIndex(3);
368 }
369
370 static ::mlir::StringAttr getTargetAttrName(::mlir::OperationName name) {
371 return getAttributeNameForIndex(name, 3);
372 }
373
374 static constexpr ::llvm::StringLiteral getOperationName() {
375 return ::llvm::StringLiteral("verif.contract");
376 }
377
378 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
379 return {index, 1};
380 }
381
382 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
383 auto valueRange = getODSOperandIndexAndLength(index);
384 return {std::next(getOperation()->operand_begin(), valueRange.first),
385 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
386 }
387
388 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
389 return {index, 1};
390 }
391
392 ::mlir::Operation::result_range getODSResults(unsigned index) {
393 auto valueRange = getODSResultIndexAndLength(index);
394 return {std::next(getOperation()->result_begin(), valueRange.first),
395 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
396 }
397
398 ::mlir::Region &getBody() {
399 return (*this)->getRegion(0);
400 }
401
402 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
403 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
404 static llvm::hash_code computePropertiesHash(const Properties &prop);
405 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
406 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
407 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
408 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
409 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
410 void writeProperties(::mlir::DialectBytecodeWriter &writer);
411 ::mlir::StringAttr getSymNameAttr() {
412 return ::llvm::cast<::mlir::StringAttr>(getProperties().sym_name);
413 }
414
415 ::llvm::StringRef getSymName();
416 ::mlir::SymbolRefAttr getTargetAttr() {
417 return ::llvm::cast<::mlir::SymbolRefAttr>(getProperties().target);
418 }
419
420 ::mlir::SymbolRefAttr getTarget();
421 ::mlir::TypeAttr getFunctionTypeAttr() {
422 return ::llvm::cast<::mlir::TypeAttr>(getProperties().function_type);
423 }
424
425 ::mlir::FunctionType getFunctionType();
426 ::mlir::ArrayAttr getArgAttrsAttr() {
427 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().arg_attrs);
428 }
429
430 ::std::optional< ::mlir::ArrayAttr > getArgAttrs();
431 void setSymNameAttr(::mlir::StringAttr attr) {
432 getProperties().sym_name = attr;
433 }
434
435 void setSymName(::llvm::StringRef attrValue);
436 void setTargetAttr(::mlir::SymbolRefAttr attr) {
437 getProperties().target = attr;
438 }
439
440 void setFunctionTypeAttr(::mlir::TypeAttr attr) {
441 getProperties().function_type = attr;
442 }
443
444 void setFunctionType(::mlir::FunctionType attrValue);
445 void setArgAttrsAttr(::mlir::ArrayAttr attr) {
446 getProperties().arg_attrs = attr;
447 }
448
449 ::mlir::Attribute removeArgAttrsAttr() {
450 auto &attr = getProperties().arg_attrs;
451 attr = {};
452 return attr;
453 }
454
455 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, ::mlir::SymbolRefAttr target, ::mlir::TypeAttr function_type, ::mlir::ArrayAttr arg_attrs = {});
456 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name, ::mlir::SymbolRefAttr target, ::mlir::TypeAttr function_type, ::mlir::ArrayAttr arg_attrs = {});
457 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef sym_name, ::mlir::SymbolRefAttr target, ::mlir::FunctionType function_type, ::mlir::ArrayAttr arg_attrs = {});
458 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name, ::mlir::SymbolRefAttr target, ::mlir::FunctionType function_type, ::mlir::ArrayAttr arg_attrs = {});
459 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef name, llvm::StringRef target);
460 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef name, ::mlir::SymbolRefAttr target);
461 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
462 void print(::mlir::OpAsmPrinter &p);
463 ::llvm::LogicalResult verifyInvariantsImpl();
464 ::llvm::LogicalResult verifyInvariants();
465 ::llvm::LogicalResult verify();
466 ::llvm::LogicalResult verifyRegions();
467 ::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
468private:
469 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
470 return getAttributeNameForIndex((*this)->getName(), index);
471 }
472
473 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
474 assert(index < 4 && "invalid attribute index");
475 assert(name.getStringRef() == getOperationName() && "invalid operation name");
476 assert(name.isRegistered() && "Operation isn't registered, missing a "
477 "dependent dialect loading?");
478 return name.getAttributeNames()[index];
479 }
480
481public:
489 ContractOp clone(::mlir::IRMapping &mapper);
491
496 void cloneInto(ContractOp dest, ::mlir::IRMapping &mapper);
497
499 bool hasArgPublicAttr(unsigned index);
500
502 bool hasArgName(unsigned index);
503
505 ::std::optional<::mlir::StringAttr> getArgNameAttr(unsigned index);
506
508 void setArgNameAttr(unsigned index, const ::mlir::StringAttr &attr);
509
511 void setArgName(unsigned index, ::llvm::StringRef name);
512
515 ::mlir::Region *getCallableRegion() { return &getBody(); }
516
519 ::llvm::ArrayRef<::mlir::Type> getArgumentTypes() { return getFunctionType().getInputs(); }
520
524 ::llvm::ArrayRef<::mlir::Type> getResultTypes() { return getFunctionType().getResults(); }
525
527 bool isDeclaration() { return false; }
528
531 ::mlir::SymbolRefAttr getFullyQualifiedName(bool requireParent = true);
532
534 bool hasStructTarget() { return succeeded(getStructTarget()); }
535
538 ::mlir::FailureOr<SymbolLookupResult<component::StructDefOp>> getStructTarget(::mlir::SymbolTableCollection &tables);
539
540 ::mlir::FailureOr<SymbolLookupResult<component::StructDefOp>> getStructTarget() {
541 ::mlir::SymbolTableCollection tables;
542 return getStructTarget(tables);
543 }
544
547 ::mlir::FailureOr<::mlir::Value> getSelfValue();
548
550 bool hasFuncTarget() { return succeeded(getFuncTarget()); }
551
554 ::mlir::FailureOr<SymbolLookupResult<function::FuncDefOp>> getFuncTarget(::mlir::SymbolTableCollection &tables);
555
556 ::mlir::FailureOr<SymbolLookupResult<function::FuncDefOp>> getFuncTarget() {
557 ::mlir::SymbolTableCollection tables;
558 return getFuncTarget(tables);
559 }
560
561 private:
564 static void initializeEmptyBody(
565 ::mlir::OpBuilder &builder, ::mlir::OperationState &state,
566 ::mlir::FunctionType functionType
567 );
568};
569} // namespace verif
570} // namespace llzk
571MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::verif::ContractOp)
572
573namespace llzk {
574namespace verif {
575
576//===----------------------------------------------------------------------===//
577// ::llzk::verif::EnsureComputeOp declarations
578//===----------------------------------------------------------------------===//
579
580namespace detail {
582public:
583protected:
584 ::mlir::DictionaryAttr odsAttrs;
585 ::std::optional<::mlir::OperationName> odsOpName;
586 ::mlir::RegionRange odsRegions;
587public:
588 EnsureComputeOpGenericAdaptorBase(::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), odsRegions(regions) { if (odsAttrs)
589 odsOpName.emplace("verif.ensure_compute", odsAttrs.getContext());
590 }
591
592 EnsureComputeOpGenericAdaptorBase(::mlir::Operation *op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), odsRegions(op->getRegions()) {}
593
594 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
595 return {index, 1};
596 }
597
598 ::mlir::DictionaryAttr getAttributes() {
599 return odsAttrs;
600 }
601
602};
603} // namespace detail
604template <typename RangeT>
606 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
608public:
609 EnsureComputeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
610
611 EnsureComputeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : EnsureComputeOpGenericAdaptor(values, attrs, (properties ? *properties.as<::mlir::EmptyProperties *>() : ::mlir::EmptyProperties{}), regions) {}
612
613 EnsureComputeOpGenericAdaptor(RangeT values, const EnsureComputeOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
614
615 template <typename LateInst = EnsureComputeOp, typename = std::enable_if_t<std::is_same_v<LateInst, EnsureComputeOp>>>
616 EnsureComputeOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
617
618 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
619 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
620 }
621
622 RangeT getODSOperands(unsigned index) {
623 auto valueRange = getODSOperandIndexAndLength(index);
624 return {std::next(odsOperands.begin(), valueRange.first),
625 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
626 }
627
628 ValueT getCondition() {
629 return (*getODSOperands(0).begin());
630 }
631
632 RangeT getOperands() {
633 return odsOperands;
634 }
635
636private:
637 RangeT odsOperands;
638};
639class EnsureComputeOpAdaptor : public EnsureComputeOpGenericAdaptor<::mlir::ValueRange> {
640public:
643
644 ::llvm::LogicalResult verify(::mlir::Location loc);
645};
646class EnsureComputeOp : public ::mlir::Op<EnsureComputeOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::llzk::HasAncestor<::llzk::verif::ContractOp>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::MemoryEffectOpInterface::Trait, ::llzk::verif::ConditionOpInterface::Trait, ::llzk::verif::PostconditionOpInterface::Trait> {
647public:
648 using Op::Op;
649 using Op::print;
651 template <typename RangeT>
654 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
655 return {};
656 }
657
658 static constexpr ::llvm::StringLiteral getOperationName() {
659 return ::llvm::StringLiteral("verif.ensure_compute");
660 }
661
662 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
663 return {index, 1};
664 }
665
666 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
667 auto valueRange = getODSOperandIndexAndLength(index);
668 return {std::next(getOperation()->operand_begin(), valueRange.first),
669 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
670 }
671
672 ::mlir::TypedValue<::mlir::IntegerType> getCondition() {
673 return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(0).begin());
674 }
675
676 ::mlir::OpOperand &getConditionMutable() {
677 auto range = getODSOperandIndexAndLength(0);
678 return getOperation()->getOpOperand(range.first);
679 }
680
681 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
682 return {index, 1};
683 }
684
685 ::mlir::Operation::result_range getODSResults(unsigned index) {
686 auto valueRange = getODSResultIndexAndLength(index);
687 return {std::next(getOperation()->result_begin(), valueRange.first),
688 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
689 }
690
691 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition);
692 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition);
693 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
694 ::llvm::LogicalResult verifyInvariantsImpl();
695 ::llvm::LogicalResult verifyInvariants();
696 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
697 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
698 void print(::mlir::OpAsmPrinter &_odsPrinter);
699public:
700};
701} // namespace verif
702} // namespace llzk
703MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::verif::EnsureComputeOp)
704
705namespace llzk {
706namespace verif {
707
708//===----------------------------------------------------------------------===//
709// ::llzk::verif::EnsureConstrainOp declarations
710//===----------------------------------------------------------------------===//
711
712namespace detail {
714public:
715protected:
716 ::mlir::DictionaryAttr odsAttrs;
717 ::std::optional<::mlir::OperationName> odsOpName;
718 ::mlir::RegionRange odsRegions;
719public:
720 EnsureConstrainOpGenericAdaptorBase(::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), odsRegions(regions) { if (odsAttrs)
721 odsOpName.emplace("verif.ensure_constrain", odsAttrs.getContext());
722 }
723
724 EnsureConstrainOpGenericAdaptorBase(::mlir::Operation *op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), odsRegions(op->getRegions()) {}
725
726 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
727 return {index, 1};
728 }
729
730 ::mlir::DictionaryAttr getAttributes() {
731 return odsAttrs;
732 }
733
734};
735} // namespace detail
736template <typename RangeT>
738 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
740public:
741 EnsureConstrainOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
742
743 EnsureConstrainOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : EnsureConstrainOpGenericAdaptor(values, attrs, (properties ? *properties.as<::mlir::EmptyProperties *>() : ::mlir::EmptyProperties{}), regions) {}
744
745 EnsureConstrainOpGenericAdaptor(RangeT values, const EnsureConstrainOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
746
747 template <typename LateInst = EnsureConstrainOp, typename = std::enable_if_t<std::is_same_v<LateInst, EnsureConstrainOp>>>
748 EnsureConstrainOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
749
750 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
751 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
752 }
753
754 RangeT getODSOperands(unsigned index) {
755 auto valueRange = getODSOperandIndexAndLength(index);
756 return {std::next(odsOperands.begin(), valueRange.first),
757 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
758 }
759
760 ValueT getCondition() {
761 return (*getODSOperands(0).begin());
762 }
763
764 RangeT getOperands() {
765 return odsOperands;
766 }
767
768private:
769 RangeT odsOperands;
770};
772public:
775
776 ::llvm::LogicalResult verify(::mlir::Location loc);
777};
778class EnsureConstrainOp : public ::mlir::Op<EnsureConstrainOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::llzk::HasAncestor<::llzk::verif::ContractOp>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::MemoryEffectOpInterface::Trait, ::llzk::verif::ConditionOpInterface::Trait, ::llzk::verif::PostconditionOpInterface::Trait> {
779public:
780 using Op::Op;
781 using Op::print;
783 template <typename RangeT>
786 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
787 return {};
788 }
789
790 static constexpr ::llvm::StringLiteral getOperationName() {
791 return ::llvm::StringLiteral("verif.ensure_constrain");
792 }
793
794 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
795 return {index, 1};
796 }
797
798 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
799 auto valueRange = getODSOperandIndexAndLength(index);
800 return {std::next(getOperation()->operand_begin(), valueRange.first),
801 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
802 }
803
804 ::mlir::TypedValue<::mlir::IntegerType> getCondition() {
805 return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(0).begin());
806 }
807
808 ::mlir::OpOperand &getConditionMutable() {
809 auto range = getODSOperandIndexAndLength(0);
810 return getOperation()->getOpOperand(range.first);
811 }
812
813 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
814 return {index, 1};
815 }
816
817 ::mlir::Operation::result_range getODSResults(unsigned index) {
818 auto valueRange = getODSResultIndexAndLength(index);
819 return {std::next(getOperation()->result_begin(), valueRange.first),
820 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
821 }
822
823 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition);
824 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition);
825 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
826 ::llvm::LogicalResult verifyInvariantsImpl();
827 ::llvm::LogicalResult verifyInvariants();
828 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
829 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
830 void print(::mlir::OpAsmPrinter &_odsPrinter);
831public:
832};
833} // namespace verif
834} // namespace llzk
835MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::verif::EnsureConstrainOp)
836
837namespace llzk {
838namespace verif {
839
840//===----------------------------------------------------------------------===//
841// ::llzk::verif::IncludeOp declarations
842//===----------------------------------------------------------------------===//
843
844namespace detail {
846public:
847 struct Properties {
848 using calleeTy = ::mlir::SymbolRefAttr;
850
851 auto getCallee() {
852 auto &propStorage = this->callee;
853 return ::llvm::cast<::mlir::SymbolRefAttr>(propStorage);
854 }
855 void setCallee(const ::mlir::SymbolRefAttr &propValue) {
856 this->callee = propValue;
857 }
858 using mapOpGroupSizesTy = ::mlir::DenseI32ArrayAttr;
860
862 auto &propStorage = this->mapOpGroupSizes;
863 return ::llvm::cast<::mlir::DenseI32ArrayAttr>(propStorage);
864 }
865 void setMapOpGroupSizes(const ::mlir::DenseI32ArrayAttr &propValue) {
866 this->mapOpGroupSizes = propValue;
867 }
868 using numDimsPerMapTy = ::mlir::DenseI32ArrayAttr;
870
872 auto &propStorage = this->numDimsPerMap;
873 return ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(propStorage);
874 }
875 void setNumDimsPerMap(const ::mlir::DenseI32ArrayAttr &propValue) {
876 this->numDimsPerMap = propValue;
877 }
878 using templateParamsTy = ::mlir::ArrayAttr;
880
882 auto &propStorage = this->templateParams;
883 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage);
884 }
885 void setTemplateParams(const ::mlir::ArrayAttr &propValue) {
886 this->templateParams = propValue;
887 }
888 using operandSegmentSizesTy = std::array<int32_t, 2>;
890 ::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
891 auto &propStorage = this->operandSegmentSizes;
892 return propStorage;
893 }
894 void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
895 auto &propStorage = this->operandSegmentSizes;
896 ::llvm::copy(propValue, propStorage.begin());
897 }
898 bool operator==(const Properties &rhs) const {
899 return
900 rhs.callee == this->callee &&
901 rhs.mapOpGroupSizes == this->mapOpGroupSizes &&
902 rhs.numDimsPerMap == this->numDimsPerMap &&
903 rhs.templateParams == this->templateParams &&
904 rhs.operandSegmentSizes == this->operandSegmentSizes &&
905 true;
906 }
907 bool operator!=(const Properties &rhs) const {
908 return !(*this == rhs);
909 }
910 };
911protected:
912 ::mlir::DictionaryAttr odsAttrs;
913 ::std::optional<::mlir::OperationName> odsOpName;
915 ::mlir::RegionRange odsRegions;
916public:
917 IncludeOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
918 odsOpName.emplace("verif.include", odsAttrs.getContext());
919 }
920
922
923 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
925 return properties;
926 }
927
928 ::mlir::DictionaryAttr getAttributes() {
929 return odsAttrs;
930 }
931
932 ::mlir::SymbolRefAttr getCalleeAttr() {
933 auto attr = ::llvm::cast<::mlir::SymbolRefAttr>(getProperties().callee);
934 return attr;
935 }
936
937 ::mlir::SymbolRefAttr getCallee();
938 ::mlir::ArrayAttr getTemplateParamsAttr() {
939 auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().templateParams);
940 return attr;
941 }
942
943 ::std::optional< ::mlir::ArrayAttr > getTemplateParams();
944 ::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr();
945 ::llvm::ArrayRef<int32_t> getNumDimsPerMap();
946 ::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr() {
947 auto attr = ::llvm::cast<::mlir::DenseI32ArrayAttr>(getProperties().mapOpGroupSizes);
948 return attr;
949 }
950
951 ::llvm::ArrayRef<int32_t> getMapOpGroupSizes();
952};
953} // namespace detail
954template <typename RangeT>
956 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
958public:
959 IncludeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
960
961 IncludeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : IncludeOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
962
963 IncludeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : IncludeOpGenericAdaptor(values, attrs, Properties{}, {}) {}
964
965 IncludeOpGenericAdaptor(RangeT values, const IncludeOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
966
967 template <typename LateInst = IncludeOp, typename = std::enable_if_t<std::is_same_v<LateInst, IncludeOp>>>
968 IncludeOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
969
970 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
971 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
972 }
973
974 RangeT getODSOperands(unsigned index) {
975 auto valueRange = getODSOperandIndexAndLength(index);
976 return {std::next(odsOperands.begin(), valueRange.first),
977 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
978 }
979
980 RangeT getArgOperands() {
981 return getODSOperands(0);
982 }
983
984 ::llvm::SmallVector<RangeT> getMapOperands() {
985 auto tblgenTmpOperands = getODSOperands(1);
986 auto sizes = getMapOpGroupSizes();
987
988 ::llvm::SmallVector<RangeT> tblgenTmpOperandGroups;
989 for (int i = 0, e = sizes.size(); i < e; ++i) {
990 tblgenTmpOperandGroups.push_back(tblgenTmpOperands.take_front(sizes[i]));
991 tblgenTmpOperands = tblgenTmpOperands.drop_front(sizes[i]);
992 }
993 return tblgenTmpOperandGroups;
994 }
995
996 RangeT getOperands() {
997 return odsOperands;
998 }
999
1000private:
1001 RangeT odsOperands;
1002};
1003class IncludeOpAdaptor : public IncludeOpGenericAdaptor<::mlir::ValueRange> {
1004public:
1007
1008 ::llvm::LogicalResult verify(::mlir::Location loc);
1009};
1010class IncludeOp : public ::mlir::Op<IncludeOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::VariadicOperands, ::mlir::OpTrait::AttrSizedOperandSegments, ::llzk::VerifySizesForMultiAffineOps<1>::Impl, ::llzk::HasAncestor<::llzk::verif::ContractOp>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::MemRefsNormalizable, ::mlir::CallOpInterface::Trait, ::mlir::SymbolUserOpInterface::Trait> {
1011public:
1012 using Op::Op;
1013 using Op::print;
1015 template <typename RangeT>
1019 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
1020 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("callee"), ::llvm::StringRef("mapOpGroupSizes"), ::llvm::StringRef("numDimsPerMap"), ::llvm::StringRef("templateParams"), ::llvm::StringRef("operandSegmentSizes")};
1021 return ::llvm::ArrayRef(attrNames);
1022 }
1023
1024 ::mlir::StringAttr getCalleeAttrName() {
1025 return getAttributeNameForIndex(0);
1026 }
1027
1028 static ::mlir::StringAttr getCalleeAttrName(::mlir::OperationName name) {
1029 return getAttributeNameForIndex(name, 0);
1030 }
1031
1032 ::mlir::StringAttr getMapOpGroupSizesAttrName() {
1033 return getAttributeNameForIndex(1);
1034 }
1035
1036 static ::mlir::StringAttr getMapOpGroupSizesAttrName(::mlir::OperationName name) {
1037 return getAttributeNameForIndex(name, 1);
1038 }
1039
1040 ::mlir::StringAttr getNumDimsPerMapAttrName() {
1041 return getAttributeNameForIndex(2);
1042 }
1043
1044 static ::mlir::StringAttr getNumDimsPerMapAttrName(::mlir::OperationName name) {
1045 return getAttributeNameForIndex(name, 2);
1046 }
1047
1048 ::mlir::StringAttr getTemplateParamsAttrName() {
1049 return getAttributeNameForIndex(3);
1050 }
1051
1052 static ::mlir::StringAttr getTemplateParamsAttrName(::mlir::OperationName name) {
1053 return getAttributeNameForIndex(name, 3);
1054 }
1055
1056 ::mlir::StringAttr getOperandSegmentSizesAttrName() {
1057 return (*this)->getName().getAttributeNames().back();
1058 }
1059
1060 static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
1061 return name.getAttributeNames().back();
1062 }
1063
1064 static constexpr ::llvm::StringLiteral getOperationName() {
1065 return ::llvm::StringLiteral("verif.include");
1066 }
1067
1068 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
1069 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
1070 auto valueRange = getODSOperandIndexAndLength(index);
1071 return {std::next(getOperation()->operand_begin(), valueRange.first),
1072 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
1073 }
1074
1075 ::mlir::Operation::operand_range getArgOperands() {
1076 return getODSOperands(0);
1077 }
1078
1079 ::mlir::OperandRangeRange getMapOperands() {
1080 return getODSOperands(1).split(getMapOpGroupSizesAttr());
1081 }
1082
1083 ::mlir::MutableOperandRange getArgOperandsMutable();
1084 ::mlir::MutableOperandRangeRange getMapOperandsMutable();
1085 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
1086 return {index, 1};
1087 }
1088
1089 ::mlir::Operation::result_range getODSResults(unsigned index) {
1090 auto valueRange = getODSResultIndexAndLength(index);
1091 return {std::next(getOperation()->result_begin(), valueRange.first),
1092 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
1093 }
1094
1095 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1096 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
1097 static llvm::hash_code computePropertiesHash(const Properties &prop);
1098 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
1099 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
1100 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
1101 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1102 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
1103 void writeProperties(::mlir::DialectBytecodeWriter &writer);
1104 ::mlir::SymbolRefAttr getCalleeAttr() {
1105 return ::llvm::cast<::mlir::SymbolRefAttr>(getProperties().callee);
1106 }
1107
1108 ::mlir::SymbolRefAttr getCallee();
1109 ::mlir::ArrayAttr getTemplateParamsAttr() {
1110 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().templateParams);
1111 }
1112
1113 ::std::optional< ::mlir::ArrayAttr > getTemplateParams();
1114 ::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr() {
1115 return ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(getProperties().numDimsPerMap);
1116 }
1117
1118 ::llvm::ArrayRef<int32_t> getNumDimsPerMap();
1119 ::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr() {
1120 return ::llvm::cast<::mlir::DenseI32ArrayAttr>(getProperties().mapOpGroupSizes);
1121 }
1122
1123 ::llvm::ArrayRef<int32_t> getMapOpGroupSizes();
1124 void setCalleeAttr(::mlir::SymbolRefAttr attr) {
1125 getProperties().callee = attr;
1126 }
1127
1128 void setTemplateParamsAttr(::mlir::ArrayAttr attr) {
1129 getProperties().templateParams = attr;
1130 }
1131
1132 void setNumDimsPerMapAttr(::mlir::DenseI32ArrayAttr attr) {
1133 getProperties().numDimsPerMap = attr;
1134 }
1135
1136 void setNumDimsPerMap(::llvm::ArrayRef<int32_t> attrValue);
1137 void setMapOpGroupSizesAttr(::mlir::DenseI32ArrayAttr attr) {
1138 getProperties().mapOpGroupSizes = attr;
1139 }
1140
1141 void setMapOpGroupSizes(::llvm::ArrayRef<int32_t> attrValue);
1142 ::mlir::Attribute removeTemplateParamsAttr() {
1143 auto &attr = getProperties().templateParams;
1144 attr = {};
1145 return attr;
1146 }
1147
1148 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::SymbolRefAttr callee, ::mlir::ValueRange argOperands = {}, ::llvm::ArrayRef<::mlir::Attribute> templateParams = {});
1149 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::SymbolRefAttr callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap, ::mlir::ValueRange argOperands = {}, ::llvm::ArrayRef<::mlir::Attribute> templateParams = {});
1150 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::SymbolRefAttr callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::llvm::ArrayRef<int32_t> numDimsPerMap, ::mlir::ValueRange argOperands = {}, ::llvm::ArrayRef<::mlir::Attribute> templateParams = {});
1151 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::verif::ContractOp callee, ::mlir::ValueRange argOperands = {}, ::llvm::ArrayRef<::mlir::Attribute> templateParams = {});
1152 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::verif::ContractOp callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap, ::mlir::ValueRange argOperands = {}, ::llvm::ArrayRef<::mlir::Attribute> templateParams = {});
1153 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::verif::ContractOp callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::llvm::ArrayRef<int32_t> numDimsPerMap, ::mlir::ValueRange argOperands = {}, ::llvm::ArrayRef<::mlir::Attribute> templateParams = {});
1154 static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
1155 ::llvm::LogicalResult verifyInvariantsImpl();
1156 ::llvm::LogicalResult verifyInvariants();
1157 ::mlir::CallInterfaceCallable getCallableForCallee();
1158 void setCalleeFromCallable(::mlir::CallInterfaceCallable callee);
1159 ::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
1160 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
1161 static ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1162 void print(::mlir::OpAsmPrinter &_odsPrinter);
1163private:
1164 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
1165 return getAttributeNameForIndex((*this)->getName(), index);
1166 }
1167
1168 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
1169 assert(index < 4 && "invalid attribute index");
1170 assert(name.getStringRef() == getOperationName() && "invalid operation name");
1171 assert(name.isRegistered() && "Operation isn't registered, missing a "
1172 "dependent dialect loading?");
1173 return name.getAttributeNames()[index];
1174 }
1175
1176public:
1178 ::mlir::Operation *resolveCallableInTable(::mlir::SymbolTableCollection *symbolTable);
1179
1181 ::mlir::Operation *resolveCallable();
1182
1186 ::mlir::FunctionType getTypeSignature();
1187
1191 ::mlir::FailureOr<UnificationMap> unifyTypeSignature(::mlir::FunctionType other);
1192
1194 bool contractTargetsStruct();
1195
1198 ::mlir::Value getSelfValue();
1199
1201 ::mlir::FailureOr<::llzk::SymbolLookupResult<::llzk::verif::ContractOp>>
1202 getCalleeTarget(::mlir::SymbolTableCollection &tables);
1203
1206 static ::llvm::SmallVector<::mlir::ValueRange> toVectorOfValueRange(::mlir::OperandRangeRange);
1207
1211 ::mlir::Attribute paramFromCallOp, ::llzk::polymorphic::TemplateParamOp targetParam
1212 );
1213
1221 ::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp>> targetParamDefs
1222 );
1223
1232 ::mlir::LogicalResult verifyTemplateParamsMatchInferred(
1233 ::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp>> targetParamDefs,
1234 const UnificationMap &unifications
1235 );
1236};
1237} // namespace verif
1238} // namespace llzk
1239MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::verif::IncludeOp)
1240
1241namespace llzk {
1242namespace verif {
1243
1244//===----------------------------------------------------------------------===//
1245// ::llzk::verif::RequireComputeOp declarations
1246//===----------------------------------------------------------------------===//
1247
1248namespace detail {
1250public:
1251protected:
1252 ::mlir::DictionaryAttr odsAttrs;
1253 ::std::optional<::mlir::OperationName> odsOpName;
1254 ::mlir::RegionRange odsRegions;
1255public:
1256 RequireComputeOpGenericAdaptorBase(::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), odsRegions(regions) { if (odsAttrs)
1257 odsOpName.emplace("verif.require_compute", odsAttrs.getContext());
1258 }
1259
1260 RequireComputeOpGenericAdaptorBase(::mlir::Operation *op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), odsRegions(op->getRegions()) {}
1261
1262 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
1263 return {index, 1};
1264 }
1265
1266 ::mlir::DictionaryAttr getAttributes() {
1267 return odsAttrs;
1268 }
1269
1270};
1271} // namespace detail
1272template <typename RangeT>
1274 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
1276public:
1277 RequireComputeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
1278
1279 RequireComputeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : RequireComputeOpGenericAdaptor(values, attrs, (properties ? *properties.as<::mlir::EmptyProperties *>() : ::mlir::EmptyProperties{}), regions) {}
1280
1281 RequireComputeOpGenericAdaptor(RangeT values, const RequireComputeOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
1282
1283 template <typename LateInst = RequireComputeOp, typename = std::enable_if_t<std::is_same_v<LateInst, RequireComputeOp>>>
1284 RequireComputeOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
1285
1286 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1287 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
1288 }
1289
1290 RangeT getODSOperands(unsigned index) {
1291 auto valueRange = getODSOperandIndexAndLength(index);
1292 return {std::next(odsOperands.begin(), valueRange.first),
1293 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
1294 }
1295
1296 ValueT getCondition() {
1297 return (*getODSOperands(0).begin());
1298 }
1299
1300 RangeT getOperands() {
1301 return odsOperands;
1302 }
1303
1304private:
1305 RangeT odsOperands;
1306};
1308public:
1311
1312 ::llvm::LogicalResult verify(::mlir::Location loc);
1313};
1314class RequireComputeOp : public ::mlir::Op<RequireComputeOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::llzk::HasAncestor<::llzk::verif::ContractOp>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::MemoryEffectOpInterface::Trait, ::llzk::verif::ConditionOpInterface::Trait, ::llzk::verif::PreconditionOpInterface::Trait> {
1315public:
1316 using Op::Op;
1317 using Op::print;
1319 template <typename RangeT>
1322 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
1323 return {};
1324 }
1325
1326 static constexpr ::llvm::StringLiteral getOperationName() {
1327 return ::llvm::StringLiteral("verif.require_compute");
1328 }
1329
1330 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1331 return {index, 1};
1332 }
1333
1334 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
1335 auto valueRange = getODSOperandIndexAndLength(index);
1336 return {std::next(getOperation()->operand_begin(), valueRange.first),
1337 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
1338 }
1339
1340 ::mlir::TypedValue<::mlir::IntegerType> getCondition() {
1341 return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(0).begin());
1342 }
1343
1344 ::mlir::OpOperand &getConditionMutable() {
1345 auto range = getODSOperandIndexAndLength(0);
1346 return getOperation()->getOpOperand(range.first);
1347 }
1348
1349 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
1350 return {index, 1};
1351 }
1352
1353 ::mlir::Operation::result_range getODSResults(unsigned index) {
1354 auto valueRange = getODSResultIndexAndLength(index);
1355 return {std::next(getOperation()->result_begin(), valueRange.first),
1356 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
1357 }
1358
1359 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition);
1360 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition);
1361 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1362 ::llvm::LogicalResult verifyInvariantsImpl();
1363 ::llvm::LogicalResult verifyInvariants();
1364 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
1365 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
1366 void print(::mlir::OpAsmPrinter &_odsPrinter);
1367public:
1368};
1369} // namespace verif
1370} // namespace llzk
1371MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::verif::RequireComputeOp)
1372
1373namespace llzk {
1374namespace verif {
1375
1376//===----------------------------------------------------------------------===//
1377// ::llzk::verif::RequireConstrainOp declarations
1378//===----------------------------------------------------------------------===//
1379
1380namespace detail {
1382public:
1383protected:
1384 ::mlir::DictionaryAttr odsAttrs;
1385 ::std::optional<::mlir::OperationName> odsOpName;
1386 ::mlir::RegionRange odsRegions;
1387public:
1388 RequireConstrainOpGenericAdaptorBase(::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), odsRegions(regions) { if (odsAttrs)
1389 odsOpName.emplace("verif.require_constrain", odsAttrs.getContext());
1390 }
1391
1392 RequireConstrainOpGenericAdaptorBase(::mlir::Operation *op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), odsRegions(op->getRegions()) {}
1393
1394 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
1395 return {index, 1};
1396 }
1397
1398 ::mlir::DictionaryAttr getAttributes() {
1399 return odsAttrs;
1400 }
1401
1402};
1403} // namespace detail
1404template <typename RangeT>
1406 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
1408public:
1409 RequireConstrainOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
1410
1411 RequireConstrainOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : RequireConstrainOpGenericAdaptor(values, attrs, (properties ? *properties.as<::mlir::EmptyProperties *>() : ::mlir::EmptyProperties{}), regions) {}
1412
1413 RequireConstrainOpGenericAdaptor(RangeT values, const RequireConstrainOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
1414
1415 template <typename LateInst = RequireConstrainOp, typename = std::enable_if_t<std::is_same_v<LateInst, RequireConstrainOp>>>
1416 RequireConstrainOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
1417
1418 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1419 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
1420 }
1421
1422 RangeT getODSOperands(unsigned index) {
1423 auto valueRange = getODSOperandIndexAndLength(index);
1424 return {std::next(odsOperands.begin(), valueRange.first),
1425 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
1426 }
1427
1428 ValueT getCondition() {
1429 return (*getODSOperands(0).begin());
1430 }
1431
1432 RangeT getOperands() {
1433 return odsOperands;
1434 }
1435
1436private:
1437 RangeT odsOperands;
1438};
1440public:
1443
1444 ::llvm::LogicalResult verify(::mlir::Location loc);
1445};
1446class RequireConstrainOp : public ::mlir::Op<RequireConstrainOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::llzk::HasAncestor<::llzk::verif::ContractOp>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::MemoryEffectOpInterface::Trait, ::llzk::verif::ConditionOpInterface::Trait, ::llzk::verif::PreconditionOpInterface::Trait> {
1447public:
1448 using Op::Op;
1449 using Op::print;
1451 template <typename RangeT>
1454 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
1455 return {};
1456 }
1457
1458 static constexpr ::llvm::StringLiteral getOperationName() {
1459 return ::llvm::StringLiteral("verif.require_constrain");
1460 }
1461
1462 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1463 return {index, 1};
1464 }
1465
1466 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
1467 auto valueRange = getODSOperandIndexAndLength(index);
1468 return {std::next(getOperation()->operand_begin(), valueRange.first),
1469 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
1470 }
1471
1472 ::mlir::TypedValue<::mlir::IntegerType> getCondition() {
1473 return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(0).begin());
1474 }
1475
1476 ::mlir::OpOperand &getConditionMutable() {
1477 auto range = getODSOperandIndexAndLength(0);
1478 return getOperation()->getOpOperand(range.first);
1479 }
1480
1481 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
1482 return {index, 1};
1483 }
1484
1485 ::mlir::Operation::result_range getODSResults(unsigned index) {
1486 auto valueRange = getODSResultIndexAndLength(index);
1487 return {std::next(getOperation()->result_begin(), valueRange.first),
1488 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
1489 }
1490
1491 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition);
1492 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition);
1493 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1494 ::llvm::LogicalResult verifyInvariantsImpl();
1495 ::llvm::LogicalResult verifyInvariants();
1496 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
1497 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
1498 void print(::mlir::OpAsmPrinter &_odsPrinter);
1499public:
1500};
1501} // namespace verif
1502} // namespace llzk
1503MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::verif::RequireConstrainOp)
1504
1505
1506#endif // GET_OP_CLASSES
1507
ContractEndOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:84
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:170
ContractEndOpAdaptor(ContractEndOp op)
Definition Ops.cpp.inc:168
ContractEndOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:84
ContractEndOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:86
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:97
ContractEndOpGenericAdaptor(RangeT values, const ContractEndOpGenericAdaptorBase &base)
Definition Ops.h.inc:88
ContractEndOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:91
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:93
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:129
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:147
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:198
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:190
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:125
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:194
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:143
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:137
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState)
Definition Ops.cpp.inc:174
ContractEndOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:123
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:124
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:207
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:212
ContractEndOpAdaptor Adaptor
Definition Ops.h.inc:121
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:133
ContractOpAdaptor(ContractOp op)
Definition Ops.cpp.inc:250
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:252
ContractOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:293
ContractOpGenericAdaptor(RangeT values, const ContractOpGenericAdaptorBase &base)
Definition Ops.h.inc:299
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:304
ContractOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:297
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:308
ContractOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:293
ContractOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:295
ContractOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:302
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:432
::mlir::StringAttr getFunctionTypeAttrName()
Definition Ops.h.inc:350
::llvm::LogicalResult verifyRegions()
Definition Ops.cpp:640
void setSymNameAttr(::mlir::StringAttr attr)
Definition Ops.h.inc:431
ContractOpAdaptor Adaptor
Definition Ops.h.inc:332
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:400
void setArgNameAttr(unsigned index, const ::mlir::StringAttr &attr)
Set the function.arg_name attribute for the argument at the given index.
Definition Ops.cpp:378
::mlir::FailureOr< SymbolLookupResult< function::FuncDefOp > > getFuncTarget(::mlir::SymbolTableCollection &tables)
Return the FuncDefOp that this contract targets, or failure if it does not target a function or the f...
void setTargetAttr(::mlir::SymbolRefAttr attr)
Definition Ops.h.inc:436
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:337
bool hasArgName(unsigned index)
Return true iff the argument at the given index has a function.arg_name attribute.
Definition Ops.cpp:366
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:385
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:377
::llvm::ArrayRef<::mlir::Type > getResultTypes()
Required by FunctionOpInterface.
Definition Ops.h.inc:524
bool hasArgPublicAttr(unsigned index)
Return true iff the argument at the given index has pub attribute.
Definition Ops.cpp:358
void cloneInto(ContractOp dest, ::mlir::IRMapping &mapper)
Clone the internal blocks and attributes from this contract into dest.
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:374
void setFunctionTypeAttr(::mlir::TypeAttr attr)
Definition Ops.h.inc:440
::mlir::StringAttr getTargetAttrName()
Definition Ops.h.inc:366
void setFunctionType(::mlir::FunctionType attrValue)
Definition Ops.cpp.inc:508
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
Definition Ops.cpp:396
::mlir::StringAttr getSymNameAttr()
Definition Ops.h.inc:411
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:580
::llvm::LogicalResult verify()
Definition Ops.cpp:586
void print(::mlir::OpAsmPrinter &p)
Definition Ops.cpp:559
::std::optional< ::mlir::ArrayAttr > getArgAttrs()
Definition Ops.cpp.inc:499
::mlir::FunctionType getFunctionType()
Definition Ops.cpp.inc:494
void setArgName(unsigned index, ::llvm::StringRef name)
Set the function.arg_name attribute for the argument at the given index from a string.
Definition Ops.cpp:383
::mlir::Attribute removeArgAttrsAttr()
Definition Ops.h.inc:449
ContractOp clone(::mlir::IRMapping &mapper)
Create a deep copy of this contract and all of its blocks, remapping any operands that use values out...
::mlir::StringAttr getSymNameAttrName()
Definition Ops.h.inc:358
bool hasStructTarget()
Return true iff the contract targets a struct type.
Definition Ops.h.inc:534
::std::optional<::mlir::StringAttr > getArgNameAttr(unsigned index)
Return the function.arg_name attribute for the argument at the given index.
Definition Ops.cpp:368
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:335
::llvm::ArrayRef<::mlir::Type > getArgumentTypes()
Required by FunctionOpInterface.
Definition Ops.h.inc:519
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:392
::mlir::Region & getBody()
Definition Ops.h.inc:398
void setArgAttrsAttr(::mlir::ArrayAttr attr)
Definition Ops.h.inc:445
::mlir::StringAttr getArgAttrsAttrName()
Definition Ops.h.inc:342
::mlir::StringAttr getArgAttrsAttrName(::mlir::OperationName name)
Definition Ops.h.inc:346
::mlir::TypeAttr getFunctionTypeAttr()
Definition Ops.h.inc:421
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:378
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:388
::mlir::FailureOr< SymbolLookupResult< component::StructDefOp > > getStructTarget(::mlir::SymbolTableCollection &tables)
Return the StructDefOp that this contract targets, or failure if it does not target a struct or the s...
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:340
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:422
::mlir::StringAttr getFunctionTypeAttrName(::mlir::OperationName name)
Definition Ops.h.inc:354
::mlir::Region * getCallableRegion()
Required by FunctionOpInterface.
Definition Ops.h.inc:515
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef name, llvm::StringRef target)
::mlir::SymbolRefAttr getTargetAttr()
Definition Ops.h.inc:416
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:382
::mlir::SymbolRefAttr getFullyQualifiedName(bool requireParent=true)
Return the full name for this contract from the root module, including all surrounding symbol table n...
Definition Ops.cpp:387
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:550
::mlir::FailureOr<::mlir::Value > getSelfValue()
Return the "self" value (i.e.
Definition Ops.cpp:702
::mlir::ArrayAttr getArgAttrsAttr()
Definition Ops.h.inc:426
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:475
void setSymName(::llvm::StringRef attrValue)
Definition Ops.cpp.inc:504
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:275
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:459
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp:452
::mlir::SymbolRefAttr getTarget()
Definition Ops.cpp.inc:489
FoldAdaptor::Properties Properties
Definition Ops.h.inc:336
::mlir::FailureOr< SymbolLookupResult< component::StructDefOp > > getStructTarget()
Definition Ops.h.inc:540
::mlir::FailureOr< SymbolLookupResult< function::FuncDefOp > > getFuncTarget()
Definition Ops.h.inc:556
::mlir::StringAttr getSymNameAttrName(::mlir::OperationName name)
Definition Ops.h.inc:362
ContractOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:334
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, ::mlir::SymbolRefAttr target, ::mlir::TypeAttr function_type, ::mlir::ArrayAttr arg_attrs={})
Definition Ops.cpp.inc:512
bool hasFuncTarget()
Return true iff the contract targets a function.
Definition Ops.h.inc:550
::llvm::StringRef getSymName()
Definition Ops.cpp.inc:484
::mlir::StringAttr getTargetAttrName(::mlir::OperationName name)
Definition Ops.h.inc:370
bool isDeclaration()
Required by SymbolOpInterface.
Definition Ops.h.inc:527
EnsureComputeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:609
EnsureComputeOpAdaptor(EnsureComputeOp op)
Definition Ops.cpp.inc:599
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:601
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:618
EnsureComputeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:609
EnsureComputeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:611
EnsureComputeOpGenericAdaptor(RangeT values, const EnsureComputeOpGenericAdaptorBase &base)
Definition Ops.h.inc:613
EnsureComputeOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:616
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:622
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:640
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:668
::mlir::OpOperand & getConditionMutable()
Definition Ops.h.inc:676
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:636
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:654
EnsureComputeOpAdaptor Adaptor
Definition Ops.h.inc:650
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:662
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:653
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:658
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:659
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:666
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:685
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition)
Definition Ops.cpp.inc:605
EnsureComputeOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:652
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:623
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:681
::mlir::TypedValue<::mlir::IntegerType > getCondition()
Definition Ops.h.inc:672
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:688
EnsureConstrainOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:741
EnsureConstrainOpAdaptor(EnsureConstrainOp op)
Definition Ops.cpp.inc:686
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:750
EnsureConstrainOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:748
EnsureConstrainOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:743
EnsureConstrainOpGenericAdaptor(RangeT values, const EnsureConstrainOpGenericAdaptorBase &base)
Definition Ops.h.inc:745
EnsureConstrainOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:741
::mlir::OpOperand & getConditionMutable()
Definition Ops.h.inc:808
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:785
EnsureConstrainOpAdaptor Adaptor
Definition Ops.h.inc:782
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:813
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:798
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:755
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:790
EnsureConstrainOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:784
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:723
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:746
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:710
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:794
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition)
Definition Ops.cpp.inc:692
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:727
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:786
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:817
::mlir::TypedValue<::mlir::IntegerType > getCondition()
Definition Ops.h.inc:804
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:811
IncludeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:959
IncludeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs)
Definition Ops.h.inc:963
::llvm::SmallVector< RangeT > getMapOperands()
Definition Ops.h.inc:984
IncludeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:959
IncludeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:961
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:970
IncludeOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:968
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:974
IncludeOpGenericAdaptor(RangeT values, const IncludeOpGenericAdaptorBase &base)
Definition Ops.h.inc:965
void setNumDimsPerMap(::llvm::ArrayRef< int32_t > attrValue)
Definition Ops.cpp.inc:1154
::mlir::LogicalResult verifyTemplateParamCompatibility(::mlir::Attribute paramFromCallOp, ::llzk::polymorphic::TemplateParamOp targetParam)
Check type compatibility of the given template parameter value from this CallOp against the declared ...
::mlir::MutableOperandRange getArgOperandsMutable()
Definition Ops.cpp.inc:842
::mlir::StringAttr getMapOpGroupSizesAttrName(::mlir::OperationName name)
Definition Ops.h.inc:1036
::mlir::ArrayAttr getTemplateParamsAttr()
Definition Ops.h.inc:1109
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:930
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1196
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:975
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1069
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:1071
IncludeOpAdaptor Adaptor
Definition Ops.h.inc:1014
void setMapOpGroupSizes(::llvm::ArrayRef< int32_t > attrValue)
Definition Ops.cpp.inc:1158
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:1019
::mlir::OperandRangeRange getMapOperands()
Definition Ops.h.inc:1079
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:1017
::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1314
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1239
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
Definition Ops.cpp:971
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.cpp.inc:833
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1044
void setNumDimsPerMapAttr(::mlir::DenseI32ArrayAttr attr)
Definition Ops.h.inc:1132
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
Definition Ops.cpp.inc:1149
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:1111
::mlir::StringAttr getNumDimsPerMapAttrName(::mlir::OperationName name)
Definition Ops.h.inc:1044
::mlir::SymbolRefAttr getCalleeAttr()
Definition Ops.h.inc:1104
FoldAdaptor::Properties Properties
Definition Ops.h.inc:1018
void setMapOpGroupSizesAttr(::mlir::DenseI32ArrayAttr attr)
Definition Ops.h.inc:1137
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:987
::mlir::Operation::operand_range getArgOperands()
Definition Ops.h.inc:1075
void setCalleeAttr(::mlir::SymbolRefAttr attr)
Definition Ops.h.inc:1124
::mlir::FailureOr<::llzk::SymbolLookupResult<::llzk::verif::ContractOp > > getCalleeTarget(::mlir::SymbolTableCollection &tables)
Resolve and return the target Contract for this CallOp.
Definition Ops.cpp:1023
::mlir::Operation * resolveCallable()
Required by CallOpInterface.
Definition Ops.cpp:1079
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:1033
::mlir::SymbolRefAttr getCallee()
Definition Ops.cpp.inc:1134
::mlir::StringAttr getCalleeAttrName()
Definition Ops.h.inc:1024
::mlir::StringAttr getTemplateParamsAttrName(::mlir::OperationName name)
Definition Ops.h.inc:1052
::mlir::StringAttr getMapOpGroupSizesAttrName()
Definition Ops.h.inc:1032
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:854
::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name)
Definition Ops.h.inc:1060
::mlir::Value getSelfValue()
Return the "self" value (i.e.
Definition Ops.cpp:1036
::mlir::MutableOperandRangeRange getMapOperandsMutable()
Definition Ops.cpp.inc:848
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:1085
::mlir::StringAttr getOperandSegmentSizesAttrName()
Definition Ops.h.inc:1056
::std::optional< ::mlir::ArrayAttr > getTemplateParams()
Definition Ops.cpp.inc:1139
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:1003
void setCalleeFromCallable(::mlir::CallInterfaceCallable callee)
Set the callee for this operation.
Definition Ops.cpp:1051
bool contractTargetsStruct()
Return true iff the contract targets a struct type.
Definition Ops.cpp:1030
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:1089
void setTemplateParamsAttr(::mlir::ArrayAttr attr)
Definition Ops.h.inc:1128
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::SymbolRefAttr callee, ::mlir::ValueRange argOperands={}, ::llvm::ArrayRef<::mlir::Attribute > templateParams={})
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1342
::mlir::StringAttr getCalleeAttrName(::mlir::OperationName name)
Definition Ops.h.inc:1028
::mlir::LogicalResult verifyTemplateParamCompatibility(::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp > > targetParamDefs)
Check type compatibility of each template parameter value provided in this CallOp against the declare...
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties)
Definition Ops.cpp.inc:1190
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
Definition Ops.cpp.inc:1144
::mlir::FunctionType getTypeSignature()
Return the FunctionType inferred from the arg operands of this CallOp.
Definition Ops.cpp:1010
::mlir::Attribute removeTemplateParamsAttr()
Definition Ops.h.inc:1142
::mlir::LogicalResult verifyTemplateParamsMatchInferred(::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp > > targetParamDefs, const UnificationMap &unifications)
Verify that each template parameter value provided in this CallOp is consistent with the value inferr...
Definition Ops.cpp:805
::mlir::StringAttr getNumDimsPerMapAttrName()
Definition Ops.h.inc:1040
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
Definition Ops.h.inc:1114
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1235
::mlir::FailureOr< UnificationMap > unifyTypeSignature(::mlir::FunctionType other)
Attempt type unfication between the inferred FunctionType from this CallOp (as LHS) and the given Fun...
Definition Ops.cpp:1014
::mlir::Operation * resolveCallableInTable(::mlir::SymbolTableCollection *symbolTable)
Required by CallOpInterface.
Definition Ops.cpp:1062
IncludeOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:1016
static ::llvm::SmallVector<::mlir::ValueRange > toVectorOfValueRange(::mlir::OperandRangeRange)
Allocate consecutive storage of the ValueRange instances in the parameter so it can be passed to the ...
Definition Ops.cpp:1055
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::SymbolRefAttr callee, ::llvm::ArrayRef<::mlir::ValueRange > mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap, ::mlir::ValueRange argOperands={}, ::llvm::ArrayRef<::mlir::Attribute > templateParams={})
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:1064
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
Definition Ops.h.inc:1119
::mlir::CallInterfaceCallable getCallableForCallee()
Return the callee of this operation.
Definition Ops.cpp:1048
::mlir::StringAttr getTemplateParamsAttrName()
Definition Ops.h.inc:1048
RequireComputeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1277
RequireComputeOpAdaptor(RequireComputeOp op)
Definition Ops.cpp.inc:1378
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1380
RequireComputeOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:1284
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1286
RequireComputeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1279
RequireComputeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1277
RequireComputeOpGenericAdaptor(RangeT values, const RequireComputeOpGenericAdaptorBase &base)
Definition Ops.h.inc:1281
RequireComputeOpAdaptor Adaptor
Definition Ops.h.inc:1318
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:1321
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:1326
RequireComputeOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:1320
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1330
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1402
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:1447
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1415
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:1349
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1419
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:1322
::mlir::TypedValue<::mlir::IntegerType > getCondition()
Definition Ops.h.inc:1340
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1334
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition)
Definition Ops.cpp.inc:1384
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:1353
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1438
::mlir::OpOperand & getConditionMutable()
Definition Ops.h.inc:1344
RequireConstrainOpAdaptor(RequireConstrainOp op)
Definition Ops.cpp.inc:1465
RequireConstrainOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1409
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1467
RequireConstrainOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:1416
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1418
RequireConstrainOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1411
RequireConstrainOpGenericAdaptor(RangeT values, const RequireConstrainOpGenericAdaptorBase &base)
Definition Ops.h.inc:1413
RequireConstrainOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1409
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:1454
::mlir::OpOperand & getConditionMutable()
Definition Ops.h.inc:1476
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:1481
RequireConstrainOpAdaptor Adaptor
Definition Ops.h.inc:1450
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:1453
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:1485
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1502
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1462
::mlir::TypedValue<::mlir::IntegerType > getCondition()
Definition Ops.h.inc:1472
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:1534
RequireConstrainOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:1452
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1489
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition)
Definition Ops.cpp.inc:1471
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1506
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:1458
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1466
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1525
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:69
ContractEndOpGenericAdaptorBase(::mlir::Operation *op)
Definition Ops.h.inc:67
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:60
ContractEndOpGenericAdaptorBase(::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:63
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:242
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:232
ContractOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:236
::std::optional< ::mlir::ArrayAttr > getArgAttrs()
Definition Ops.cpp.inc:244
EnsureComputeOpGenericAdaptorBase(::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:588
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:585
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:594
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:717
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:726
EnsureConstrainOpGenericAdaptorBase(::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:720
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
Definition Ops.cpp.inc:798
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
Definition Ops.cpp.inc:793
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:913
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.cpp.inc:774
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
Definition Ops.cpp.inc:803
::std::optional< ::mlir::ArrayAttr > getTemplateParams()
Definition Ops.cpp.inc:788
IncludeOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:917
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
Definition Ops.h.inc:946
RequireComputeOpGenericAdaptorBase(::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1256
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:1262
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:1253
RequireConstrainOpGenericAdaptorBase(::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1388
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:1385
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:1394
mlir::DenseMap< std::pair< mlir::SymbolRefAttr, Side >, mlir::Attribute > UnificationMap
Optional result from type unifications.
Definition TypeHelper.h:186
llvm::StringLiteral getOperationName()
Get the operation name, like "constrain.eq" for the given OpClass.
Definition OpHelpers.h:32
void setTarget(const ::mlir::SymbolRefAttr &propValue)
Definition Ops.h.inc:215
void setFunctionType(const ::mlir::TypeAttr &propValue)
Definition Ops.h.inc:195
void setSymName(const ::mlir::StringAttr &propValue)
Definition Ops.h.inc:205
void setArgAttrs(const ::mlir::ArrayAttr &propValue)
Definition Ops.h.inc:185
void setMapOpGroupSizes(const ::mlir::DenseI32ArrayAttr &propValue)
Definition Ops.h.inc:865
::llvm::ArrayRef< int32_t > getOperandSegmentSizes() const
Definition Ops.h.inc:890
void setNumDimsPerMap(const ::mlir::DenseI32ArrayAttr &propValue)
Definition Ops.h.inc:875
void setOperandSegmentSizes(::llvm::ArrayRef< int32_t > propValue)
Definition Ops.h.inc:894
void setCallee(const ::mlir::SymbolRefAttr &propValue)
Definition Ops.h.inc:855
void setTemplateParams(const ::mlir::ArrayAttr &propValue)
Definition Ops.h.inc:885