LLZK 3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
Ops.cpp.inc
Go to the documentation of this file.
1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* Op Definitions *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* From: Ops.td *|
7|* *|
8\*===----------------------------------------------------------------------===*/
9
10#ifdef GET_OP_LIST
11#undef GET_OP_LIST
12
29#endif // GET_OP_LIST
30
31#ifdef GET_OP_CLASSES
32#undef GET_OP_CLASSES
33
34
35//===----------------------------------------------------------------------===//
36// Local Utility Method Definitions
37//===----------------------------------------------------------------------===//
38
39namespace llzk {
40namespace verif {
41
42static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops1(
43 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
44 unsigned valueIndex) {
45 if (!((::llvm::isa<::llzk::felt::FeltType>(type)))) {
46 return op->emitOpError(valueKind) << " #" << valueIndex
47 << " must be finite field element, but got " << type;
48 }
49 return ::mlir::success();
50}
51
52static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops2(
53 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
54 unsigned valueIndex) {
55 if (!((type.isSignlessInteger(1)))) {
56 return op->emitOpError(valueKind) << " #" << valueIndex
57 << " must be 1-bit signless integer, but got " << type;
58 }
59 return ::mlir::success();
60}
61
62static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops3(
63 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
64 unsigned valueIndex) {
65 if (!((::llzk::isValidType(type)))) {
66 return op->emitOpError(valueKind) << " #" << valueIndex
67 << " must be variadic of a valid LLZK type, but got " << type;
68 }
69 return ::mlir::success();
70}
71
72static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops4(
73 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
74 unsigned valueIndex) {
75 if (!((::llvm::isa<::mlir::IndexType>(type)))) {
76 return op->emitOpError(valueKind) << " #" << valueIndex
77 << " must be variadic of index, but got " << type;
78 }
79 return ::mlir::success();
80}
81
82static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops5(
83 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
84 unsigned valueIndex) {
85 if (!((::llzk::isValidType(type)))) {
86 return op->emitOpError(valueKind) << " #" << valueIndex
87 << " must be a valid LLZK type, but got " << type;
88 }
89 return ::mlir::success();
90}
91
92static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops6(
93 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
94 unsigned valueIndex) {
95 if (!((::llvm::isa<::llzk::smt::BoolType>(type)))) {
96 return op->emitOpError(valueKind) << " #" << valueIndex
97 << " must be , but got " << type;
98 }
99 return ::mlir::success();
100}
101
102static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops1(
103 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
104 if (attr && !((::llvm::isa<::mlir::StringAttr>(attr))))
105 return emitError() << "attribute '" << attrName
106 << "' failed to satisfy constraint: string attribute";
107 return ::mlir::success();
108}
109static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops1(
110 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
111 return __mlir_ods_local_attr_constraint_Ops1(attr, attrName, [op]() {
112 return op->emitOpError();
113 });
114}
115
116static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops2(
117 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
118 if (attr && !((::llvm::isa<::mlir::SymbolRefAttr>(attr))))
119 return emitError() << "attribute '" << attrName
120 << "' failed to satisfy constraint: symbol reference attribute";
121 return ::mlir::success();
122}
123static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops2(
124 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
125 return __mlir_ods_local_attr_constraint_Ops2(attr, attrName, [op]() {
126 return op->emitOpError();
127 });
128}
129
130static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops3(
131 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
132 if (attr && !(((::llvm::isa<::mlir::TypeAttr>(attr))) && ((::llvm::isa<::mlir::FunctionType>(::llvm::cast<::mlir::TypeAttr>(attr).getValue()))) && ((::llvm::isa<::mlir::FunctionType>(::llvm::cast<::mlir::TypeAttr>(attr).getValue())))))
133 return emitError() << "attribute '" << attrName
134 << "' failed to satisfy constraint: type attribute of function type";
135 return ::mlir::success();
136}
137static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops3(
138 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
139 return __mlir_ods_local_attr_constraint_Ops3(attr, attrName, [op]() {
140 return op->emitOpError();
141 });
142}
143
144static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops4(
145 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
146 if (attr && !(((::llvm::isa<::mlir::ArrayAttr>(attr))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(attr), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::DictionaryAttr>(attr))); }))))
147 return emitError() << "attribute '" << attrName
148 << "' failed to satisfy constraint: Array of dictionary attributes";
149 return ::mlir::success();
150}
151static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops4(
152 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
153 return __mlir_ods_local_attr_constraint_Ops4(attr, attrName, [op]() {
154 return op->emitOpError();
155 });
156}
157
158static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops5(
159 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
160 if (attr && !((::llvm::isa<::mlir::ArrayAttr>(attr))))
161 return emitError() << "attribute '" << attrName
162 << "' failed to satisfy constraint: array attribute";
163 return ::mlir::success();
164}
165static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops5(
166 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
167 return __mlir_ods_local_attr_constraint_Ops5(attr, attrName, [op]() {
168 return op->emitOpError();
169 });
170}
171
172static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops6(
173 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
174 if (attr && !((::llvm::isa<::mlir::DenseI32ArrayAttr>(attr))))
175 return emitError() << "attribute '" << attrName
176 << "' failed to satisfy constraint: i32 dense array attribute";
177 return ::mlir::success();
178}
179static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops6(
180 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
181 return __mlir_ods_local_attr_constraint_Ops6(attr, attrName, [op]() {
182 return op->emitOpError();
183 });
184}
185
186static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops7(
187 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
188 if (attr && !(((::llvm::isa<::mlir::ArrayAttr>(attr))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(attr), [&](::mlir::Attribute attr) { return attr && (((::llvm::isa<::mlir::TypeAttr>(attr))) && ((::llvm::isa<::mlir::Type>(::llvm::cast<::mlir::TypeAttr>(attr).getValue()))) && ((true))); }))))
189 return emitError() << "attribute '" << attrName
190 << "' failed to satisfy constraint: type array attribute";
191 return ::mlir::success();
192}
193static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops7(
194 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
195 return __mlir_ods_local_attr_constraint_Ops7(attr, attrName, [op]() {
196 return op->emitOpError();
197 });
198}
199
200static ::llvm::LogicalResult __mlir_ods_local_region_constraint_Ops1(
201 ::mlir::Operation *op, ::mlir::Region &region, ::llvm::StringRef regionName,
202 unsigned regionIndex) {
203 if (!((true))) {
204 return op->emitOpError("region #") << regionIndex
205 << (regionName.empty() ? " " : " ('" + regionName + "') ")
206 << "failed to verify constraint: any region";
207 }
208 return ::mlir::success();
209}
210
211static ::llvm::LogicalResult __mlir_ods_local_region_constraint_Ops2(
212 ::mlir::Operation *op, ::mlir::Region &region, ::llvm::StringRef regionName,
213 unsigned regionIndex) {
214 if (!((::llvm::hasNItems(region, 1)))) {
215 return op->emitOpError("region #") << regionIndex
216 << (regionName.empty() ? " " : " ('" + regionName + "') ")
217 << "failed to verify constraint: region with 1 blocks";
218 }
219 return ::mlir::success();
220}
221} // namespace verif
222} // namespace llzk
223namespace llzk {
224namespace verif {
225
226//===----------------------------------------------------------------------===//
227// ::llzk::verif::ContractEndOp definitions
228//===----------------------------------------------------------------------===//
229
230namespace detail {
231} // namespace detail
233
234::llvm::LogicalResult ContractEndOpAdaptor::verify(::mlir::Location loc) {
235 return ::mlir::success();
236}
237
238void ContractEndOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
239}
240
241void ContractEndOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
242 assert(resultTypes.size() == 0u && "mismatched number of results");
243 odsState.addTypes(resultTypes);
244}
245
246void ContractEndOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
247 assert(operands.size() == 0u && "mismatched number of parameters");
248 odsState.addOperands(operands);
249 odsState.addAttributes(attributes);
250 assert(resultTypes.size() == 0u && "mismatched number of return types");
251 odsState.addTypes(resultTypes);
252}
253
254::llvm::LogicalResult ContractEndOp::verifyInvariantsImpl() {
255 return ::mlir::success();
256}
257
258::llvm::LogicalResult ContractEndOp::verifyInvariants() {
259 return verifyInvariantsImpl();
260}
261
262::mlir::ParseResult ContractEndOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
263 {
264 auto loc = parser.getCurrentLocation();(void)loc;
265 if (parser.parseOptionalAttrDict(result.attributes))
266 return ::mlir::failure();
267 }
268 return ::mlir::success();
269}
270
271void ContractEndOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
272 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
273 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
274}
275
276void ContractEndOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
277}
278
279} // namespace verif
280} // namespace llzk
281MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::verif::ContractEndOp)
282
283namespace llzk {
284namespace verif {
285
286//===----------------------------------------------------------------------===//
287// ::llzk::verif::ContractOp definitions
288//===----------------------------------------------------------------------===//
289
290namespace detail {
292
294 auto attr = getSymNameAttr();
295 return attr.getValue();
296}
297
299 auto attr = getTargetAttr();
300 return attr;
301}
302
304 auto attr = getFunctionTypeAttr();
305 return ::llvm::cast<::mlir::FunctionType>(attr.getValue());
306}
307
308::std::optional< ::mlir::ArrayAttr > ContractOpGenericAdaptorBase::getArgAttrs() {
309 auto attr = getArgAttrsAttr();
310 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
311}
312
313} // namespace detail
315
316::llvm::LogicalResult ContractOpAdaptor::verify(::mlir::Location loc) {
317 auto tblgen_arg_attrs = getProperties().arg_attrs; (void)tblgen_arg_attrs;
318 auto tblgen_function_type = getProperties().function_type; (void)tblgen_function_type;
319 if (!tblgen_function_type) return emitError(loc, "'verif.contract' op ""requires attribute 'function_type'");
320 auto tblgen_sym_name = getProperties().sym_name; (void)tblgen_sym_name;
321 if (!tblgen_sym_name) return emitError(loc, "'verif.contract' op ""requires attribute 'sym_name'");
322 auto tblgen_target = getProperties().target; (void)tblgen_target;
323 if (!tblgen_target) return emitError(loc, "'verif.contract' op ""requires attribute 'target'");
324
325 if (tblgen_sym_name && !((::llvm::isa<::mlir::StringAttr>(tblgen_sym_name))))
326 return emitError(loc, "'verif.contract' op ""attribute 'sym_name' failed to satisfy constraint: string attribute");
327
328 if (tblgen_target && !((::llvm::isa<::mlir::SymbolRefAttr>(tblgen_target))))
329 return emitError(loc, "'verif.contract' op ""attribute 'target' failed to satisfy constraint: symbol reference attribute");
330
331 if (tblgen_function_type && !(((::llvm::isa<::mlir::TypeAttr>(tblgen_function_type))) && ((::llvm::isa<::mlir::FunctionType>(::llvm::cast<::mlir::TypeAttr>(tblgen_function_type).getValue()))) && ((::llvm::isa<::mlir::FunctionType>(::llvm::cast<::mlir::TypeAttr>(tblgen_function_type).getValue())))))
332 return emitError(loc, "'verif.contract' op ""attribute 'function_type' failed to satisfy constraint: type attribute of function type");
333
334 if (tblgen_arg_attrs && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_arg_attrs))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_arg_attrs), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::DictionaryAttr>(attr))); }))))
335 return emitError(loc, "'verif.contract' op ""attribute 'arg_attrs' failed to satisfy constraint: Array of dictionary attributes");
336 return ::mlir::success();
337}
338
339::llvm::LogicalResult ContractOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
340 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
341 if (!dict) {
342 emitError() << "expected DictionaryAttr to set properties";
343 return ::mlir::failure();
344 }
345
346 {
347 auto &propStorage = prop.arg_attrs;
348 auto attr = dict.get("arg_attrs");
349 if (attr) {
350 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
351 if (convertedAttr) {
352 propStorage = convertedAttr;
353 } else {
354 emitError() << "Invalid attribute `arg_attrs` in property conversion: " << attr;
355 return ::mlir::failure();
356 }
357 }
358 }
359
360 {
361 auto &propStorage = prop.function_type;
362 auto attr = dict.get("function_type");
363 if (attr) {
364 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
365 if (convertedAttr) {
366 propStorage = convertedAttr;
367 } else {
368 emitError() << "Invalid attribute `function_type` in property conversion: " << attr;
369 return ::mlir::failure();
370 }
371 }
372 }
373
374 {
375 auto &propStorage = prop.sym_name;
376 auto attr = dict.get("sym_name");
377 if (attr) {
378 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
379 if (convertedAttr) {
380 propStorage = convertedAttr;
381 } else {
382 emitError() << "Invalid attribute `sym_name` in property conversion: " << attr;
383 return ::mlir::failure();
384 }
385 }
386 }
387
388 {
389 auto &propStorage = prop.target;
390 auto attr = dict.get("target");
391 if (attr) {
392 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
393 if (convertedAttr) {
394 propStorage = convertedAttr;
395 } else {
396 emitError() << "Invalid attribute `target` in property conversion: " << attr;
397 return ::mlir::failure();
398 }
399 }
400 }
401 return ::mlir::success();
402}
403
404::mlir::Attribute ContractOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
405 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
406 ::mlir::Builder odsBuilder{ctx};
407
408 {
409 const auto &propStorage = prop.arg_attrs;
410 if (propStorage)
411 attrs.push_back(odsBuilder.getNamedAttr("arg_attrs",
412 propStorage));
413 }
414
415 {
416 const auto &propStorage = prop.function_type;
417 if (propStorage)
418 attrs.push_back(odsBuilder.getNamedAttr("function_type",
419 propStorage));
420 }
421
422 {
423 const auto &propStorage = prop.sym_name;
424 if (propStorage)
425 attrs.push_back(odsBuilder.getNamedAttr("sym_name",
426 propStorage));
427 }
428
429 {
430 const auto &propStorage = prop.target;
431 if (propStorage)
432 attrs.push_back(odsBuilder.getNamedAttr("target",
433 propStorage));
434 }
435
436 if (!attrs.empty())
437 return odsBuilder.getDictionaryAttr(attrs);
438 return {};
439}
440
441llvm::hash_code ContractOp::computePropertiesHash(const Properties &prop) {
442 return llvm::hash_combine(
443 llvm::hash_value(prop.arg_attrs.getAsOpaquePointer()),
444 llvm::hash_value(prop.function_type.getAsOpaquePointer()),
445 llvm::hash_value(prop.sym_name.getAsOpaquePointer()),
446 llvm::hash_value(prop.target.getAsOpaquePointer()));
447}
448
449std::optional<mlir::Attribute> ContractOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
450 if (name == "arg_attrs")
451 return prop.arg_attrs;
452
453 if (name == "function_type")
454 return prop.function_type;
455
456 if (name == "sym_name")
457 return prop.sym_name;
458
459 if (name == "target")
460 return prop.target;
461 return std::nullopt;
462}
463
464void ContractOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
465 if (name == "arg_attrs") {
466 prop.arg_attrs = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.arg_attrs)>>(value);
467 return;
468 }
469
470 if (name == "function_type") {
471 prop.function_type = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.function_type)>>(value);
472 return;
473 }
474
475 if (name == "sym_name") {
476 prop.sym_name = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.sym_name)>>(value);
477 return;
478 }
479
480 if (name == "target") {
481 prop.target = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.target)>>(value);
482 return;
483 }
484}
485
486void ContractOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
487 if (prop.arg_attrs) attrs.append("arg_attrs", prop.arg_attrs);
488
489 if (prop.function_type) attrs.append("function_type", prop.function_type);
490
491 if (prop.sym_name) attrs.append("sym_name", prop.sym_name);
492
493 if (prop.target) attrs.append("target", prop.target);
494}
495
496::llvm::LogicalResult ContractOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
497 {
498 ::mlir::Attribute attr = attrs.get(getArgAttrsAttrName(opName));
499 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops4(attr, "arg_attrs", emitError)))
500 return ::mlir::failure();
501 }
502
503 {
504 ::mlir::Attribute attr = attrs.get(getFunctionTypeAttrName(opName));
505 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops3(attr, "function_type", emitError)))
506 return ::mlir::failure();
507 }
508
509 {
510 ::mlir::Attribute attr = attrs.get(getSymNameAttrName(opName));
511 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(attr, "sym_name", emitError)))
512 return ::mlir::failure();
513 }
514
515 {
516 ::mlir::Attribute attr = attrs.get(getTargetAttrName(opName));
517 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(attr, "target", emitError)))
518 return ::mlir::failure();
519 }
520 return ::mlir::success();
521}
522
523::llvm::LogicalResult ContractOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
524 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
525 if (::mlir::failed(reader.readOptionalAttribute(prop.arg_attrs)))
526 return ::mlir::failure();
527
528 if (::mlir::failed(reader.readAttribute(prop.function_type)))
529 return ::mlir::failure();
530
531 if (::mlir::failed(reader.readAttribute(prop.sym_name)))
532 return ::mlir::failure();
533
534 if (::mlir::failed(reader.readAttribute(prop.target)))
535 return ::mlir::failure();
536 return ::mlir::success();
537}
538
539void ContractOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
540 auto &prop = getProperties(); (void)prop;
541
542 writer.writeOptionalAttribute(prop.arg_attrs);
543 writer.writeAttribute(prop.function_type);
544 writer.writeAttribute(prop.sym_name);
545 writer.writeAttribute(prop.target);
546}
547
548::llvm::StringRef ContractOp::getSymName() {
549 auto attr = getSymNameAttr();
550 return attr.getValue();
551}
552
553::mlir::SymbolRefAttr ContractOp::getTarget() {
554 auto attr = getTargetAttr();
555 return attr;
556}
557
558::mlir::FunctionType ContractOp::getFunctionType() {
559 auto attr = getFunctionTypeAttr();
560 return ::llvm::cast<::mlir::FunctionType>(attr.getValue());
561}
562
563::std::optional< ::mlir::ArrayAttr > ContractOp::getArgAttrs() {
564 auto attr = getArgAttrsAttr();
565 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
566}
567
568void ContractOp::setSymName(::llvm::StringRef attrValue) {
569 getProperties().sym_name = ::mlir::Builder((*this)->getContext()).getStringAttr(attrValue);
570}
571
572void ContractOp::setFunctionType(::mlir::FunctionType attrValue) {
573 getProperties().function_type = ::mlir::TypeAttr::get(attrValue);
574}
575
576void ContractOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, ::mlir::SymbolRefAttr target, ::mlir::TypeAttr function_type, ::mlir::ArrayAttr arg_attrs) {
577 build(odsBuilder, odsState, ::mlir::TypeRange {}, sym_name, target, function_type, arg_attrs);
578
579}
580
581void ContractOp::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) {
582 odsState.getOrAddProperties<Properties>().sym_name = sym_name;
583 odsState.getOrAddProperties<Properties>().target = target;
584 odsState.getOrAddProperties<Properties>().function_type = function_type;
585 if (arg_attrs) {
586 odsState.getOrAddProperties<Properties>().arg_attrs = arg_attrs;
587 }
588 initializeEmptyBody(
589 odsBuilder, odsState, ::mlir::cast<::mlir::FunctionType>(function_type.getValue())
590 );
591 assert(resultTypes.size() == 0u && "mismatched number of results");
592 odsState.addTypes(resultTypes);
593
594}
595
596void ContractOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef sym_name, ::mlir::SymbolRefAttr target, ::mlir::FunctionType function_type, ::mlir::ArrayAttr arg_attrs) {
597 build(odsBuilder, odsState, ::mlir::TypeRange {}, sym_name, target, function_type, arg_attrs);
598
599}
600
601void ContractOp::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) {
602 odsState.getOrAddProperties<Properties>().sym_name = odsBuilder.getStringAttr(sym_name);
603 odsState.getOrAddProperties<Properties>().target = target;
604 odsState.getOrAddProperties<Properties>().function_type = ::mlir::TypeAttr::get(function_type);
605 if (arg_attrs) {
606 odsState.getOrAddProperties<Properties>().arg_attrs = arg_attrs;
607 }
608 initializeEmptyBody(odsBuilder, odsState, function_type);
609 assert(resultTypes.size() == 0u && "mismatched number of results");
610 odsState.addTypes(resultTypes);
611
612}
613
614::llvm::LogicalResult ContractOp::verifyInvariantsImpl() {
615 auto tblgen_arg_attrs = getProperties().arg_attrs; (void)tblgen_arg_attrs;
616 auto tblgen_function_type = getProperties().function_type; (void)tblgen_function_type;
617 if (!tblgen_function_type) return emitOpError("requires attribute 'function_type'");
618 auto tblgen_sym_name = getProperties().sym_name; (void)tblgen_sym_name;
619 if (!tblgen_sym_name) return emitOpError("requires attribute 'sym_name'");
620 auto tblgen_target = getProperties().target; (void)tblgen_target;
621 if (!tblgen_target) return emitOpError("requires attribute 'target'");
622
623 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(*this, tblgen_sym_name, "sym_name")))
624 return ::mlir::failure();
625
626 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(*this, tblgen_target, "target")))
627 return ::mlir::failure();
628
629 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops3(*this, tblgen_function_type, "function_type")))
630 return ::mlir::failure();
631
632 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops4(*this, tblgen_arg_attrs, "arg_attrs")))
633 return ::mlir::failure();
634 {
635 unsigned index = 0; (void)index;
636
637 for (auto &region : ::llvm::MutableArrayRef((*this)->getRegion(0)))
638 if (::mlir::failed(__mlir_ods_local_region_constraint_Ops1(*this, region, "body", index++)))
639 return ::mlir::failure();
640 }
641 return ::mlir::success();
642}
643
644::llvm::LogicalResult ContractOp::verifyInvariants() {
645 if(::mlir::succeeded(verifyInvariantsImpl()) && ::mlir::succeeded(verify()))
646 return ::mlir::success();
647 return ::mlir::failure();
648}
649
650} // namespace verif
651} // namespace llzk
652MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::verif::ContractOp)
653
654namespace llzk {
655namespace verif {
656
657//===----------------------------------------------------------------------===//
658// ::llzk::verif::DecreasesOp definitions
659//===----------------------------------------------------------------------===//
660
661namespace detail {
662} // namespace detail
664
665::llvm::LogicalResult DecreasesOpAdaptor::verify(::mlir::Location loc) {
666 return ::mlir::success();
667}
668
669void DecreasesOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value) {
670 odsState.addOperands(value);
671}
672
673void DecreasesOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value value) {
674 odsState.addOperands(value);
675 assert(resultTypes.size() == 0u && "mismatched number of results");
676 odsState.addTypes(resultTypes);
677}
678
679void DecreasesOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
680 assert(operands.size() == 1u && "mismatched number of parameters");
681 odsState.addOperands(operands);
682 odsState.addAttributes(attributes);
683 assert(resultTypes.size() == 0u && "mismatched number of return types");
684 odsState.addTypes(resultTypes);
685}
686
687::llvm::LogicalResult DecreasesOp::verifyInvariantsImpl() {
688 {
689 unsigned index = 0; (void)index;
690 auto valueGroup0 = getODSOperands(0);
691
692 for (auto v : valueGroup0) {
693 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
694 return ::mlir::failure();
695 }
696 }
697 return ::mlir::success();
698}
699
700::llvm::LogicalResult DecreasesOp::verifyInvariants() {
701 return verifyInvariantsImpl();
702}
703
704::mlir::ParseResult DecreasesOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
705 ::mlir::OpAsmParser::UnresolvedOperand valueRawOperand{};
706 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> valueOperands(&valueRawOperand, 1); ::llvm::SMLoc valueOperandsLoc;
707 (void)valueOperandsLoc;
708
709 valueOperandsLoc = parser.getCurrentLocation();
710 if (parser.parseOperand(valueRawOperand))
711 return ::mlir::failure();
712 {
713 auto loc = parser.getCurrentLocation();(void)loc;
714 if (parser.parseOptionalAttrDict(result.attributes))
715 return ::mlir::failure();
716 }
717 ::mlir::Type odsBuildableType0 = ::llzk::felt::FeltType::get(parser.getBuilder().getContext());
718 if (parser.resolveOperands(valueOperands, odsBuildableType0, valueOperandsLoc, result.operands))
719 return ::mlir::failure();
720 return ::mlir::success();
721}
722
723void DecreasesOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
724 _odsPrinter << ' ';
725 _odsPrinter << getValue();
726 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
727 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
728}
729
730// This side effect models "program termination". Based on
731// https://github.com/llvm/llvm-project/blob/f325e4b2d836d6e65a4d0cf3efc6b0996ccf3765/mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp#L92-L97
733 ::mlir::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects
734) {
735 effects.emplace_back(::mlir::MemoryEffects::Write::get());
736}
737} // namespace verif
738} // namespace llzk
739MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::verif::DecreasesOp)
740
741namespace llzk {
742namespace verif {
743
744//===----------------------------------------------------------------------===//
745// ::llzk::verif::EnsureComputeOp definitions
746//===----------------------------------------------------------------------===//
747
748namespace detail {
749} // namespace detail
751
752::llvm::LogicalResult EnsureComputeOpAdaptor::verify(::mlir::Location loc) {
753 return ::mlir::success();
754}
755
756void EnsureComputeOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition) {
757 odsState.addOperands(condition);
758}
759
760void EnsureComputeOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
761 odsState.addOperands(condition);
762 assert(resultTypes.size() == 0u && "mismatched number of results");
763 odsState.addTypes(resultTypes);
764}
765
766void EnsureComputeOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
767 assert(operands.size() == 1u && "mismatched number of parameters");
768 odsState.addOperands(operands);
769 odsState.addAttributes(attributes);
770 assert(resultTypes.size() == 0u && "mismatched number of return types");
771 odsState.addTypes(resultTypes);
772}
773
775 {
776 unsigned index = 0; (void)index;
777 auto valueGroup0 = getODSOperands(0);
778
779 for (auto v : valueGroup0) {
780 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "operand", index++)))
781 return ::mlir::failure();
782 }
783 }
784 return ::mlir::success();
785}
786
787::llvm::LogicalResult EnsureComputeOp::verifyInvariants() {
788 return verifyInvariantsImpl();
789}
790
791::mlir::ParseResult EnsureComputeOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
792 ::mlir::OpAsmParser::UnresolvedOperand conditionRawOperand{};
793 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> conditionOperands(&conditionRawOperand, 1); ::llvm::SMLoc conditionOperandsLoc;
794 (void)conditionOperandsLoc;
795
796 conditionOperandsLoc = parser.getCurrentLocation();
797 if (parser.parseOperand(conditionRawOperand))
798 return ::mlir::failure();
799 {
800 auto loc = parser.getCurrentLocation();(void)loc;
801 if (parser.parseOptionalAttrDict(result.attributes))
802 return ::mlir::failure();
803 }
804 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
805 if (parser.resolveOperands(conditionOperands, odsBuildableType0, conditionOperandsLoc, result.operands))
806 return ::mlir::failure();
807 return ::mlir::success();
808}
809
810void EnsureComputeOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
811 _odsPrinter << ' ';
812 _odsPrinter << getCondition();
813 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
814 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
815}
816
817// This side effect models "program termination". Based on
818// https://github.com/llvm/llvm-project/blob/f325e4b2d836d6e65a4d0cf3efc6b0996ccf3765/mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp#L92-L97
820 ::mlir::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects
821) {
822 effects.emplace_back(::mlir::MemoryEffects::Write::get());
823}
824} // namespace verif
825} // namespace llzk
826MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::verif::EnsureComputeOp)
827
828namespace llzk {
829namespace verif {
830
831//===----------------------------------------------------------------------===//
832// ::llzk::verif::EnsureConstrainOp definitions
833//===----------------------------------------------------------------------===//
834
835namespace detail {
836} // namespace detail
838
839::llvm::LogicalResult EnsureConstrainOpAdaptor::verify(::mlir::Location loc) {
840 return ::mlir::success();
841}
842
843void EnsureConstrainOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition) {
844 odsState.addOperands(condition);
845}
846
847void EnsureConstrainOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
848 odsState.addOperands(condition);
849 assert(resultTypes.size() == 0u && "mismatched number of results");
850 odsState.addTypes(resultTypes);
851}
852
853void EnsureConstrainOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
854 assert(operands.size() == 1u && "mismatched number of parameters");
855 odsState.addOperands(operands);
856 odsState.addAttributes(attributes);
857 assert(resultTypes.size() == 0u && "mismatched number of return types");
858 odsState.addTypes(resultTypes);
859}
860
862 {
863 unsigned index = 0; (void)index;
864 auto valueGroup0 = getODSOperands(0);
865
866 for (auto v : valueGroup0) {
867 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "operand", index++)))
868 return ::mlir::failure();
869 }
870 }
871 return ::mlir::success();
872}
873
874::llvm::LogicalResult EnsureConstrainOp::verifyInvariants() {
875 return verifyInvariantsImpl();
876}
877
878::mlir::ParseResult EnsureConstrainOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
879 ::mlir::OpAsmParser::UnresolvedOperand conditionRawOperand{};
880 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> conditionOperands(&conditionRawOperand, 1); ::llvm::SMLoc conditionOperandsLoc;
881 (void)conditionOperandsLoc;
882
883 conditionOperandsLoc = parser.getCurrentLocation();
884 if (parser.parseOperand(conditionRawOperand))
885 return ::mlir::failure();
886 {
887 auto loc = parser.getCurrentLocation();(void)loc;
888 if (parser.parseOptionalAttrDict(result.attributes))
889 return ::mlir::failure();
890 }
891 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
892 if (parser.resolveOperands(conditionOperands, odsBuildableType0, conditionOperandsLoc, result.operands))
893 return ::mlir::failure();
894 return ::mlir::success();
895}
896
897void EnsureConstrainOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
898 _odsPrinter << ' ';
899 _odsPrinter << getCondition();
900 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
901 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
902}
903
904// This side effect models "program termination". Based on
905// https://github.com/llvm/llvm-project/blob/f325e4b2d836d6e65a4d0cf3efc6b0996ccf3765/mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp#L92-L97
907 ::mlir::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects
908) {
909 effects.emplace_back(::mlir::MemoryEffects::Write::get());
910}
911} // namespace verif
912} // namespace llzk
913MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::verif::EnsureConstrainOp)
914
915namespace llzk {
916namespace verif {
917
918//===----------------------------------------------------------------------===//
919// ::llzk::verif::IncludeOp definitions
920//===----------------------------------------------------------------------===//
921
922namespace detail {
923IncludeOpGenericAdaptorBase::IncludeOpGenericAdaptorBase(IncludeOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
924
925std::pair<unsigned, unsigned> IncludeOpGenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
926 ::llvm::ArrayRef<int32_t> sizeAttr = getProperties().operandSegmentSizes;
927
928 unsigned start = 0;
929 for (unsigned i = 0; i < index; ++i)
930 start += sizeAttr[i];
931 return {start, sizeAttr[index]};
932}
933
935 auto attr = getCalleeAttr();
936 return attr;
937}
938
939::std::optional< ::mlir::ArrayAttr > IncludeOpGenericAdaptorBase::getTemplateParams() {
940 auto attr = getTemplateParamsAttr();
941 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
942}
943
945 auto attr = ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(getProperties().numDimsPerMap);
946 return attr;
947}
948
950 auto attr = getNumDimsPerMapAttr();
951 return attr;
952}
953
955 auto attr = getMapOpGroupSizesAttr();
956 return attr;
957}
958
959} // namespace detail
961
962::llvm::LogicalResult IncludeOpAdaptor::verify(::mlir::Location loc) {
963 auto tblgen_callee = getProperties().callee; (void)tblgen_callee;
964 if (!tblgen_callee) return emitError(loc, "'verif.include' op ""requires attribute 'callee'");
965 auto tblgen_mapOpGroupSizes = getProperties().mapOpGroupSizes; (void)tblgen_mapOpGroupSizes;
966 if (!tblgen_mapOpGroupSizes) return emitError(loc, "'verif.include' op ""requires attribute 'mapOpGroupSizes'");
967 auto tblgen_numDimsPerMap = getProperties().numDimsPerMap; (void)tblgen_numDimsPerMap;
968 auto tblgen_templateParams = getProperties().templateParams; (void)tblgen_templateParams;
969
970 if (tblgen_callee && !((::llvm::isa<::mlir::SymbolRefAttr>(tblgen_callee))))
971 return emitError(loc, "'verif.include' op ""attribute 'callee' failed to satisfy constraint: symbol reference attribute");
972
973 if (tblgen_templateParams && !((::llvm::isa<::mlir::ArrayAttr>(tblgen_templateParams))))
974 return emitError(loc, "'verif.include' op ""attribute 'templateParams' failed to satisfy constraint: array attribute");
975
976 if (tblgen_numDimsPerMap && !((::llvm::isa<::mlir::DenseI32ArrayAttr>(tblgen_numDimsPerMap))))
977 return emitError(loc, "'verif.include' op ""attribute 'numDimsPerMap' failed to satisfy constraint: i32 dense array attribute");
978
979 if (tblgen_mapOpGroupSizes && !((::llvm::isa<::mlir::DenseI32ArrayAttr>(tblgen_mapOpGroupSizes))))
980 return emitError(loc, "'verif.include' op ""attribute 'mapOpGroupSizes' failed to satisfy constraint: i32 dense array attribute");
981 return ::mlir::success();
982}
983
984std::pair<unsigned, unsigned> IncludeOp::getODSOperandIndexAndLength(unsigned index) {
985 ::llvm::ArrayRef<int32_t> sizeAttr = getProperties().operandSegmentSizes;
986
987 unsigned start = 0;
988 for (unsigned i = 0; i < index; ++i)
989 start += sizeAttr[i];
990 return {start, sizeAttr[index]};
991}
992
993::mlir::MutableOperandRange IncludeOp::getArgOperandsMutable() {
994 auto range = getODSOperandIndexAndLength(0);
995 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second, ::mlir::MutableOperandRange::OperandSegment(0u, {getOperandSegmentSizesAttrName(), ::mlir::DenseI32ArrayAttr::get(getContext(), getProperties().operandSegmentSizes)}));
996 return mutableRange;
997}
998
999::mlir::MutableOperandRangeRange IncludeOp::getMapOperandsMutable() {
1000 auto range = getODSOperandIndexAndLength(1);
1001 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second, ::mlir::MutableOperandRange::OperandSegment(1u, {getOperandSegmentSizesAttrName(), ::mlir::DenseI32ArrayAttr::get(getContext(), getProperties().operandSegmentSizes)}));
1002 return mutableRange.split(*(*this)->getAttrDictionary().getNamed(getMapOpGroupSizesAttrName()));
1003}
1004
1005::llvm::LogicalResult IncludeOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1006 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
1007 if (!dict) {
1008 emitError() << "expected DictionaryAttr to set properties";
1009 return ::mlir::failure();
1010 }
1011
1012 {
1013 auto &propStorage = prop.callee;
1014 auto attr = dict.get("callee");
1015 if (attr) {
1016 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
1017 if (convertedAttr) {
1018 propStorage = convertedAttr;
1019 } else {
1020 emitError() << "Invalid attribute `callee` in property conversion: " << attr;
1021 return ::mlir::failure();
1022 }
1023 }
1024 }
1025
1026 {
1027 auto &propStorage = prop.mapOpGroupSizes;
1028 auto attr = dict.get("mapOpGroupSizes");
1029 if (attr) {
1030 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
1031 if (convertedAttr) {
1032 propStorage = convertedAttr;
1033 } else {
1034 emitError() << "Invalid attribute `mapOpGroupSizes` in property conversion: " << attr;
1035 return ::mlir::failure();
1036 }
1037 }
1038 }
1039
1040 {
1041 auto &propStorage = prop.numDimsPerMap;
1042 auto attr = dict.get("numDimsPerMap");
1043 if (attr) {
1044 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
1045 if (convertedAttr) {
1046 propStorage = convertedAttr;
1047 } else {
1048 emitError() << "Invalid attribute `numDimsPerMap` in property conversion: " << attr;
1049 return ::mlir::failure();
1050 }
1051 }
1052 }
1053
1054 {
1055 auto &propStorage = prop.templateParams;
1056 auto attr = dict.get("templateParams");
1057 if (attr) {
1058 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
1059 if (convertedAttr) {
1060 propStorage = convertedAttr;
1061 } else {
1062 emitError() << "Invalid attribute `templateParams` in property conversion: " << attr;
1063 return ::mlir::failure();
1064 }
1065 }
1066 }
1067{
1068
1069 auto setFromAttr = [] (auto &propStorage, ::mlir::Attribute propAttr,
1070 ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) -> ::mlir::LogicalResult {
1071 return convertFromAttribute(propStorage, propAttr, emitError);
1072 };
1073 auto attr = dict.get("operandSegmentSizes"); if (!attr) attr = dict.get("operand_segment_sizes");;
1074;
1075 if (attr && ::mlir::failed(setFromAttr(prop.operandSegmentSizes, attr, emitError)))
1076 return ::mlir::failure();
1077 }
1078 return ::mlir::success();
1079}
1080
1081::mlir::Attribute IncludeOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
1082 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
1083 ::mlir::Builder odsBuilder{ctx};
1084
1085 {
1086 const auto &propStorage = prop.callee;
1087 if (propStorage)
1088 attrs.push_back(odsBuilder.getNamedAttr("callee",
1089 propStorage));
1090 }
1091
1092 {
1093 const auto &propStorage = prop.mapOpGroupSizes;
1094 if (propStorage)
1095 attrs.push_back(odsBuilder.getNamedAttr("mapOpGroupSizes",
1096 propStorage));
1097 }
1098
1099 {
1100 const auto &propStorage = prop.numDimsPerMap;
1101 if (propStorage)
1102 attrs.push_back(odsBuilder.getNamedAttr("numDimsPerMap",
1103 propStorage));
1104 }
1105
1106 {
1107 const auto &propStorage = prop.templateParams;
1108 if (propStorage)
1109 attrs.push_back(odsBuilder.getNamedAttr("templateParams",
1110 propStorage));
1111 }
1112
1113 {
1114 const auto &propStorage = prop.operandSegmentSizes;
1115 auto attr = [&]() -> ::mlir::Attribute {
1116 return ::mlir::DenseI32ArrayAttr::get(ctx, propStorage);
1117 }();
1118 attrs.push_back(odsBuilder.getNamedAttr("operandSegmentSizes", attr));
1119 }
1120
1121 if (!attrs.empty())
1122 return odsBuilder.getDictionaryAttr(attrs);
1123 return {};
1124}
1125
1126llvm::hash_code IncludeOp::computePropertiesHash(const Properties &prop) {
1127 auto hash_operandSegmentSizes = [] (const auto &propStorage) -> llvm::hash_code {
1128 return ::llvm::hash_combine_range(std::begin(propStorage), std::end(propStorage));;
1129 };
1130 return llvm::hash_combine(
1131 llvm::hash_value(prop.callee.getAsOpaquePointer()),
1132 llvm::hash_value(prop.mapOpGroupSizes.getAsOpaquePointer()),
1133 llvm::hash_value(prop.numDimsPerMap.getAsOpaquePointer()),
1134 llvm::hash_value(prop.templateParams.getAsOpaquePointer()),
1135 hash_operandSegmentSizes(prop.operandSegmentSizes));
1136}
1137
1138std::optional<mlir::Attribute> IncludeOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
1139 if (name == "callee")
1140 return prop.callee;
1141
1142 if (name == "mapOpGroupSizes")
1143 return prop.mapOpGroupSizes;
1144
1145 if (name == "numDimsPerMap")
1146 return prop.numDimsPerMap;
1147
1148 if (name == "templateParams")
1149 return prop.templateParams;
1150 if (name == "operand_segment_sizes" || name == "operandSegmentSizes") return [&]() -> ::mlir::Attribute { return ::mlir::DenseI32ArrayAttr::get(ctx, prop.operandSegmentSizes); }();
1151 return std::nullopt;
1152}
1153
1154void IncludeOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
1155 if (name == "callee") {
1156 prop.callee = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.callee)>>(value);
1157 return;
1158 }
1159
1160 if (name == "mapOpGroupSizes") {
1161 prop.mapOpGroupSizes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.mapOpGroupSizes)>>(value);
1162 return;
1163 }
1164
1165 if (name == "numDimsPerMap") {
1166 prop.numDimsPerMap = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.numDimsPerMap)>>(value);
1167 return;
1168 }
1169
1170 if (name == "templateParams") {
1171 prop.templateParams = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.templateParams)>>(value);
1172 return;
1173 }
1174 if (name == "operand_segment_sizes" || name == "operandSegmentSizes") {
1175 auto arrAttr = ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(value);
1176 if (!arrAttr) return;
1177 if (arrAttr.size() != sizeof(prop.operandSegmentSizes) / sizeof(int32_t))
1178 return;
1179 llvm::copy(arrAttr.asArrayRef(), prop.operandSegmentSizes.begin());
1180 return;
1181 }
1182}
1183
1184void IncludeOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
1185 if (prop.callee) attrs.append("callee", prop.callee);
1186
1187 if (prop.mapOpGroupSizes) attrs.append("mapOpGroupSizes", prop.mapOpGroupSizes);
1188
1189 if (prop.numDimsPerMap) attrs.append("numDimsPerMap", prop.numDimsPerMap);
1190
1191 if (prop.templateParams) attrs.append("templateParams", prop.templateParams);
1192 attrs.append("operandSegmentSizes", [&]() -> ::mlir::Attribute { return ::mlir::DenseI32ArrayAttr::get(ctx, prop.operandSegmentSizes); }());
1193}
1194
1195::llvm::LogicalResult IncludeOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1196 {
1197 ::mlir::Attribute attr = attrs.get(getCalleeAttrName(opName));
1198 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(attr, "callee", emitError)))
1199 return ::mlir::failure();
1200 }
1201
1202 {
1203 ::mlir::Attribute attr = attrs.get(getMapOpGroupSizesAttrName(opName));
1204 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops6(attr, "mapOpGroupSizes", emitError)))
1205 return ::mlir::failure();
1206 }
1207
1208 {
1209 ::mlir::Attribute attr = attrs.get(getNumDimsPerMapAttrName(opName));
1210 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops6(attr, "numDimsPerMap", emitError)))
1211 return ::mlir::failure();
1212 }
1213
1214 {
1215 ::mlir::Attribute attr = attrs.get(getTemplateParamsAttrName(opName));
1216 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops5(attr, "templateParams", emitError)))
1217 return ::mlir::failure();
1218 }
1219 return ::mlir::success();
1220}
1221
1222::llvm::LogicalResult IncludeOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
1223 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
1224 if (::mlir::failed(reader.readAttribute(prop.callee)))
1225 return ::mlir::failure();
1226
1227 if (::mlir::failed(reader.readAttribute(prop.mapOpGroupSizes)))
1228 return ::mlir::failure();
1229
1230 if (::mlir::failed(reader.readOptionalAttribute(prop.numDimsPerMap)))
1231 return ::mlir::failure();
1232
1233 if (reader.getBytecodeVersion() < /*kNativePropertiesODSSegmentSize=*/6) {
1234 auto &propStorage = prop.operandSegmentSizes;
1235 ::mlir::DenseI32ArrayAttr attr;
1236 if (::mlir::failed(reader.readAttribute(attr))) return ::mlir::failure();
1237 if (attr.size() > static_cast<int64_t>(sizeof(propStorage) / sizeof(int32_t))) {
1238 reader.emitError("size mismatch for operand/result_segment_size");
1239 return ::mlir::failure();
1240 }
1241 ::llvm::copy(::llvm::ArrayRef<int32_t>(attr), propStorage.begin());
1242 }
1243
1244 if (::mlir::failed(reader.readOptionalAttribute(prop.templateParams)))
1245 return ::mlir::failure();
1246
1247 {
1248 auto &propStorage = prop.operandSegmentSizes;
1249 auto readProp = [&]() {
1250
1251 if (reader.getBytecodeVersion() >= /*kNativePropertiesODSSegmentSize=*/6)
1252 return reader.readSparseArray(::llvm::MutableArrayRef(propStorage));
1253;
1254 return ::mlir::success();
1255 };
1256 if (::mlir::failed(readProp()))
1257 return ::mlir::failure();
1258 }
1259 return ::mlir::success();
1260}
1261
1262void IncludeOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
1263 auto &prop = getProperties(); (void)prop;
1264 writer.writeAttribute(prop.callee);
1265 writer.writeAttribute(prop.mapOpGroupSizes);
1266
1267 writer.writeOptionalAttribute(prop.numDimsPerMap);
1268
1269if (writer.getBytecodeVersion() < /*kNativePropertiesODSSegmentSize=*/6) {
1270 auto &propStorage = prop.operandSegmentSizes;
1271 writer.writeAttribute(::mlir::DenseI32ArrayAttr::get(this->getContext(), propStorage));
1272}
1273
1274 writer.writeOptionalAttribute(prop.templateParams);
1275
1276 {
1277 auto &propStorage = prop.operandSegmentSizes;
1278
1279 if (writer.getBytecodeVersion() >= /*kNativePropertiesODSSegmentSize=*/6)
1280 writer.writeSparseArray(::llvm::ArrayRef(propStorage));
1281;
1282 }
1283}
1284
1285::mlir::SymbolRefAttr IncludeOp::getCallee() {
1286 auto attr = getCalleeAttr();
1287 return attr;
1288}
1289
1290::std::optional< ::mlir::ArrayAttr > IncludeOp::getTemplateParams() {
1291 auto attr = getTemplateParamsAttr();
1292 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
1293}
1294
1295::llvm::ArrayRef<int32_t> IncludeOp::getNumDimsPerMap() {
1296 auto attr = getNumDimsPerMapAttr();
1297 return attr;
1298}
1299
1300::llvm::ArrayRef<int32_t> IncludeOp::getMapOpGroupSizes() {
1301 auto attr = getMapOpGroupSizesAttr();
1302 return attr;
1303}
1304
1305void IncludeOp::setNumDimsPerMap(::llvm::ArrayRef<int32_t> attrValue) {
1306 getProperties().numDimsPerMap = ::mlir::Builder((*this)->getContext()).getDenseI32ArrayAttr(attrValue);
1307}
1308
1309void IncludeOp::setMapOpGroupSizes(::llvm::ArrayRef<int32_t> attrValue) {
1310 getProperties().mapOpGroupSizes = ::mlir::Builder((*this)->getContext()).getDenseI32ArrayAttr(attrValue);
1311}
1312
1313void IncludeOp::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) {
1314 build(odsBuilder, odsState, callee, mapOperands,
1315 odsBuilder.getDenseI32ArrayAttr(numDimsPerMap),
1316 argOperands, templateParams);
1317
1318}
1319
1320void IncludeOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::verif::ContractOp callee, ::mlir::ValueRange argOperands, ::llvm::ArrayRef<::mlir::Attribute> templateParams) {
1321 build(odsBuilder, odsState,
1322 callee.getFullyQualifiedName(false),
1323 argOperands, templateParams);
1324
1325}
1326
1327void IncludeOp::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) {
1328 build(odsBuilder, odsState,
1329 callee.getFullyQualifiedName(false), mapOperands, numDimsPerMap,
1330 argOperands, templateParams);
1331
1332}
1333
1334void IncludeOp::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) {
1335 build(odsBuilder, odsState, callee, mapOperands,
1336 odsBuilder.getDenseI32ArrayAttr(numDimsPerMap),
1337 argOperands, templateParams);
1338
1339}
1340
1341void IncludeOp::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
1342 ::mlir::Builder odsBuilder(opName.getContext());
1343 if (!properties.numDimsPerMap)
1344 properties.numDimsPerMap = odsBuilder.getDenseI32ArrayAttr({});
1345}
1346
1347::llvm::LogicalResult IncludeOp::verifyInvariantsImpl() {
1348 auto tblgen_callee = getProperties().callee; (void)tblgen_callee;
1349 if (!tblgen_callee) return emitOpError("requires attribute 'callee'");
1350 auto tblgen_mapOpGroupSizes = getProperties().mapOpGroupSizes; (void)tblgen_mapOpGroupSizes;
1351 if (!tblgen_mapOpGroupSizes) return emitOpError("requires attribute 'mapOpGroupSizes'");
1352 auto tblgen_numDimsPerMap = getProperties().numDimsPerMap; (void)tblgen_numDimsPerMap;
1353 auto tblgen_templateParams = getProperties().templateParams; (void)tblgen_templateParams;
1354
1355 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(*this, tblgen_callee, "callee")))
1356 return ::mlir::failure();
1357
1358 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops5(*this, tblgen_templateParams, "templateParams")))
1359 return ::mlir::failure();
1360
1361 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops6(*this, tblgen_numDimsPerMap, "numDimsPerMap")))
1362 return ::mlir::failure();
1363
1364 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops6(*this, tblgen_mapOpGroupSizes, "mapOpGroupSizes")))
1365 return ::mlir::failure();
1366 {
1367 unsigned index = 0; (void)index;
1368 auto valueGroup0 = getODSOperands(0);
1369
1370 for (auto v : valueGroup0) {
1371 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*this, v.getType(), "operand", index++)))
1372 return ::mlir::failure();
1373 }
1374 auto valueGroup1 = getODSOperands(1);
1375 if (::mlir::failed(::mlir::OpTrait::impl::verifyValueSizeAttr(*this, "mapOpGroupSizes", "mapOperands", valueGroup1.size())))
1376 return ::mlir::failure();
1377
1378 for (auto v : valueGroup1) {
1379 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops4(*this, v.getType(), "operand", index++)))
1380 return ::mlir::failure();
1381 }
1382 }
1383 return ::mlir::success();
1384}
1385
1386::llvm::LogicalResult IncludeOp::verifyInvariants() {
1387 return verifyInvariantsImpl();
1388}
1389
1390::mlir::ParseResult IncludeOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1391 ::mlir::SymbolRefAttr calleeAttr;
1392 ::mlir::ArrayAttr templateParamsAttr;
1393 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argOperandsOperands;
1394 ::llvm::SMLoc argOperandsOperandsLoc;
1395 (void)argOperandsOperandsLoc;
1396 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> mapOperandsOperands;
1397 llvm::SmallVector<int32_t> mapOperandsOperandGroupSizes;
1398 ::llvm::SMLoc mapOperandsOperandsLoc;
1399 (void)mapOperandsOperandsLoc;
1400 ::mlir::DenseI32ArrayAttr numDimsPerMapAttr;
1401 ::llvm::ArrayRef<::mlir::Type> argOperandsTypes;
1402 ::llvm::ArrayRef<::mlir::Type> allResultTypes;
1403
1404 if (parser.parseCustomAttributeWithFallback(calleeAttr, parser.getBuilder().getType<::mlir::NoneType>())) {
1405 return ::mlir::failure();
1406 }
1407 if (calleeAttr) result.getOrAddProperties<IncludeOp::Properties>().callee = calleeAttr;
1408 if (::mlir::succeeded(parser.parseOptionalLess())) {
1409 {
1410 auto odsResult = parseTemplateParams(parser, templateParamsAttr);
1411 if (odsResult) return ::mlir::failure();
1412 if (templateParamsAttr)
1413 result.getOrAddProperties<IncludeOp::Properties>().templateParams = templateParamsAttr;
1414 }
1415 if (parser.parseGreater())
1416 return ::mlir::failure();
1417 }
1418 if (parser.parseLParen())
1419 return ::mlir::failure();
1420
1421 argOperandsOperandsLoc = parser.getCurrentLocation();
1422 if (parser.parseOperandList(argOperandsOperands))
1423 return ::mlir::failure();
1424 if (parser.parseRParen())
1425 return ::mlir::failure();
1426 if (::mlir::succeeded(parser.parseOptionalLBrace())) {
1427 {
1428 mapOperandsOperandsLoc = parser.getCurrentLocation();
1429 ::llvm::SmallVector<::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand>> mapOperandsOperandGroups;
1430 auto odsResult = parseMultiDimAndSymbolList(parser, mapOperandsOperandGroups, numDimsPerMapAttr);
1431 if (odsResult) return ::mlir::failure();
1432 for (const auto &subRange : mapOperandsOperandGroups) {
1433 mapOperandsOperands.append(subRange.begin(), subRange.end());
1434 mapOperandsOperandGroupSizes.push_back(subRange.size());
1435 }
1436 if (numDimsPerMapAttr)
1437 result.getOrAddProperties<IncludeOp::Properties>().numDimsPerMap = numDimsPerMapAttr;
1438 }
1439 if (parser.parseRBrace())
1440 return ::mlir::failure();
1441 }
1442 if (parser.parseColon())
1443 return ::mlir::failure();
1444
1445 ::mlir::FunctionType argOperands__allResult_functionType;
1446 if (parser.parseType(argOperands__allResult_functionType))
1447 return ::mlir::failure();
1448 argOperandsTypes = argOperands__allResult_functionType.getInputs();
1449 allResultTypes = argOperands__allResult_functionType.getResults();
1450 {
1451 auto odsResult = parseAttrDictWithWarnings(parser, result.attributes, result);
1452 if (odsResult) return ::mlir::failure();
1453 }
1454::llvm::copy(::llvm::ArrayRef<int32_t>({static_cast<int32_t>(argOperandsOperands.size()), static_cast<int32_t>(mapOperandsOperands.size())}), result.getOrAddProperties<IncludeOp::Properties>().operandSegmentSizes.begin());
1455 result.getOrAddProperties<IncludeOp::Properties>().mapOpGroupSizes = parser.getBuilder().getDenseI32ArrayAttr(mapOperandsOperandGroupSizes);
1456 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIndexType();
1457 result.addTypes(allResultTypes);
1458 if (parser.resolveOperands(argOperandsOperands, argOperandsTypes, argOperandsOperandsLoc, result.operands))
1459 return ::mlir::failure();
1460 if (parser.resolveOperands(mapOperandsOperands, odsBuildableType0, mapOperandsOperandsLoc, result.operands))
1461 return ::mlir::failure();
1462 return ::mlir::success();
1463}
1464
1465::llvm::LogicalResult IncludeOp::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1466 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
1467 if (!dict) {
1468 emitError() << "expected DictionaryAttr to set properties";
1469 return ::mlir::failure();
1470 }
1471 {
1472
1473 auto &propStorage = prop.mapOpGroupSizes;
1474 auto attr = dict.get("mapOpGroupSizes");
1475 if (attr || /*isRequired=*/true) {
1476 if (!attr) {
1477 emitError() << "expected key entry for mapOpGroupSizes in DictionaryAttr to set "
1478 "Properties.";
1479 return ::mlir::failure();
1480 }
1481 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
1482 if (convertedAttr) {
1483 propStorage = convertedAttr;
1484 } else {
1485 emitError() << "Invalid attribute `mapOpGroupSizes` in property conversion: " << attr;
1486 return ::mlir::failure();
1487 }
1488 }
1489 }
1490 return ::mlir::success();
1491}
1492
1493void IncludeOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
1494 _odsPrinter << ' ';
1495 _odsPrinter.printAttributeWithoutType(getCalleeAttr());
1496 if (((getTemplateParamsAttr()))) {
1497 _odsPrinter << "<";
1498 printTemplateParams(_odsPrinter, *this, getTemplateParamsAttr());
1499 _odsPrinter << ">";
1500 }
1501 _odsPrinter << "(";
1502 _odsPrinter << getArgOperands();
1503 _odsPrinter << ")";
1504 if (((!getMapOperands().empty()) || (getNumDimsPerMapAttr() != ::mlir::OpBuilder((*this)->getContext()).getDenseI32ArrayAttr({})))) {
1505 _odsPrinter << ' ' << "{";
1507 _odsPrinter << "}";
1508 }
1509 _odsPrinter << ' ' << ":";
1510 _odsPrinter << ' ';
1511 _odsPrinter.printFunctionalType(getArgOperands().getTypes(), getOperation()->getResultTypes());
1512 _odsPrinter << ' ';
1513 printAttrDictWithWarnings(_odsPrinter, *this, getOperation()->getAttrDictionary(), getProperties());
1514}
1515
1516} // namespace verif
1517} // namespace llzk
1518MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::verif::IncludeOp)
1519
1520namespace llzk {
1521namespace verif {
1522
1523//===----------------------------------------------------------------------===//
1524// ::llzk::verif::IncreasesOp definitions
1525//===----------------------------------------------------------------------===//
1526
1527namespace detail {
1528} // namespace detail
1530
1531::llvm::LogicalResult IncreasesOpAdaptor::verify(::mlir::Location loc) {
1532 return ::mlir::success();
1533}
1534
1535void IncreasesOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value) {
1536 odsState.addOperands(value);
1537}
1538
1539void IncreasesOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value value) {
1540 odsState.addOperands(value);
1541 assert(resultTypes.size() == 0u && "mismatched number of results");
1542 odsState.addTypes(resultTypes);
1543}
1544
1545void IncreasesOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1546 assert(operands.size() == 1u && "mismatched number of parameters");
1547 odsState.addOperands(operands);
1548 odsState.addAttributes(attributes);
1549 assert(resultTypes.size() == 0u && "mismatched number of return types");
1550 odsState.addTypes(resultTypes);
1551}
1552
1553::llvm::LogicalResult IncreasesOp::verifyInvariantsImpl() {
1554 {
1555 unsigned index = 0; (void)index;
1556 auto valueGroup0 = getODSOperands(0);
1557
1558 for (auto v : valueGroup0) {
1559 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
1560 return ::mlir::failure();
1561 }
1562 }
1563 return ::mlir::success();
1564}
1565
1566::llvm::LogicalResult IncreasesOp::verifyInvariants() {
1567 return verifyInvariantsImpl();
1568}
1569
1570::mlir::ParseResult IncreasesOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1571 ::mlir::OpAsmParser::UnresolvedOperand valueRawOperand{};
1572 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> valueOperands(&valueRawOperand, 1); ::llvm::SMLoc valueOperandsLoc;
1573 (void)valueOperandsLoc;
1574
1575 valueOperandsLoc = parser.getCurrentLocation();
1576 if (parser.parseOperand(valueRawOperand))
1577 return ::mlir::failure();
1578 {
1579 auto loc = parser.getCurrentLocation();(void)loc;
1580 if (parser.parseOptionalAttrDict(result.attributes))
1581 return ::mlir::failure();
1582 }
1583 ::mlir::Type odsBuildableType0 = ::llzk::felt::FeltType::get(parser.getBuilder().getContext());
1584 if (parser.resolveOperands(valueOperands, odsBuildableType0, valueOperandsLoc, result.operands))
1585 return ::mlir::failure();
1586 return ::mlir::success();
1587}
1588
1589void IncreasesOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
1590 _odsPrinter << ' ';
1591 _odsPrinter << getValue();
1592 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1593 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1594}
1595
1596// This side effect models "program termination". Based on
1597// https://github.com/llvm/llvm-project/blob/f325e4b2d836d6e65a4d0cf3efc6b0996ccf3765/mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp#L92-L97
1599 ::mlir::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects
1600) {
1601 effects.emplace_back(::mlir::MemoryEffects::Write::get());
1602}
1603} // namespace verif
1604} // namespace llzk
1605MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::verif::IncreasesOp)
1606
1607namespace llzk {
1608namespace verif {
1609
1610//===----------------------------------------------------------------------===//
1611// ::llzk::verif::InvariantOp definitions
1612//===----------------------------------------------------------------------===//
1613
1614namespace detail {
1616
1618 auto attr = getLoopNameAttr();
1619 return attr.getValue();
1620}
1621
1623 auto attr = getLoopArgTypesAttr();
1624 return attr;
1625}
1626
1627} // namespace detail
1629
1630::llvm::LogicalResult InvariantOpAdaptor::verify(::mlir::Location loc) {
1631 auto tblgen_loop_arg_types = getProperties().loop_arg_types; (void)tblgen_loop_arg_types;
1632 if (!tblgen_loop_arg_types) return emitError(loc, "'verif.invariant' op ""requires attribute 'loop_arg_types'");
1633 auto tblgen_loop_name = getProperties().loop_name; (void)tblgen_loop_name;
1634 if (!tblgen_loop_name) return emitError(loc, "'verif.invariant' op ""requires attribute 'loop_name'");
1635
1636 if (tblgen_loop_name && !((::llvm::isa<::mlir::StringAttr>(tblgen_loop_name))))
1637 return emitError(loc, "'verif.invariant' op ""attribute 'loop_name' failed to satisfy constraint: string attribute");
1638
1639 if (tblgen_loop_arg_types && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_loop_arg_types))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_loop_arg_types), [&](::mlir::Attribute attr) { return attr && (((::llvm::isa<::mlir::TypeAttr>(attr))) && ((::llvm::isa<::mlir::Type>(::llvm::cast<::mlir::TypeAttr>(attr).getValue()))) && ((true))); }))))
1640 return emitError(loc, "'verif.invariant' op ""attribute 'loop_arg_types' failed to satisfy constraint: type array attribute");
1641 return ::mlir::success();
1642}
1643
1644::llvm::LogicalResult InvariantOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1645 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
1646 if (!dict) {
1647 emitError() << "expected DictionaryAttr to set properties";
1648 return ::mlir::failure();
1649 }
1650
1651 {
1652 auto &propStorage = prop.loop_arg_types;
1653 auto attr = dict.get("loop_arg_types");
1654 if (attr) {
1655 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
1656 if (convertedAttr) {
1657 propStorage = convertedAttr;
1658 } else {
1659 emitError() << "Invalid attribute `loop_arg_types` in property conversion: " << attr;
1660 return ::mlir::failure();
1661 }
1662 }
1663 }
1664
1665 {
1666 auto &propStorage = prop.loop_name;
1667 auto attr = dict.get("loop_name");
1668 if (attr) {
1669 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
1670 if (convertedAttr) {
1671 propStorage = convertedAttr;
1672 } else {
1673 emitError() << "Invalid attribute `loop_name` in property conversion: " << attr;
1674 return ::mlir::failure();
1675 }
1676 }
1677 }
1678 return ::mlir::success();
1679}
1680
1681::mlir::Attribute InvariantOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
1682 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
1683 ::mlir::Builder odsBuilder{ctx};
1684
1685 {
1686 const auto &propStorage = prop.loop_arg_types;
1687 if (propStorage)
1688 attrs.push_back(odsBuilder.getNamedAttr("loop_arg_types",
1689 propStorage));
1690 }
1691
1692 {
1693 const auto &propStorage = prop.loop_name;
1694 if (propStorage)
1695 attrs.push_back(odsBuilder.getNamedAttr("loop_name",
1696 propStorage));
1697 }
1698
1699 if (!attrs.empty())
1700 return odsBuilder.getDictionaryAttr(attrs);
1701 return {};
1702}
1703
1705 return llvm::hash_combine(
1706 llvm::hash_value(prop.loop_arg_types.getAsOpaquePointer()),
1707 llvm::hash_value(prop.loop_name.getAsOpaquePointer()));
1708}
1709
1710std::optional<mlir::Attribute> InvariantOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
1711 if (name == "loop_arg_types")
1712 return prop.loop_arg_types;
1713
1714 if (name == "loop_name")
1715 return prop.loop_name;
1716 return std::nullopt;
1717}
1718
1719void InvariantOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
1720 if (name == "loop_arg_types") {
1721 prop.loop_arg_types = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.loop_arg_types)>>(value);
1722 return;
1723 }
1724
1725 if (name == "loop_name") {
1726 prop.loop_name = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.loop_name)>>(value);
1727 return;
1728 }
1729}
1730
1731void InvariantOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
1732 if (prop.loop_arg_types) attrs.append("loop_arg_types", prop.loop_arg_types);
1733
1734 if (prop.loop_name) attrs.append("loop_name", prop.loop_name);
1735}
1736
1737::llvm::LogicalResult InvariantOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1738 {
1739 ::mlir::Attribute attr = attrs.get(getLoopArgTypesAttrName(opName));
1740 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops7(attr, "loop_arg_types", emitError)))
1741 return ::mlir::failure();
1742 }
1743
1744 {
1745 ::mlir::Attribute attr = attrs.get(getLoopNameAttrName(opName));
1746 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(attr, "loop_name", emitError)))
1747 return ::mlir::failure();
1748 }
1749 return ::mlir::success();
1750}
1751
1752::llvm::LogicalResult InvariantOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
1753 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
1754 if (::mlir::failed(reader.readAttribute(prop.loop_arg_types)))
1755 return ::mlir::failure();
1756
1757 if (::mlir::failed(reader.readAttribute(prop.loop_name)))
1758 return ::mlir::failure();
1759 return ::mlir::success();
1760}
1761
1762void InvariantOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
1763 auto &prop = getProperties(); (void)prop;
1764 writer.writeAttribute(prop.loop_arg_types);
1765 writer.writeAttribute(prop.loop_name);
1766}
1767
1768::llvm::StringRef InvariantOp::getLoopName() {
1769 auto attr = getLoopNameAttr();
1770 return attr.getValue();
1771}
1772
1773::mlir::ArrayAttr InvariantOp::getLoopArgTypes() {
1774 auto attr = getLoopArgTypesAttr();
1775 return attr;
1776}
1777
1778void InvariantOp::setLoopName(::llvm::StringRef attrValue) {
1779 getProperties().loop_name = ::mlir::Builder((*this)->getContext()).getStringAttr(attrValue);
1780}
1781
1782::llvm::LogicalResult InvariantOp::verifyInvariantsImpl() {
1783 auto tblgen_loop_arg_types = getProperties().loop_arg_types; (void)tblgen_loop_arg_types;
1784 if (!tblgen_loop_arg_types) return emitOpError("requires attribute 'loop_arg_types'");
1785 auto tblgen_loop_name = getProperties().loop_name; (void)tblgen_loop_name;
1786 if (!tblgen_loop_name) return emitOpError("requires attribute 'loop_name'");
1787
1788 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(*this, tblgen_loop_name, "loop_name")))
1789 return ::mlir::failure();
1790
1791 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops7(*this, tblgen_loop_arg_types, "loop_arg_types")))
1792 return ::mlir::failure();
1793 {
1794 unsigned index = 0; (void)index;
1795
1796 for (auto &region : ::llvm::MutableArrayRef((*this)->getRegion(0)))
1797 if (::mlir::failed(__mlir_ods_local_region_constraint_Ops2(*this, region, "region", index++)))
1798 return ::mlir::failure();
1799 }
1800 return ::mlir::success();
1801}
1802
1803::llvm::LogicalResult InvariantOp::verifyInvariants() {
1804 if(::mlir::succeeded(verifyInvariantsImpl()) && ::mlir::succeeded(verify()))
1805 return ::mlir::success();
1806 return ::mlir::failure();
1807}
1808
1809} // namespace verif
1810} // namespace llzk
1811MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::verif::InvariantOp)
1812
1813namespace llzk {
1814namespace verif {
1815
1816//===----------------------------------------------------------------------===//
1817// ::llzk::verif::OldOp definitions
1818//===----------------------------------------------------------------------===//
1819
1820namespace detail {
1821} // namespace detail
1823
1824::llvm::LogicalResult OldOpAdaptor::verify(::mlir::Location loc) {
1825 return ::mlir::success();
1826}
1827
1828void OldOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value value) {
1829 odsState.addOperands(value);
1830 odsState.addTypes(result);
1831}
1832
1833void OldOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value) {
1834 odsState.addOperands(value);
1835
1836 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1837 if (::mlir::succeeded(OldOp::inferReturnTypes(odsBuilder.getContext(),
1838 odsState.location, odsState.operands,
1839 odsState.attributes.getDictionary(odsState.getContext()),
1840 odsState.getRawProperties(),
1841 odsState.regions, inferredReturnTypes)))
1842 odsState.addTypes(inferredReturnTypes);
1843 else
1844 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1845
1846}
1847
1848void OldOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value value) {
1849 odsState.addOperands(value);
1850 assert(resultTypes.size() == 1u && "mismatched number of results");
1851 odsState.addTypes(resultTypes);
1852}
1853
1854void OldOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1855 assert(operands.size() == 1u && "mismatched number of parameters");
1856 odsState.addOperands(operands);
1857 odsState.addAttributes(attributes);
1858 assert(resultTypes.size() == 1u && "mismatched number of return types");
1859 odsState.addTypes(resultTypes);
1860}
1861
1862void OldOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1863 assert(operands.size() == 1u && "mismatched number of parameters");
1864 odsState.addOperands(operands);
1865 odsState.addAttributes(attributes);
1866
1867 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1868 if (::mlir::succeeded(OldOp::inferReturnTypes(odsBuilder.getContext(),
1869 odsState.location, operands,
1870 odsState.attributes.getDictionary(odsState.getContext()),
1871 odsState.getRawProperties(),
1872 odsState.regions, inferredReturnTypes))) {
1873 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
1874 odsState.addTypes(inferredReturnTypes);
1875 } else {
1876 ::llvm::report_fatal_error("Failed to infer result type(s).");
1877 }
1878}
1879
1880::llvm::LogicalResult OldOp::verifyInvariantsImpl() {
1881 {
1882 unsigned index = 0; (void)index;
1883 auto valueGroup0 = getODSOperands(0);
1884
1885 for (auto v : valueGroup0) {
1886 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops5(*this, v.getType(), "operand", index++)))
1887 return ::mlir::failure();
1888 }
1889 }
1890 {
1891 unsigned index = 0; (void)index;
1892 auto valueGroup0 = getODSResults(0);
1893
1894 for (auto v : valueGroup0) {
1895 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops5(*this, v.getType(), "result", index++)))
1896 return ::mlir::failure();
1897 }
1898 }
1899 if (!((((*this->getODSOperands(0).begin()).getType()) == ((*this->getODSResults(0).begin()).getType()) && ((*this->getODSResults(0).begin()).getType()) == ((*this->getODSOperands(0).begin()).getType()))))
1900 return emitOpError("failed to verify that all of {value, result} have same type");
1901 return ::mlir::success();
1902}
1903
1904::llvm::LogicalResult OldOp::verifyInvariants() {
1905 return verifyInvariantsImpl();
1906}
1907
1908::llvm::LogicalResult OldOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
1909 inferredReturnTypes.resize(1);
1910 ::mlir::Builder odsBuilder(context);
1911 if (operands.size() <= 0)
1912 return ::mlir::failure();
1913 ::mlir::Type odsInferredType0 = operands[0].getType();
1914 inferredReturnTypes[0] = odsInferredType0;
1915 return ::mlir::success();
1916}
1917
1918::mlir::ParseResult OldOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1919 ::mlir::OpAsmParser::UnresolvedOperand valueRawOperand{};
1920 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> valueOperands(&valueRawOperand, 1); ::llvm::SMLoc valueOperandsLoc;
1921 (void)valueOperandsLoc;
1922 ::mlir::Type resultRawType{};
1923 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
1924
1925 valueOperandsLoc = parser.getCurrentLocation();
1926 if (parser.parseOperand(valueRawOperand))
1927 return ::mlir::failure();
1928 if (parser.parseColon())
1929 return ::mlir::failure();
1930
1931 {
1932 ::mlir::Type type;
1933 if (parser.parseCustomTypeWithFallback(type))
1934 return ::mlir::failure();
1935 resultRawType = type;
1936 }
1937 {
1938 auto loc = parser.getCurrentLocation();(void)loc;
1939 if (parser.parseOptionalAttrDict(result.attributes))
1940 return ::mlir::failure();
1941 }
1942 result.addTypes(resultTypes);
1943 if (parser.resolveOperands(valueOperands, resultTypes[0], valueOperandsLoc, result.operands))
1944 return ::mlir::failure();
1945 return ::mlir::success();
1946}
1947
1948void OldOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
1949 _odsPrinter << ' ';
1950 _odsPrinter << getValue();
1951 _odsPrinter << ' ' << ":";
1952 _odsPrinter << ' ';
1953 {
1954 auto type = getResult().getType();
1955 if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
1956 _odsPrinter.printStrippedAttrOrType(validType);
1957 else
1958 _odsPrinter << type;
1959 }
1960 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1961 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1962}
1963
1964void OldOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1965}
1966
1967} // namespace verif
1968} // namespace llzk
1969MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::verif::OldOp)
1970
1971namespace llzk {
1972namespace verif {
1973
1974//===----------------------------------------------------------------------===//
1975// ::llzk::verif::RequireComputeOp definitions
1976//===----------------------------------------------------------------------===//
1977
1978namespace detail {
1979} // namespace detail
1981
1982::llvm::LogicalResult RequireComputeOpAdaptor::verify(::mlir::Location loc) {
1983 return ::mlir::success();
1984}
1985
1986void RequireComputeOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition) {
1987 odsState.addOperands(condition);
1988}
1989
1990void RequireComputeOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
1991 odsState.addOperands(condition);
1992 assert(resultTypes.size() == 0u && "mismatched number of results");
1993 odsState.addTypes(resultTypes);
1994}
1995
1996void RequireComputeOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1997 assert(operands.size() == 1u && "mismatched number of parameters");
1998 odsState.addOperands(operands);
1999 odsState.addAttributes(attributes);
2000 assert(resultTypes.size() == 0u && "mismatched number of return types");
2001 odsState.addTypes(resultTypes);
2002}
2003
2005 {
2006 unsigned index = 0; (void)index;
2007 auto valueGroup0 = getODSOperands(0);
2008
2009 for (auto v : valueGroup0) {
2010 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "operand", index++)))
2011 return ::mlir::failure();
2012 }
2013 }
2014 return ::mlir::success();
2015}
2016
2017::llvm::LogicalResult RequireComputeOp::verifyInvariants() {
2018 return verifyInvariantsImpl();
2019}
2020
2021::mlir::ParseResult RequireComputeOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2022 ::mlir::OpAsmParser::UnresolvedOperand conditionRawOperand{};
2023 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> conditionOperands(&conditionRawOperand, 1); ::llvm::SMLoc conditionOperandsLoc;
2024 (void)conditionOperandsLoc;
2025
2026 conditionOperandsLoc = parser.getCurrentLocation();
2027 if (parser.parseOperand(conditionRawOperand))
2028 return ::mlir::failure();
2029 {
2030 auto loc = parser.getCurrentLocation();(void)loc;
2031 if (parser.parseOptionalAttrDict(result.attributes))
2032 return ::mlir::failure();
2033 }
2034 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
2035 if (parser.resolveOperands(conditionOperands, odsBuildableType0, conditionOperandsLoc, result.operands))
2036 return ::mlir::failure();
2037 return ::mlir::success();
2038}
2039
2040void RequireComputeOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
2041 _odsPrinter << ' ';
2042 _odsPrinter << getCondition();
2043 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2044 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2045}
2046
2047// This side effect models "program termination". Based on
2048// https://github.com/llvm/llvm-project/blob/f325e4b2d836d6e65a4d0cf3efc6b0996ccf3765/mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp#L92-L97
2050 ::mlir::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects
2051) {
2052 effects.emplace_back(::mlir::MemoryEffects::Write::get());
2053}
2054} // namespace verif
2055} // namespace llzk
2056MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::verif::RequireComputeOp)
2057
2058namespace llzk {
2059namespace verif {
2060
2061//===----------------------------------------------------------------------===//
2062// ::llzk::verif::RequireConstrainOp definitions
2063//===----------------------------------------------------------------------===//
2064
2065namespace detail {
2066} // namespace detail
2068
2069::llvm::LogicalResult RequireConstrainOpAdaptor::verify(::mlir::Location loc) {
2070 return ::mlir::success();
2071}
2072
2073void RequireConstrainOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition) {
2074 odsState.addOperands(condition);
2075}
2076
2077void RequireConstrainOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
2078 odsState.addOperands(condition);
2079 assert(resultTypes.size() == 0u && "mismatched number of results");
2080 odsState.addTypes(resultTypes);
2081}
2082
2083void RequireConstrainOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2084 assert(operands.size() == 1u && "mismatched number of parameters");
2085 odsState.addOperands(operands);
2086 odsState.addAttributes(attributes);
2087 assert(resultTypes.size() == 0u && "mismatched number of return types");
2088 odsState.addTypes(resultTypes);
2089}
2090
2092 {
2093 unsigned index = 0; (void)index;
2094 auto valueGroup0 = getODSOperands(0);
2095
2096 for (auto v : valueGroup0) {
2097 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "operand", index++)))
2098 return ::mlir::failure();
2099 }
2100 }
2101 return ::mlir::success();
2102}
2103
2105 return verifyInvariantsImpl();
2106}
2107
2108::mlir::ParseResult RequireConstrainOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2109 ::mlir::OpAsmParser::UnresolvedOperand conditionRawOperand{};
2110 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> conditionOperands(&conditionRawOperand, 1); ::llvm::SMLoc conditionOperandsLoc;
2111 (void)conditionOperandsLoc;
2112
2113 conditionOperandsLoc = parser.getCurrentLocation();
2114 if (parser.parseOperand(conditionRawOperand))
2115 return ::mlir::failure();
2116 {
2117 auto loc = parser.getCurrentLocation();(void)loc;
2118 if (parser.parseOptionalAttrDict(result.attributes))
2119 return ::mlir::failure();
2120 }
2121 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
2122 if (parser.resolveOperands(conditionOperands, odsBuildableType0, conditionOperandsLoc, result.operands))
2123 return ::mlir::failure();
2124 return ::mlir::success();
2125}
2126
2127void RequireConstrainOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
2128 _odsPrinter << ' ';
2129 _odsPrinter << getCondition();
2130 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2131 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2132}
2133
2134// This side effect models "program termination". Based on
2135// https://github.com/llvm/llvm-project/blob/f325e4b2d836d6e65a4d0cf3efc6b0996ccf3765/mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp#L92-L97
2137 ::mlir::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects
2138) {
2139 effects.emplace_back(::mlir::MemoryEffects::Write::get());
2140}
2141} // namespace verif
2142} // namespace llzk
2143MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::verif::RequireConstrainOp)
2144
2145namespace llzk {
2146namespace verif {
2147
2148//===----------------------------------------------------------------------===//
2149// ::llzk::verif::StepOp definitions
2150//===----------------------------------------------------------------------===//
2151
2152namespace detail {
2153} // namespace detail
2155
2156::llvm::LogicalResult StepOpAdaptor::verify(::mlir::Location loc) {
2157 return ::mlir::success();
2158}
2159
2160void StepOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
2161 (void)odsState.addRegion();
2162}
2163
2164void StepOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
2165 (void)odsState.addRegion();
2166 assert(resultTypes.size() == 0u && "mismatched number of results");
2167 odsState.addTypes(resultTypes);
2168}
2169
2170void StepOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2171 assert(operands.size() == 0u && "mismatched number of parameters");
2172 odsState.addOperands(operands);
2173 odsState.addAttributes(attributes);
2174 for (unsigned i = 0; i != 1; ++i)
2175 (void)odsState.addRegion();
2176 assert(resultTypes.size() == 0u && "mismatched number of return types");
2177 odsState.addTypes(resultTypes);
2178}
2179
2180::llvm::LogicalResult StepOp::verifyInvariantsImpl() {
2181 {
2182 unsigned index = 0; (void)index;
2183
2184 for (auto &region : ::llvm::MutableArrayRef((*this)->getRegion(0)))
2185 if (::mlir::failed(__mlir_ods_local_region_constraint_Ops2(*this, region, "region", index++)))
2186 return ::mlir::failure();
2187 }
2188 return ::mlir::success();
2189}
2190
2191::llvm::LogicalResult StepOp::verifyInvariants() {
2192 return verifyInvariantsImpl();
2193}
2194
2195::mlir::ParseResult StepOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2196 std::unique_ptr<::mlir::Region> regionRegion = std::make_unique<::mlir::Region>();
2197
2198 if (parser.parseRegion(*regionRegion))
2199 return ::mlir::failure();
2200
2201 if (regionRegion->empty()) regionRegion->emplaceBlock();
2202 {
2203 auto loc = parser.getCurrentLocation();(void)loc;
2204 if (parser.parseOptionalAttrDict(result.attributes))
2205 return ::mlir::failure();
2206 }
2207 result.addRegion(std::move(regionRegion));
2208 return ::mlir::success();
2209}
2210
2211void StepOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
2212 _odsPrinter << ' ';
2213 _odsPrinter.printRegion(getRegion());
2214 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2215 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2216}
2217
2218// This side effect models "program termination". Based on
2219// https://github.com/llvm/llvm-project/blob/f325e4b2d836d6e65a4d0cf3efc6b0996ccf3765/mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp#L92-L97
2221 ::mlir::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects
2222) {
2223 effects.emplace_back(::mlir::MemoryEffects::Write::get());
2224}
2225} // namespace verif
2226} // namespace llzk
2227MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::verif::StepOp)
2228
2229namespace llzk {
2230namespace verif {
2231
2232//===----------------------------------------------------------------------===//
2233// ::llzk::verif::StepYieldOp definitions
2234//===----------------------------------------------------------------------===//
2235
2236namespace detail {
2237} // namespace detail
2239
2240::llvm::LogicalResult StepYieldOpAdaptor::verify(::mlir::Location loc) {
2241 return ::mlir::success();
2242}
2243
2244void StepYieldOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value) {
2245 odsState.addOperands(value);
2246}
2247
2248void StepYieldOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value value) {
2249 odsState.addOperands(value);
2250 assert(resultTypes.size() == 0u && "mismatched number of results");
2251 odsState.addTypes(resultTypes);
2252}
2253
2254void StepYieldOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2255 assert(operands.size() == 1u && "mismatched number of parameters");
2256 odsState.addOperands(operands);
2257 odsState.addAttributes(attributes);
2258 assert(resultTypes.size() == 0u && "mismatched number of return types");
2259 odsState.addTypes(resultTypes);
2260}
2261
2262::llvm::LogicalResult StepYieldOp::verifyInvariantsImpl() {
2263 {
2264 unsigned index = 0; (void)index;
2265 auto valueGroup0 = getODSOperands(0);
2266
2267 for (auto v : valueGroup0) {
2268 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "operand", index++)))
2269 return ::mlir::failure();
2270 }
2271 }
2272 return ::mlir::success();
2273}
2274
2275::llvm::LogicalResult StepYieldOp::verifyInvariants() {
2276 return verifyInvariantsImpl();
2277}
2278
2279::mlir::ParseResult StepYieldOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2280 ::mlir::OpAsmParser::UnresolvedOperand valueRawOperand{};
2281 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> valueOperands(&valueRawOperand, 1); ::llvm::SMLoc valueOperandsLoc;
2282 (void)valueOperandsLoc;
2283
2284 valueOperandsLoc = parser.getCurrentLocation();
2285 if (parser.parseOperand(valueRawOperand))
2286 return ::mlir::failure();
2287 {
2288 auto loc = parser.getCurrentLocation();(void)loc;
2289 if (parser.parseOptionalAttrDict(result.attributes))
2290 return ::mlir::failure();
2291 }
2292 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
2293 if (parser.resolveOperands(valueOperands, odsBuildableType0, valueOperandsLoc, result.operands))
2294 return ::mlir::failure();
2295 return ::mlir::success();
2296}
2297
2298void StepYieldOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
2299 _odsPrinter << ' ';
2300 _odsPrinter << getValue();
2301 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2302 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2303}
2304
2305} // namespace verif
2306} // namespace llzk
2307MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::verif::StepYieldOp)
2308
2309namespace llzk {
2310namespace verif {
2311
2312//===----------------------------------------------------------------------===//
2313// ::llzk::verif::VerifAssertOp definitions
2314//===----------------------------------------------------------------------===//
2315
2316namespace detail {
2317} // namespace detail
2319
2320::llvm::LogicalResult VerifAssertOpAdaptor::verify(::mlir::Location loc) {
2321 return ::mlir::success();
2322}
2323
2324void VerifAssertOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition) {
2325 odsState.addOperands(condition);
2326}
2327
2328void VerifAssertOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
2329 odsState.addOperands(condition);
2330 assert(resultTypes.size() == 0u && "mismatched number of results");
2331 odsState.addTypes(resultTypes);
2332}
2333
2334void VerifAssertOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2335 assert(operands.size() == 1u && "mismatched number of parameters");
2336 odsState.addOperands(operands);
2337 odsState.addAttributes(attributes);
2338 assert(resultTypes.size() == 0u && "mismatched number of return types");
2339 odsState.addTypes(resultTypes);
2340}
2341
2343 {
2344 unsigned index = 0; (void)index;
2345 auto valueGroup0 = getODSOperands(0);
2346
2347 for (auto v : valueGroup0) {
2348 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "operand", index++)))
2349 return ::mlir::failure();
2350 }
2351 }
2352 return ::mlir::success();
2353}
2354
2355::llvm::LogicalResult VerifAssertOp::verifyInvariants() {
2356 return verifyInvariantsImpl();
2357}
2358
2359::mlir::ParseResult VerifAssertOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2360 ::mlir::OpAsmParser::UnresolvedOperand conditionRawOperand{};
2361 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> conditionOperands(&conditionRawOperand, 1); ::llvm::SMLoc conditionOperandsLoc;
2362 (void)conditionOperandsLoc;
2363
2364 conditionOperandsLoc = parser.getCurrentLocation();
2365 if (parser.parseOperand(conditionRawOperand))
2366 return ::mlir::failure();
2367 {
2368 auto loc = parser.getCurrentLocation();(void)loc;
2369 if (parser.parseOptionalAttrDict(result.attributes))
2370 return ::mlir::failure();
2371 }
2372 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
2373 if (parser.resolveOperands(conditionOperands, odsBuildableType0, conditionOperandsLoc, result.operands))
2374 return ::mlir::failure();
2375 return ::mlir::success();
2376}
2377
2378void VerifAssertOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
2379 _odsPrinter << ' ';
2380 _odsPrinter << getCondition();
2381 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2382 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2383}
2384
2385// This side effect models "program termination". Based on
2386// https://github.com/llvm/llvm-project/blob/f325e4b2d836d6e65a4d0cf3efc6b0996ccf3765/mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp#L92-L97
2388 ::mlir::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects
2389) {
2390 effects.emplace_back(::mlir::MemoryEffects::Write::get());
2391}
2392} // namespace verif
2393} // namespace llzk
2394MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::verif::VerifAssertOp)
2395
2396namespace llzk {
2397namespace verif {
2398
2399//===----------------------------------------------------------------------===//
2400// ::llzk::verif::VerifProveOp definitions
2401//===----------------------------------------------------------------------===//
2402
2403namespace detail {
2404} // namespace detail
2406
2407::llvm::LogicalResult VerifProveOpAdaptor::verify(::mlir::Location loc) {
2408 return ::mlir::success();
2409}
2410
2411void VerifProveOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition) {
2412 odsState.addOperands(condition);
2413}
2414
2415void VerifProveOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
2416 odsState.addOperands(condition);
2417 assert(resultTypes.size() == 0u && "mismatched number of results");
2418 odsState.addTypes(resultTypes);
2419}
2420
2421void VerifProveOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2422 assert(operands.size() == 1u && "mismatched number of parameters");
2423 odsState.addOperands(operands);
2424 odsState.addAttributes(attributes);
2425 assert(resultTypes.size() == 0u && "mismatched number of return types");
2426 odsState.addTypes(resultTypes);
2427}
2428
2429::llvm::LogicalResult VerifProveOp::verifyInvariantsImpl() {
2430 {
2431 unsigned index = 0; (void)index;
2432 auto valueGroup0 = getODSOperands(0);
2433
2434 for (auto v : valueGroup0) {
2435 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "operand", index++)))
2436 return ::mlir::failure();
2437 }
2438 }
2439 return ::mlir::success();
2440}
2441
2442::llvm::LogicalResult VerifProveOp::verifyInvariants() {
2443 return verifyInvariantsImpl();
2444}
2445
2446::mlir::ParseResult VerifProveOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2447 ::mlir::OpAsmParser::UnresolvedOperand conditionRawOperand{};
2448 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> conditionOperands(&conditionRawOperand, 1); ::llvm::SMLoc conditionOperandsLoc;
2449 (void)conditionOperandsLoc;
2450
2451 conditionOperandsLoc = parser.getCurrentLocation();
2452 if (parser.parseOperand(conditionRawOperand))
2453 return ::mlir::failure();
2454 {
2455 auto loc = parser.getCurrentLocation();(void)loc;
2456 if (parser.parseOptionalAttrDict(result.attributes))
2457 return ::mlir::failure();
2458 }
2459 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
2460 if (parser.resolveOperands(conditionOperands, odsBuildableType0, conditionOperandsLoc, result.operands))
2461 return ::mlir::failure();
2462 return ::mlir::success();
2463}
2464
2465void VerifProveOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
2466 _odsPrinter << ' ';
2467 _odsPrinter << getCondition();
2468 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2469 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2470}
2471
2472// This side effect models "program termination". Based on
2473// https://github.com/llvm/llvm-project/blob/f325e4b2d836d6e65a4d0cf3efc6b0996ccf3765/mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp#L92-L97
2475 ::mlir::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects
2476) {
2477 effects.emplace_back(::mlir::MemoryEffects::Write::get());
2478}
2479} // namespace verif
2480} // namespace llzk
2481MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::verif::VerifProveOp)
2482
2483namespace llzk {
2484namespace verif {
2485
2486//===----------------------------------------------------------------------===//
2487// ::llzk::verif::VerifSMTProveOp definitions
2488//===----------------------------------------------------------------------===//
2489
2490namespace detail {
2491} // namespace detail
2493
2494::llvm::LogicalResult VerifSMTProveOpAdaptor::verify(::mlir::Location loc) {
2495 return ::mlir::success();
2496}
2497
2498void VerifSMTProveOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition) {
2499 odsState.addOperands(condition);
2500}
2501
2502void VerifSMTProveOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
2503 odsState.addOperands(condition);
2504 assert(resultTypes.size() == 0u && "mismatched number of results");
2505 odsState.addTypes(resultTypes);
2506}
2507
2508void VerifSMTProveOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2509 assert(operands.size() == 1u && "mismatched number of parameters");
2510 odsState.addOperands(operands);
2511 odsState.addAttributes(attributes);
2512 assert(resultTypes.size() == 0u && "mismatched number of return types");
2513 odsState.addTypes(resultTypes);
2514}
2515
2517 {
2518 unsigned index = 0; (void)index;
2519 auto valueGroup0 = getODSOperands(0);
2520
2521 for (auto v : valueGroup0) {
2522 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops6(*this, v.getType(), "operand", index++)))
2523 return ::mlir::failure();
2524 }
2525 }
2526 return ::mlir::success();
2527}
2528
2529::llvm::LogicalResult VerifSMTProveOp::verifyInvariants() {
2530 return verifyInvariantsImpl();
2531}
2532
2533::mlir::ParseResult VerifSMTProveOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2534 ::mlir::OpAsmParser::UnresolvedOperand conditionRawOperand{};
2535 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> conditionOperands(&conditionRawOperand, 1); ::llvm::SMLoc conditionOperandsLoc;
2536 (void)conditionOperandsLoc;
2537
2538 conditionOperandsLoc = parser.getCurrentLocation();
2539 if (parser.parseOperand(conditionRawOperand))
2540 return ::mlir::failure();
2541 {
2542 auto loc = parser.getCurrentLocation();(void)loc;
2543 if (parser.parseOptionalAttrDict(result.attributes))
2544 return ::mlir::failure();
2545 }
2546 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::smt::BoolType>();
2547 if (parser.resolveOperands(conditionOperands, odsBuildableType0, conditionOperandsLoc, result.operands))
2548 return ::mlir::failure();
2549 return ::mlir::success();
2550}
2551
2552void VerifSMTProveOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
2553 _odsPrinter << ' ';
2554 _odsPrinter << getCondition();
2555 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2556 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2557}
2558
2559} // namespace verif
2560} // namespace llzk
2561MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::verif::VerifSMTProveOp)
2562
2563
2564#endif // GET_OP_CLASSES
2565
static FeltType get(::mlir::MLIRContext *context, ::mlir::StringAttr fieldName)
Definition Types.cpp.inc:67
ContractEndOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:129
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:234
ContractEndOpAdaptor(ContractEndOp op)
Definition Ops.cpp.inc:232
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:262
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:254
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:258
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState)
Definition Ops.cpp.inc:238
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:271
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:276
ContractOpAdaptor(ContractOp op)
Definition Ops.cpp.inc:314
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:316
ContractOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:338
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:496
::mlir::StringAttr getFunctionTypeAttrName()
Definition Ops.h.inc:395
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:464
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:449
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:441
::mlir::StringAttr getTargetAttrName()
Definition Ops.h.inc:411
void setFunctionType(::mlir::FunctionType attrValue)
Definition Ops.cpp.inc:572
::mlir::StringAttr getSymNameAttr()
Definition Ops.h.inc:456
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:644
::llvm::LogicalResult verify()
Definition Ops.cpp:610
::std::optional< ::mlir::ArrayAttr > getArgAttrs()
Definition Ops.cpp.inc:563
::mlir::FunctionType getFunctionType()
Definition Ops.cpp.inc:558
::mlir::StringAttr getSymNameAttrName()
Definition Ops.h.inc:403
::mlir::StringAttr getArgAttrsAttrName()
Definition Ops.h.inc:387
::mlir::TypeAttr getFunctionTypeAttr()
Definition Ops.h.inc:466
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:404
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:486
::mlir::SymbolRefAttr getTargetAttr()
Definition Ops.h.inc:461
::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:392
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:614
::mlir::ArrayAttr getArgAttrsAttr()
Definition Ops.h.inc:471
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:539
void setSymName(::llvm::StringRef attrValue)
Definition Ops.cpp.inc:568
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:339
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:523
::mlir::SymbolRefAttr getTarget()
Definition Ops.cpp.inc:553
FoldAdaptor::Properties Properties
Definition Ops.h.inc:381
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:576
::llvm::StringRef getSymName()
Definition Ops.cpp.inc:548
DecreasesOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:663
DecreasesOpAdaptor(DecreasesOp op)
Definition Ops.cpp.inc:663
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:665
::mlir::TypedValue<::llzk::felt::FeltType > getValue()
Definition Ops.h.inc:726
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:732
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:704
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value)
Definition Ops.cpp.inc:669
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:687
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:720
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:700
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:723
EnsureComputeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:795
EnsureComputeOpAdaptor(EnsureComputeOp op)
Definition Ops.cpp.inc:750
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:752
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:791
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:819
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:787
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:810
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:852
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition)
Definition Ops.cpp.inc:756
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:774
::mlir::TypedValue<::mlir::IntegerType > getCondition()
Definition Ops.h.inc:858
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:839
EnsureConstrainOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:927
EnsureConstrainOpAdaptor(EnsureConstrainOp op)
Definition Ops.cpp.inc:837
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:984
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:906
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:874
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:897
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:861
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition)
Definition Ops.cpp.inc:843
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:878
::mlir::TypedValue<::mlir::IntegerType > getCondition()
Definition Ops.h.inc:990
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:962
IncludeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1145
void setNumDimsPerMap(::llvm::ArrayRef< int32_t > attrValue)
Definition Ops.cpp.inc:1305
::mlir::MutableOperandRange getArgOperandsMutable()
Definition Ops.cpp.inc:993
::mlir::ArrayAttr getTemplateParamsAttr()
Definition Ops.h.inc:1295
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:1081
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1347
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:1126
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1255
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:1222
void setMapOpGroupSizes(::llvm::ArrayRef< int32_t > attrValue)
Definition Ops.cpp.inc:1309
::mlir::OperandRangeRange getMapOperands()
Definition Ops.h.inc:1265
::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1465
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1390
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.cpp.inc:984
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1195
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
Definition Ops.cpp.inc:1300
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:1262
::mlir::SymbolRefAttr getCalleeAttr()
Definition Ops.h.inc:1290
FoldAdaptor::Properties Properties
Definition Ops.h.inc:1204
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:1138
::mlir::Operation::operand_range getArgOperands()
Definition Ops.h.inc:1261
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:1184
::mlir::SymbolRefAttr getCallee()
Definition Ops.cpp.inc:1285
::mlir::StringAttr getCalleeAttrName()
Definition Ops.h.inc:1210
::mlir::StringAttr getMapOpGroupSizesAttrName()
Definition Ops.h.inc:1218
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1005
::mlir::MutableOperandRangeRange getMapOperandsMutable()
Definition Ops.cpp.inc:999
::std::optional< ::mlir::ArrayAttr > getTemplateParams()
Definition Ops.cpp.inc:1290
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:1154
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:1493
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties)
Definition Ops.cpp.inc:1341
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
Definition Ops.cpp.inc:1295
::mlir::StringAttr getNumDimsPerMapAttrName()
Definition Ops.h.inc:1226
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
Definition Ops.h.inc:1300
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1386
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
Definition Ops.h.inc:1305
::mlir::StringAttr getTemplateParamsAttrName()
Definition Ops.h.inc:1234
IncreasesOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1463
IncreasesOpAdaptor(IncreasesOp op)
Definition Ops.cpp.inc:1529
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1531
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1570
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1566
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1589
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1553
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value)
Definition Ops.cpp.inc:1535
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1520
::mlir::TypedValue<::llzk::felt::FeltType > getValue()
Definition Ops.h.inc:1526
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:1598
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1630
InvariantOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1651
InvariantOpAdaptor(InvariantOp op)
Definition Ops.cpp.inc:1628
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1737
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:1719
::mlir::StringAttr getLoopArgTypesAttrName()
Definition Ops.h.inc:1700
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:1762
void setLoopName(::llvm::StringRef attrValue)
Definition Ops.cpp.inc:1778
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:1710
::mlir::ArrayAttr getLoopArgTypesAttr()
Definition Ops.h.inc:1758
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:1681
::mlir::ArrayAttr getLoopArgTypes()
Definition Ops.cpp.inc:1773
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:1704
::mlir::StringAttr getLoopNameAttr()
Definition Ops.h.inc:1753
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:1752
::llvm::StringRef getLoopName()
Definition Ops.cpp.inc:1768
FoldAdaptor::Properties Properties
Definition Ops.h.inc:1694
::llvm::LogicalResult verify()
Definition Ops.cpp:1158
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:1731
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1782
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1803
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1644
::mlir::StringAttr getLoopNameAttrName()
Definition Ops.h.inc:1708
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1824
OldOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1837
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1948
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1880
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1918
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1894
::mlir::TypedValue<::mlir::Type > getResult()
Definition Ops.h.inc:1919
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1904
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:1964
::mlir::TypedValue<::mlir::Type > getValue()
Definition Ops.h.inc:1900
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:1908
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:1913
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value value)
Definition Ops.cpp.inc:1828
RequireComputeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1976
RequireComputeOpAdaptor(RequireComputeOp op)
Definition Ops.cpp.inc:1980
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1982
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:2004
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:2049
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:2017
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:2021
::mlir::TypedValue<::mlir::IntegerType > getCondition()
Definition Ops.h.inc:2039
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:2033
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition)
Definition Ops.cpp.inc:1986
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:2040
RequireConstrainOpAdaptor(RequireConstrainOp op)
Definition Ops.cpp.inc:2067
RequireConstrainOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2108
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:2069
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:2104
::mlir::TypedValue<::mlir::IntegerType > getCondition()
Definition Ops.h.inc:2171
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:2136
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:2091
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition)
Definition Ops.cpp.inc:2073
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:2108
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:2165
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:2127
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:2156
StepOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2248
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:2195
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:2180
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:2191
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:2220
::mlir::Region & getRegion()
Definition Ops.h.inc:2317
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:2211
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState)
Definition Ops.cpp.inc:2160
StepYieldOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2371
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:2240
StepYieldOpAdaptor(StepYieldOp op)
Definition Ops.cpp.inc:2238
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value)
Definition Ops.cpp.inc:2244
::mlir::TypedValue<::mlir::IntegerType > getValue()
Definition Ops.h.inc:2434
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:2279
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:2262
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:2428
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:2275
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:2298
VerifAssertOpAdaptor(VerifAssertOp op)
Definition Ops.cpp.inc:2318
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:2320
VerifAssertOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2502
::mlir::TypedValue<::mlir::IntegerType > getCondition()
Definition Ops.h.inc:2565
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:2342
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:2559
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:2387
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:2359
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:2378
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:2355
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition)
Definition Ops.cpp.inc:2324
VerifProveOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2634
VerifProveOpAdaptor(VerifProveOp op)
Definition Ops.cpp.inc:2405
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:2407
::mlir::TypedValue<::mlir::IntegerType > getCondition()
Definition Ops.h.inc:2697
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:2446
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:2429
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:2442
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:2474
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:2691
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition)
Definition Ops.cpp.inc:2411
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:2465
VerifSMTProveOpAdaptor(VerifSMTProveOp op)
Definition Ops.cpp.inc:2492
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:2494
VerifSMTProveOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2766
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition)
Definition Ops.cpp.inc:2498
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:2823
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:2533
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:2529
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:2516
::mlir::TypedValue<::llzk::smt::BoolType > getCondition()
Definition Ops.h.inc:2829
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:2552
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:277
ContractOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:281
::std::optional< ::mlir::ArrayAttr > getArgAttrs()
Definition Ops.cpp.inc:308
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
Definition Ops.cpp.inc:949
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
Definition Ops.cpp.inc:944
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:1099
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.cpp.inc:925
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
Definition Ops.cpp.inc:954
::std::optional< ::mlir::ArrayAttr > getTemplateParams()
Definition Ops.cpp.inc:939
IncludeOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1103
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
Definition Ops.h.inc:1132
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:1602
InvariantOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1606
void printTemplateParams(mlir::AsmPrinter &printer, mlir::ArrayAttr value)
Definition OpHelpers.h:242
mlir::ParseResult parseAttrDictWithWarnings(mlir::OpAsmParser &parser, mlir::NamedAttrList &extraAttrs, mlir::OperationState &state)
Definition OpHelpers.h:195
bool isValidType(Type type)
void printMultiDimAndSymbolList(mlir::OpAsmPrinter &printer, mlir::Operation *op, mlir::OperandRangeRange multiMapOperands, mlir::DenseI32ArrayAttr numDimsPerMap)
Definition OpHelpers.h:188
void printAttrDictWithWarnings(mlir::OpAsmPrinter &printer, ConcreteOp op, mlir::DictionaryAttr extraAttrs, typename mlir::PropertiesSelector< ConcreteOp >::type state)
Definition OpHelpers.h:202
mlir::ParseResult parseTemplateParams(mlir::AsmParser &parser, mlir::ArrayAttr &value)
Definition OpHelpers.h:209
mlir::ParseResult parseMultiDimAndSymbolList(mlir::OpAsmParser &parser, mlir::SmallVector< mlir::SmallVector< mlir::OpAsmParser::UnresolvedOperand > > &multiMapOperands, mlir::DenseI32ArrayAttr &numDimsPerMap)
Definition OpHelpers.h:180