44static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops1(
45 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
46 unsigned valueIndex) {
48 return op->emitOpError(valueKind) <<
" #" << valueIndex
49 <<
" must be any LLZK type, excluding struct and string types, but got " << type;
51 return ::mlir::success();
54static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops2(
55 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
56 unsigned valueIndex) {
57 if (!((::llvm::isa<::llzk::felt::FeltType>(type)))) {
58 return op->emitOpError(valueKind) <<
" #" << valueIndex
59 <<
" must be finite field element, but got " << type;
61 return ::mlir::success();
64static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops3(
65 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
66 unsigned valueIndex) {
67 if (!((type.isSignlessInteger(1)))) {
68 return op->emitOpError(valueKind) <<
" #" << valueIndex
69 <<
" must be 1-bit signless integer, but got " << type;
71 return ::mlir::success();
74static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops4(
75 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
76 unsigned valueIndex) {
78 return op->emitOpError(valueKind) <<
" #" << valueIndex
79 <<
" must be variadic of a valid LLZK type, but got " << type;
81 return ::mlir::success();
84static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops5(
85 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
86 unsigned valueIndex) {
87 if (!((::llvm::isa<::mlir::IndexType>(type)))) {
88 return op->emitOpError(valueKind) <<
" #" << valueIndex
89 <<
" must be variadic of index, but got " << type;
91 return ::mlir::success();
94static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops6(
95 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
96 unsigned valueIndex) {
98 return op->emitOpError(valueKind) <<
" #" << valueIndex
99 <<
" must be a valid LLZK type, but got " << type;
101 return ::mlir::success();
104static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops7(
105 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
106 unsigned valueIndex) {
107 if (!((::llvm::isa<::llzk::smt::BoolType>(type)))) {
108 return op->emitOpError(valueKind) <<
" #" << valueIndex
109 <<
" must be , but got " << type;
111 return ::mlir::success();
114static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops1(
115 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
116 if (attr && !((::llvm::isa<::mlir::StringAttr>(attr))))
117 return emitError() <<
"attribute '" << attrName
118 <<
"' failed to satisfy constraint: string attribute";
119 return ::mlir::success();
121static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops1(
122 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
123 return __mlir_ods_local_attr_constraint_Ops1(attr, attrName, [op]() {
124 return op->emitOpError();
128static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops2(
129 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
130 if (attr && !((::llvm::isa<::mlir::SymbolRefAttr>(attr))))
131 return emitError() <<
"attribute '" << attrName
132 <<
"' failed to satisfy constraint: symbol reference attribute";
133 return ::mlir::success();
135static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops2(
136 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
137 return __mlir_ods_local_attr_constraint_Ops2(attr, attrName, [op]() {
138 return op->emitOpError();
142static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops3(
143 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
144 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())))))
145 return emitError() <<
"attribute '" << attrName
146 <<
"' failed to satisfy constraint: type attribute of function type";
147 return ::mlir::success();
149static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops3(
150 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
151 return __mlir_ods_local_attr_constraint_Ops3(attr, attrName, [op]() {
152 return op->emitOpError();
156static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops4(
157 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
158 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))); }))))
159 return emitError() <<
"attribute '" << attrName
160 <<
"' failed to satisfy constraint: Array of dictionary attributes";
161 return ::mlir::success();
163static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops4(
164 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
165 return __mlir_ods_local_attr_constraint_Ops4(attr, attrName, [op]() {
166 return op->emitOpError();
170static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops5(
171 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
172 if (attr && !((::llvm::isa<::mlir::ArrayAttr>(attr))))
173 return emitError() <<
"attribute '" << attrName
174 <<
"' failed to satisfy constraint: array attribute";
175 return ::mlir::success();
177static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops5(
178 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
179 return __mlir_ods_local_attr_constraint_Ops5(attr, attrName, [op]() {
180 return op->emitOpError();
184static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops6(
185 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
186 if (attr && !((::llvm::isa<::mlir::DenseI32ArrayAttr>(attr))))
187 return emitError() <<
"attribute '" << attrName
188 <<
"' failed to satisfy constraint: i32 dense array attribute";
189 return ::mlir::success();
191static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops6(
192 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
193 return __mlir_ods_local_attr_constraint_Ops6(attr, attrName, [op]() {
194 return op->emitOpError();
198static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops7(
199 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
200 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))); }))))
201 return emitError() <<
"attribute '" << attrName
202 <<
"' failed to satisfy constraint: type array attribute";
203 return ::mlir::success();
205static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops7(
206 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
207 return __mlir_ods_local_attr_constraint_Ops7(attr, attrName, [op]() {
208 return op->emitOpError();
212static ::llvm::LogicalResult __mlir_ods_local_region_constraint_Ops1(
213 ::mlir::Operation *op, ::mlir::Region ®ion, ::llvm::StringRef regionName,
214 unsigned regionIndex) {
216 return op->emitOpError(
"region #") << regionIndex
217 << (regionName.empty() ?
" " :
" ('" + regionName +
"') ")
218 <<
"failed to verify constraint: any region";
220 return ::mlir::success();
223static ::llvm::LogicalResult __mlir_ods_local_region_constraint_Ops2(
224 ::mlir::Operation *op, ::mlir::Region ®ion, ::llvm::StringRef regionName,
225 unsigned regionIndex) {
226 if (!((::llvm::hasNItems(region, 1)))) {
227 return op->emitOpError(
"region #") << regionIndex
228 << (regionName.empty() ?
" " :
" ('" + regionName +
"') ")
229 <<
"failed to verify constraint: region with 1 blocks";
231 return ::mlir::success();
247 return ::mlir::success();
250void AssumeDetOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value hint) {
251 odsState.addOperands(hint);
254void AssumeDetOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value hint) {
255 odsState.addOperands(hint);
256 assert(resultTypes.size() == 0u &&
"mismatched number of results");
257 odsState.addTypes(resultTypes);
260void AssumeDetOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
261 assert(operands.size() == 1u &&
"mismatched number of parameters");
262 odsState.addOperands(operands);
263 odsState.addAttributes(attributes);
264 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
265 odsState.addTypes(resultTypes);
270 unsigned index = 0; (void)index;
273 for (
auto v : valueGroup0) {
274 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
275 return ::mlir::failure();
278 return ::mlir::success();
286 ::mlir::OpAsmParser::UnresolvedOperand hintRawOperand{};
287 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> hintOperands(&hintRawOperand, 1); ::llvm::SMLoc hintOperandsLoc;
288 (void)hintOperandsLoc;
289 ::mlir::Type hintRawType{};
290 ::llvm::ArrayRef<::mlir::Type> hintTypes(&hintRawType, 1);
292 hintOperandsLoc = parser.getCurrentLocation();
293 if (parser.parseOperand(hintRawOperand))
294 return ::mlir::failure();
296 auto loc = parser.getCurrentLocation();(void)loc;
297 if (parser.parseOptionalAttrDict(result.attributes))
298 return ::mlir::failure();
300 if (parser.parseColon())
301 return ::mlir::failure();
305 if (parser.parseCustomTypeWithFallback(type))
306 return ::mlir::failure();
309 if (parser.resolveOperands(hintOperands, hintTypes, hintOperandsLoc, result.operands))
310 return ::mlir::failure();
311 return ::mlir::success();
317 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
318 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
319 _odsPrinter <<
' ' <<
":";
322 auto type =
getHint().getType();
323 if (
auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
324 _odsPrinter.printStrippedAttrOrType(validType);
332static void getEffects(
333 ::mlir::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects
335 effects.emplace_back(::mlir::MemoryEffects::Write::get());
353 return ::mlir::success();
359void ContractEndOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
360 assert(resultTypes.size() == 0u &&
"mismatched number of results");
361 odsState.addTypes(resultTypes);
364void ContractEndOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
365 assert(operands.size() == 0u &&
"mismatched number of parameters");
366 odsState.addOperands(operands);
367 odsState.addAttributes(attributes);
368 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
369 odsState.addTypes(resultTypes);
373 return ::mlir::success();
382 auto loc = parser.getCurrentLocation();(void)loc;
383 if (parser.parseOptionalAttrDict(result.attributes))
384 return ::mlir::failure();
386 return ::mlir::success();
390 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
391 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
413 return attr.getValue();
423 return ::llvm::cast<::mlir::FunctionType>(attr.getValue());
428 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
437 if (!tblgen_function_type)
return emitError(loc,
"'verif.contract' op ""requires attribute 'function_type'");
439 if (!tblgen_sym_name)
return emitError(loc,
"'verif.contract' op ""requires attribute 'sym_name'");
441 if (!tblgen_target)
return emitError(loc,
"'verif.contract' op ""requires attribute 'target'");
443 if (tblgen_sym_name && !((::llvm::isa<::mlir::StringAttr>(tblgen_sym_name))))
444 return emitError(loc,
"'verif.contract' op ""attribute 'sym_name' failed to satisfy constraint: string attribute");
446 if (tblgen_target && !((::llvm::isa<::mlir::SymbolRefAttr>(tblgen_target))))
447 return emitError(loc,
"'verif.contract' op ""attribute 'target' failed to satisfy constraint: symbol reference attribute");
449 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())))))
450 return emitError(loc,
"'verif.contract' op ""attribute 'function_type' failed to satisfy constraint: type attribute of function type");
452 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))); }))))
453 return emitError(loc,
"'verif.contract' op ""attribute 'arg_attrs' failed to satisfy constraint: Array of dictionary attributes");
454 return ::mlir::success();
458 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
460 emitError() <<
"expected DictionaryAttr to set properties";
461 return ::mlir::failure();
466 auto attr = dict.get(
"arg_attrs");
468 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
470 propStorage = convertedAttr;
472 emitError() <<
"Invalid attribute `arg_attrs` in property conversion: " << attr;
473 return ::mlir::failure();
480 auto attr = dict.get(
"function_type");
482 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
484 propStorage = convertedAttr;
486 emitError() <<
"Invalid attribute `function_type` in property conversion: " << attr;
487 return ::mlir::failure();
494 auto attr = dict.get(
"sym_name");
496 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
498 propStorage = convertedAttr;
500 emitError() <<
"Invalid attribute `sym_name` in property conversion: " << attr;
501 return ::mlir::failure();
507 auto &propStorage = prop.
target;
508 auto attr = dict.get(
"target");
510 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
512 propStorage = convertedAttr;
514 emitError() <<
"Invalid attribute `target` in property conversion: " << attr;
515 return ::mlir::failure();
519 return ::mlir::success();
523 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
524 ::mlir::Builder odsBuilder{ctx};
527 const auto &propStorage = prop.
arg_attrs;
529 attrs.push_back(odsBuilder.getNamedAttr(
"arg_attrs",
536 attrs.push_back(odsBuilder.getNamedAttr(
"function_type",
541 const auto &propStorage = prop.
sym_name;
543 attrs.push_back(odsBuilder.getNamedAttr(
"sym_name",
548 const auto &propStorage = prop.
target;
550 attrs.push_back(odsBuilder.getNamedAttr(
"target",
555 return odsBuilder.getDictionaryAttr(attrs);
560 return llvm::hash_combine(
561 llvm::hash_value(prop.
arg_attrs.getAsOpaquePointer()),
563 llvm::hash_value(prop.
sym_name.getAsOpaquePointer()),
564 llvm::hash_value(prop.
target.getAsOpaquePointer()));
568 if (name ==
"arg_attrs")
571 if (name ==
"function_type")
574 if (name ==
"sym_name")
577 if (name ==
"target")
583 if (name ==
"arg_attrs") {
584 prop.
arg_attrs = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
arg_attrs)>>(value);
588 if (name ==
"function_type") {
593 if (name ==
"sym_name") {
594 prop.
sym_name = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
sym_name)>>(value);
598 if (name ==
"target") {
599 prop.
target = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
target)>>(value);
614::llvm::LogicalResult
ContractOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
617 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops4(attr,
"arg_attrs", emitError)))
618 return ::mlir::failure();
623 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops3(attr,
"function_type", emitError)))
624 return ::mlir::failure();
629 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(attr,
"sym_name", emitError)))
630 return ::mlir::failure();
635 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(attr,
"target", emitError)))
636 return ::mlir::failure();
638 return ::mlir::success();
642 auto &prop = state.getOrAddProperties<
Properties>(); (void)prop;
643 if (::mlir::failed(reader.readOptionalAttribute(prop.
arg_attrs)))
644 return ::mlir::failure();
646 if (::mlir::failed(reader.readAttribute(prop.
function_type)))
647 return ::mlir::failure();
649 if (::mlir::failed(reader.readAttribute(prop.
sym_name)))
650 return ::mlir::failure();
652 if (::mlir::failed(reader.readAttribute(prop.
target)))
653 return ::mlir::failure();
654 return ::mlir::success();
658 auto &prop = getProperties(); (void)prop;
660 writer.writeOptionalAttribute(prop.
arg_attrs);
662 writer.writeAttribute(prop.
sym_name);
663 writer.writeAttribute(prop.
target);
668 return attr.getValue();
678 return ::llvm::cast<::mlir::FunctionType>(attr.getValue());
683 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
687 getProperties().sym_name = ::mlir::Builder((*this)->getContext()).getStringAttr(attrValue);
691 getProperties().function_type = ::mlir::TypeAttr::get(attrValue);
694void ContractOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, ::mlir::SymbolRefAttr target, ::mlir::TypeAttr function_type, ::mlir::ArrayAttr arg_attrs) {
695 build(odsBuilder, odsState, ::mlir::TypeRange {}, sym_name, target, function_type, arg_attrs);
699void 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) {
700 odsState.getOrAddProperties<
Properties>().sym_name = sym_name;
701 odsState.getOrAddProperties<
Properties>().target = target;
702 odsState.getOrAddProperties<
Properties>().function_type = function_type;
704 odsState.getOrAddProperties<
Properties>().arg_attrs = arg_attrs;
707 odsBuilder, odsState, ::llvm::cast<::mlir::FunctionType>(function_type.getValue())
709 assert(resultTypes.size() == 0u &&
"mismatched number of results");
710 odsState.addTypes(resultTypes);
714void ContractOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef sym_name, ::mlir::SymbolRefAttr target, ::mlir::FunctionType function_type, ::mlir::ArrayAttr arg_attrs) {
715 build(odsBuilder, odsState, ::mlir::TypeRange {}, sym_name, target, function_type, arg_attrs);
719void 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) {
720 odsState.getOrAddProperties<
Properties>().sym_name = odsBuilder.getStringAttr(sym_name);
721 odsState.getOrAddProperties<
Properties>().target = target;
722 odsState.getOrAddProperties<
Properties>().function_type = ::mlir::TypeAttr::get(function_type);
724 odsState.getOrAddProperties<
Properties>().arg_attrs = arg_attrs;
726 initializeEmptyBody(odsBuilder, odsState, function_type);
727 assert(resultTypes.size() == 0u &&
"mismatched number of results");
728 odsState.addTypes(resultTypes);
733 auto tblgen_arg_attrs = getProperties().arg_attrs; (void)tblgen_arg_attrs;
734 auto tblgen_function_type = getProperties().function_type; (void)tblgen_function_type;
735 if (!tblgen_function_type)
return emitOpError(
"requires attribute 'function_type'");
736 auto tblgen_sym_name = getProperties().sym_name; (void)tblgen_sym_name;
737 if (!tblgen_sym_name)
return emitOpError(
"requires attribute 'sym_name'");
738 auto tblgen_target = getProperties().target; (void)tblgen_target;
739 if (!tblgen_target)
return emitOpError(
"requires attribute 'target'");
741 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(*
this, tblgen_sym_name,
"sym_name")))
742 return ::mlir::failure();
744 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(*
this, tblgen_target,
"target")))
745 return ::mlir::failure();
747 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops3(*
this, tblgen_function_type,
"function_type")))
748 return ::mlir::failure();
750 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops4(*
this, tblgen_arg_attrs,
"arg_attrs")))
751 return ::mlir::failure();
753 unsigned index = 0; (void)index;
755 for (
auto ®ion : ::llvm::MutableArrayRef((*this)->getRegion(0)))
756 if (::mlir::failed(__mlir_ods_local_region_constraint_Ops1(*
this, region,
"body", index++)))
757 return ::mlir::failure();
759 return ::mlir::success();
764 return ::mlir::success();
765 return ::mlir::failure();
784 return ::mlir::success();
787void DecreasesOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value) {
788 odsState.addOperands(value);
791void DecreasesOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value value) {
792 odsState.addOperands(value);
793 assert(resultTypes.size() == 0u &&
"mismatched number of results");
794 odsState.addTypes(resultTypes);
797void DecreasesOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
798 assert(operands.size() == 1u &&
"mismatched number of parameters");
799 odsState.addOperands(operands);
800 odsState.addAttributes(attributes);
801 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
802 odsState.addTypes(resultTypes);
807 unsigned index = 0; (void)index;
810 for (
auto v : valueGroup0) {
811 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"operand", index++)))
812 return ::mlir::failure();
815 return ::mlir::success();
823 ::mlir::OpAsmParser::UnresolvedOperand valueRawOperand{};
824 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> valueOperands(&valueRawOperand, 1); ::llvm::SMLoc valueOperandsLoc;
825 (void)valueOperandsLoc;
827 valueOperandsLoc = parser.getCurrentLocation();
828 if (parser.parseOperand(valueRawOperand))
829 return ::mlir::failure();
831 auto loc = parser.getCurrentLocation();(void)loc;
832 if (parser.parseOptionalAttrDict(result.attributes))
833 return ::mlir::failure();
836 if (parser.resolveOperands(valueOperands, odsBuildableType0, valueOperandsLoc, result.operands))
837 return ::mlir::failure();
838 return ::mlir::success();
844 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
845 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
851 ::mlir::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects
853 effects.emplace_back(::mlir::MemoryEffects::Write::get());
871 return ::mlir::success();
875 odsState.addOperands(condition);
878void EnsureComputeOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
879 odsState.addOperands(condition);
880 assert(resultTypes.size() == 0u &&
"mismatched number of results");
881 odsState.addTypes(resultTypes);
884void EnsureComputeOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
885 assert(operands.size() == 1u &&
"mismatched number of parameters");
886 odsState.addOperands(operands);
887 odsState.addAttributes(attributes);
888 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
889 odsState.addTypes(resultTypes);
894 unsigned index = 0; (void)index;
897 for (
auto v : valueGroup0) {
898 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*
this, v.getType(),
"operand", index++)))
899 return ::mlir::failure();
902 return ::mlir::success();
910 ::mlir::OpAsmParser::UnresolvedOperand conditionRawOperand{};
911 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> conditionOperands(&conditionRawOperand, 1); ::llvm::SMLoc conditionOperandsLoc;
912 (void)conditionOperandsLoc;
914 conditionOperandsLoc = parser.getCurrentLocation();
915 if (parser.parseOperand(conditionRawOperand))
916 return ::mlir::failure();
918 auto loc = parser.getCurrentLocation();(void)loc;
919 if (parser.parseOptionalAttrDict(result.attributes))
920 return ::mlir::failure();
922 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
923 if (parser.resolveOperands(conditionOperands, odsBuildableType0, conditionOperandsLoc, result.operands))
924 return ::mlir::failure();
925 return ::mlir::success();
931 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
932 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
938 ::mlir::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects
940 effects.emplace_back(::mlir::MemoryEffects::Write::get());
958 return ::mlir::success();
962 odsState.addOperands(condition);
965void EnsureConstrainOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
966 odsState.addOperands(condition);
967 assert(resultTypes.size() == 0u &&
"mismatched number of results");
968 odsState.addTypes(resultTypes);
971void EnsureConstrainOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
972 assert(operands.size() == 1u &&
"mismatched number of parameters");
973 odsState.addOperands(operands);
974 odsState.addAttributes(attributes);
975 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
976 odsState.addTypes(resultTypes);
981 unsigned index = 0; (void)index;
984 for (
auto v : valueGroup0) {
985 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*
this, v.getType(),
"operand", index++)))
986 return ::mlir::failure();
989 return ::mlir::success();
997 ::mlir::OpAsmParser::UnresolvedOperand conditionRawOperand{};
998 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> conditionOperands(&conditionRawOperand, 1); ::llvm::SMLoc conditionOperandsLoc;
999 (void)conditionOperandsLoc;
1001 conditionOperandsLoc = parser.getCurrentLocation();
1002 if (parser.parseOperand(conditionRawOperand))
1003 return ::mlir::failure();
1005 auto loc = parser.getCurrentLocation();(void)loc;
1006 if (parser.parseOptionalAttrDict(result.attributes))
1007 return ::mlir::failure();
1009 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
1010 if (parser.resolveOperands(conditionOperands, odsBuildableType0, conditionOperandsLoc, result.operands))
1011 return ::mlir::failure();
1012 return ::mlir::success();
1018 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1019 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1025 ::mlir::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects
1027 effects.emplace_back(::mlir::MemoryEffects::Write::get());
1047 for (
unsigned i = 0; i < index; ++i)
1048 start += sizeAttr[i];
1049 return {start, sizeAttr[index]};
1059 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
1063 auto attr = ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(
getProperties().numDimsPerMap);
1082 if (!tblgen_callee)
return emitError(loc,
"'verif.include' op ""requires attribute 'callee'");
1084 if (!tblgen_mapOpGroupSizes)
return emitError(loc,
"'verif.include' op ""requires attribute 'mapOpGroupSizes'");
1088 if (tblgen_callee && !((::llvm::isa<::mlir::SymbolRefAttr>(tblgen_callee))))
1089 return emitError(loc,
"'verif.include' op ""attribute 'callee' failed to satisfy constraint: symbol reference attribute");
1091 if (tblgen_templateParams && !((::llvm::isa<::mlir::ArrayAttr>(tblgen_templateParams))))
1092 return emitError(loc,
"'verif.include' op ""attribute 'templateParams' failed to satisfy constraint: array attribute");
1094 if (tblgen_numDimsPerMap && !((::llvm::isa<::mlir::DenseI32ArrayAttr>(tblgen_numDimsPerMap))))
1095 return emitError(loc,
"'verif.include' op ""attribute 'numDimsPerMap' failed to satisfy constraint: i32 dense array attribute");
1097 if (tblgen_mapOpGroupSizes && !((::llvm::isa<::mlir::DenseI32ArrayAttr>(tblgen_mapOpGroupSizes))))
1098 return emitError(loc,
"'verif.include' op ""attribute 'mapOpGroupSizes' failed to satisfy constraint: i32 dense array attribute");
1099 return ::mlir::success();
1103 ::llvm::ArrayRef<int32_t> sizeAttr = getProperties().operandSegmentSizes;
1106 for (
unsigned i = 0; i < index; ++i)
1107 start += sizeAttr[i];
1108 return {start, sizeAttr[index]};
1113 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second, ::mlir::MutableOperandRange::OperandSegment(0u, {getOperandSegmentSizesAttrName(), ::mlir::DenseI32ArrayAttr::get(getContext(), getProperties().operandSegmentSizes)}));
1114 return mutableRange;
1119 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second, ::mlir::MutableOperandRange::OperandSegment(1u, {getOperandSegmentSizesAttrName(), ::mlir::DenseI32ArrayAttr::get(getContext(), getProperties().operandSegmentSizes)}));
1124 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
1126 emitError() <<
"expected DictionaryAttr to set properties";
1127 return ::mlir::failure();
1131 auto &propStorage = prop.
callee;
1132 auto attr = dict.get(
"callee");
1134 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
1135 if (convertedAttr) {
1136 propStorage = convertedAttr;
1138 emitError() <<
"Invalid attribute `callee` in property conversion: " << attr;
1139 return ::mlir::failure();
1146 auto attr = dict.get(
"mapOpGroupSizes");
1148 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
1149 if (convertedAttr) {
1150 propStorage = convertedAttr;
1152 emitError() <<
"Invalid attribute `mapOpGroupSizes` in property conversion: " << attr;
1153 return ::mlir::failure();
1160 auto attr = dict.get(
"numDimsPerMap");
1162 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
1163 if (convertedAttr) {
1164 propStorage = convertedAttr;
1166 emitError() <<
"Invalid attribute `numDimsPerMap` in property conversion: " << attr;
1167 return ::mlir::failure();
1174 auto attr = dict.get(
"templateParams");
1176 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
1177 if (convertedAttr) {
1178 propStorage = convertedAttr;
1180 emitError() <<
"Invalid attribute `templateParams` in property conversion: " << attr;
1181 return ::mlir::failure();
1187 auto setFromAttr = [] (
auto &propStorage, ::mlir::Attribute propAttr,
1188 ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) -> ::mlir::LogicalResult {
1189 return convertFromAttribute(propStorage, propAttr, emitError);
1191 auto attr = dict.get(
"operandSegmentSizes");
if (!attr) attr = dict.get(
"operand_segment_sizes");;
1194 return ::mlir::failure();
1196 return ::mlir::success();
1200 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
1201 ::mlir::Builder odsBuilder{ctx};
1204 const auto &propStorage = prop.
callee;
1206 attrs.push_back(odsBuilder.getNamedAttr(
"callee",
1213 attrs.push_back(odsBuilder.getNamedAttr(
"mapOpGroupSizes",
1220 attrs.push_back(odsBuilder.getNamedAttr(
"numDimsPerMap",
1227 attrs.push_back(odsBuilder.getNamedAttr(
"templateParams",
1233 auto attr = [&]() -> ::mlir::Attribute {
1234 return ::mlir::DenseI32ArrayAttr::get(ctx, propStorage);
1236 attrs.push_back(odsBuilder.getNamedAttr(
"operandSegmentSizes", attr));
1240 return odsBuilder.getDictionaryAttr(attrs);
1245 auto hash_operandSegmentSizes = [] (
const auto &propStorage) -> llvm::hash_code {
1246 return ::llvm::hash_combine_range(std::begin(propStorage), std::end(propStorage));;
1248 return llvm::hash_combine(
1249 llvm::hash_value(prop.
callee.getAsOpaquePointer()),
1257 if (name ==
"callee")
1260 if (name ==
"mapOpGroupSizes")
1263 if (name ==
"numDimsPerMap")
1266 if (name ==
"templateParams")
1268 if (name ==
"operand_segment_sizes" || name ==
"operandSegmentSizes")
return [&]() -> ::mlir::Attribute { return ::mlir::DenseI32ArrayAttr::get(ctx, prop.
operandSegmentSizes); }();
1269 return std::nullopt;
1273 if (name ==
"callee") {
1274 prop.
callee = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
callee)>>(value);
1278 if (name ==
"mapOpGroupSizes") {
1283 if (name ==
"numDimsPerMap") {
1288 if (name ==
"templateParams") {
1292 if (name ==
"operand_segment_sizes" || name ==
"operandSegmentSizes") {
1293 auto arrAttr = ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(value);
1294 if (!arrAttr)
return;
1310 attrs.append(
"operandSegmentSizes", [&]() -> ::mlir::Attribute { return ::mlir::DenseI32ArrayAttr::get(ctx, prop.
operandSegmentSizes); }());
1313::llvm::LogicalResult
IncludeOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1316 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(attr,
"callee", emitError)))
1317 return ::mlir::failure();
1322 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops6(attr,
"mapOpGroupSizes", emitError)))
1323 return ::mlir::failure();
1328 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops6(attr,
"numDimsPerMap", emitError)))
1329 return ::mlir::failure();
1334 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops5(attr,
"templateParams", emitError)))
1335 return ::mlir::failure();
1337 return ::mlir::success();
1341 auto &prop = state.getOrAddProperties<
Properties>(); (void)prop;
1342 if (::mlir::failed(reader.readAttribute(prop.
callee)))
1343 return ::mlir::failure();
1346 return ::mlir::failure();
1348 if (::mlir::failed(reader.readOptionalAttribute(prop.
numDimsPerMap)))
1349 return ::mlir::failure();
1351 if (reader.getBytecodeVersion() < 6) {
1353 ::mlir::DenseI32ArrayAttr attr;
1354 if (::mlir::failed(reader.readAttribute(attr))) return ::mlir::failure();
1355 if (attr.size() >
static_cast<int64_t
>(
sizeof(propStorage) /
sizeof(int32_t))) {
1356 reader.emitError(
"size mismatch for operand/result_segment_size");
1357 return ::mlir::failure();
1359 ::llvm::copy(::llvm::ArrayRef<int32_t>(attr), propStorage.begin());
1362 if (::mlir::failed(reader.readOptionalAttribute(prop.
templateParams)))
1363 return ::mlir::failure();
1367 auto readProp = [&]() {
1369 if (reader.getBytecodeVersion() >= 6)
1370 return reader.readSparseArray(::llvm::MutableArrayRef(propStorage));
1372 return ::mlir::success();
1374 if (::mlir::failed(readProp()))
1375 return ::mlir::failure();
1377 return ::mlir::success();
1381 auto &prop = getProperties(); (void)prop;
1382 writer.writeAttribute(prop.
callee);
1387if (writer.getBytecodeVersion() < 6) {
1389 writer.writeAttribute(::mlir::DenseI32ArrayAttr::get(this->getContext(), propStorage));
1397 if (writer.getBytecodeVersion() >= 6)
1398 writer.writeSparseArray(::llvm::ArrayRef(propStorage));
1410 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
1424 getProperties().numDimsPerMap = ::mlir::Builder((*this)->getContext()).getDenseI32ArrayAttr(attrValue);
1428 getProperties().mapOpGroupSizes = ::mlir::Builder((*this)->getContext()).getDenseI32ArrayAttr(attrValue);
1431void 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) {
1432 build(odsBuilder, odsState, callee, mapOperands,
1433 odsBuilder.getDenseI32ArrayAttr(numDimsPerMap),
1434 argOperands, templateParams);
1439 build(odsBuilder, odsState,
1441 argOperands, templateParams);
1445void 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) {
1446 build(odsBuilder, odsState,
1448 argOperands, templateParams);
1452void 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) {
1453 build(odsBuilder, odsState, callee, mapOperands,
1454 odsBuilder.getDenseI32ArrayAttr(numDimsPerMap),
1455 argOperands, templateParams);
1460 ::mlir::Builder odsBuilder(opName.getContext());
1462 properties.
numDimsPerMap = odsBuilder.getDenseI32ArrayAttr({});
1466 auto tblgen_callee = getProperties().callee; (void)tblgen_callee;
1467 if (!tblgen_callee)
return emitOpError(
"requires attribute 'callee'");
1468 auto tblgen_mapOpGroupSizes = getProperties().mapOpGroupSizes; (void)tblgen_mapOpGroupSizes;
1469 if (!tblgen_mapOpGroupSizes)
return emitOpError(
"requires attribute 'mapOpGroupSizes'");
1470 auto tblgen_numDimsPerMap = getProperties().numDimsPerMap; (void)tblgen_numDimsPerMap;
1471 auto tblgen_templateParams = getProperties().templateParams; (void)tblgen_templateParams;
1473 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(*
this, tblgen_callee,
"callee")))
1474 return ::mlir::failure();
1476 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops5(*
this, tblgen_templateParams,
"templateParams")))
1477 return ::mlir::failure();
1479 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops6(*
this, tblgen_numDimsPerMap,
"numDimsPerMap")))
1480 return ::mlir::failure();
1482 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops6(*
this, tblgen_mapOpGroupSizes,
"mapOpGroupSizes")))
1483 return ::mlir::failure();
1485 unsigned index = 0; (void)index;
1488 for (
auto v : valueGroup0) {
1489 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops4(*
this, v.getType(),
"operand", index++)))
1490 return ::mlir::failure();
1493 if (::mlir::failed(::mlir::OpTrait::impl::verifyValueSizeAttr(*
this,
"mapOpGroupSizes",
"mapOperands", valueGroup1.size())))
1494 return ::mlir::failure();
1496 for (
auto v : valueGroup1) {
1497 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops5(*
this, v.getType(),
"operand", index++)))
1498 return ::mlir::failure();
1501 return ::mlir::success();
1508::mlir::ParseResult
IncludeOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1509 ::mlir::SymbolRefAttr calleeAttr;
1510 ::mlir::ArrayAttr templateParamsAttr;
1511 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argOperandsOperands;
1512 ::llvm::SMLoc argOperandsOperandsLoc;
1513 (void)argOperandsOperandsLoc;
1514 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> mapOperandsOperands;
1515 llvm::SmallVector<int32_t> mapOperandsOperandGroupSizes;
1516 ::llvm::SMLoc mapOperandsOperandsLoc;
1517 (void)mapOperandsOperandsLoc;
1518 ::mlir::DenseI32ArrayAttr numDimsPerMapAttr;
1519 ::llvm::ArrayRef<::mlir::Type> argOperandsTypes;
1520 ::llvm::ArrayRef<::mlir::Type> allResultTypes;
1522 if (parser.parseCustomAttributeWithFallback(calleeAttr, parser.getBuilder().getType<::mlir::NoneType>())) {
1523 return ::mlir::failure();
1526 if (::mlir::succeeded(parser.parseOptionalLess())) {
1529 if (odsResult) return ::mlir::failure();
1530 if (templateParamsAttr)
1533 if (parser.parseGreater())
1534 return ::mlir::failure();
1536 if (parser.parseLParen())
1537 return ::mlir::failure();
1539 argOperandsOperandsLoc = parser.getCurrentLocation();
1540 if (parser.parseOperandList(argOperandsOperands))
1541 return ::mlir::failure();
1542 if (parser.parseRParen())
1543 return ::mlir::failure();
1544 if (::mlir::succeeded(parser.parseOptionalLBrace())) {
1546 mapOperandsOperandsLoc = parser.getCurrentLocation();
1547 ::llvm::SmallVector<::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand>> mapOperandsOperandGroups;
1549 if (odsResult) return ::mlir::failure();
1550 for (
const auto &subRange : mapOperandsOperandGroups) {
1551 mapOperandsOperands.append(subRange.begin(), subRange.end());
1552 mapOperandsOperandGroupSizes.push_back(subRange.size());
1554 if (numDimsPerMapAttr)
1557 if (parser.parseRBrace())
1558 return ::mlir::failure();
1560 if (parser.parseColon())
1561 return ::mlir::failure();
1563 ::mlir::FunctionType argOperands__allResult_functionType;
1564 if (parser.parseType(argOperands__allResult_functionType))
1565 return ::mlir::failure();
1566 argOperandsTypes = argOperands__allResult_functionType.getInputs();
1567 allResultTypes = argOperands__allResult_functionType.getResults();
1570 if (odsResult) return ::mlir::failure();
1572::llvm::copy(::llvm::ArrayRef<int32_t>({
static_cast<int32_t
>(argOperandsOperands.size()),
static_cast<int32_t
>(mapOperandsOperands.size())}), result.getOrAddProperties<
IncludeOp::Properties>().operandSegmentSizes.begin());
1573 result.getOrAddProperties<
IncludeOp::Properties>().mapOpGroupSizes = parser.getBuilder().getDenseI32ArrayAttr(mapOperandsOperandGroupSizes);
1574 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIndexType();
1575 result.addTypes(allResultTypes);
1576 if (parser.resolveOperands(argOperandsOperands, argOperandsTypes, argOperandsOperandsLoc, result.operands))
1577 return ::mlir::failure();
1578 if (parser.resolveOperands(mapOperandsOperands, odsBuildableType0, mapOperandsOperandsLoc, result.operands))
1579 return ::mlir::failure();
1580 return ::mlir::success();
1584 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
1586 emitError() <<
"expected DictionaryAttr to set properties";
1587 return ::mlir::failure();
1592 auto attr = dict.get(
"mapOpGroupSizes");
1595 emitError() <<
"expected key entry for mapOpGroupSizes in DictionaryAttr to set "
1597 return ::mlir::failure();
1599 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
1600 if (convertedAttr) {
1601 propStorage = convertedAttr;
1603 emitError() <<
"Invalid attribute `mapOpGroupSizes` in property conversion: " << attr;
1604 return ::mlir::failure();
1608 return ::mlir::success();
1623 _odsPrinter <<
' ' <<
"{";
1627 _odsPrinter <<
' ' <<
":";
1629 _odsPrinter.printFunctionalType(
getArgOperands().getTypes(), getOperation()->getResultTypes());
1650 return ::mlir::success();
1653void IncreasesOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value) {
1654 odsState.addOperands(value);
1657void IncreasesOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value value) {
1658 odsState.addOperands(value);
1659 assert(resultTypes.size() == 0u &&
"mismatched number of results");
1660 odsState.addTypes(resultTypes);
1663void IncreasesOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1664 assert(operands.size() == 1u &&
"mismatched number of parameters");
1665 odsState.addOperands(operands);
1666 odsState.addAttributes(attributes);
1667 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
1668 odsState.addTypes(resultTypes);
1673 unsigned index = 0; (void)index;
1676 for (
auto v : valueGroup0) {
1677 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"operand", index++)))
1678 return ::mlir::failure();
1681 return ::mlir::success();
1689 ::mlir::OpAsmParser::UnresolvedOperand valueRawOperand{};
1690 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> valueOperands(&valueRawOperand, 1); ::llvm::SMLoc valueOperandsLoc;
1691 (void)valueOperandsLoc;
1693 valueOperandsLoc = parser.getCurrentLocation();
1694 if (parser.parseOperand(valueRawOperand))
1695 return ::mlir::failure();
1697 auto loc = parser.getCurrentLocation();(void)loc;
1698 if (parser.parseOptionalAttrDict(result.attributes))
1699 return ::mlir::failure();
1702 if (parser.resolveOperands(valueOperands, odsBuildableType0, valueOperandsLoc, result.operands))
1703 return ::mlir::failure();
1704 return ::mlir::success();
1710 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1711 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1717 ::mlir::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects
1719 effects.emplace_back(::mlir::MemoryEffects::Write::get());
1737 return attr.getValue();
1750 if (!tblgen_loop_arg_types)
return emitError(loc,
"'verif.invariant' op ""requires attribute 'loop_arg_types'");
1752 if (!tblgen_loop_name)
return emitError(loc,
"'verif.invariant' op ""requires attribute 'loop_name'");
1754 if (tblgen_loop_name && !((::llvm::isa<::mlir::StringAttr>(tblgen_loop_name))))
1755 return emitError(loc,
"'verif.invariant' op ""attribute 'loop_name' failed to satisfy constraint: string attribute");
1757 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))); }))))
1758 return emitError(loc,
"'verif.invariant' op ""attribute 'loop_arg_types' failed to satisfy constraint: type array attribute");
1759 return ::mlir::success();
1763 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
1765 emitError() <<
"expected DictionaryAttr to set properties";
1766 return ::mlir::failure();
1771 auto attr = dict.get(
"loop_arg_types");
1773 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
1774 if (convertedAttr) {
1775 propStorage = convertedAttr;
1777 emitError() <<
"Invalid attribute `loop_arg_types` in property conversion: " << attr;
1778 return ::mlir::failure();
1785 auto attr = dict.get(
"loop_name");
1787 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
1788 if (convertedAttr) {
1789 propStorage = convertedAttr;
1791 emitError() <<
"Invalid attribute `loop_name` in property conversion: " << attr;
1792 return ::mlir::failure();
1796 return ::mlir::success();
1800 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
1801 ::mlir::Builder odsBuilder{ctx};
1806 attrs.push_back(odsBuilder.getNamedAttr(
"loop_arg_types",
1811 const auto &propStorage = prop.
loop_name;
1813 attrs.push_back(odsBuilder.getNamedAttr(
"loop_name",
1818 return odsBuilder.getDictionaryAttr(attrs);
1823 return llvm::hash_combine(
1825 llvm::hash_value(prop.
loop_name.getAsOpaquePointer()));
1829 if (name ==
"loop_arg_types")
1832 if (name ==
"loop_name")
1834 return std::nullopt;
1838 if (name ==
"loop_arg_types") {
1843 if (name ==
"loop_name") {
1844 prop.
loop_name = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
loop_name)>>(value);
1855::llvm::LogicalResult
InvariantOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1858 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops7(attr,
"loop_arg_types", emitError)))
1859 return ::mlir::failure();
1864 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(attr,
"loop_name", emitError)))
1865 return ::mlir::failure();
1867 return ::mlir::success();
1871 auto &prop = state.getOrAddProperties<
Properties>(); (void)prop;
1873 return ::mlir::failure();
1875 if (::mlir::failed(reader.readAttribute(prop.
loop_name)))
1876 return ::mlir::failure();
1877 return ::mlir::success();
1881 auto &prop = getProperties(); (void)prop;
1888 return attr.getValue();
1897 getProperties().loop_name = ::mlir::Builder((*this)->getContext()).getStringAttr(attrValue);
1901 auto tblgen_loop_arg_types = getProperties().loop_arg_types; (void)tblgen_loop_arg_types;
1902 if (!tblgen_loop_arg_types)
return emitOpError(
"requires attribute 'loop_arg_types'");
1903 auto tblgen_loop_name = getProperties().loop_name; (void)tblgen_loop_name;
1904 if (!tblgen_loop_name)
return emitOpError(
"requires attribute 'loop_name'");
1906 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(*
this, tblgen_loop_name,
"loop_name")))
1907 return ::mlir::failure();
1909 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops7(*
this, tblgen_loop_arg_types,
"loop_arg_types")))
1910 return ::mlir::failure();
1912 unsigned index = 0; (void)index;
1914 for (
auto ®ion : ::llvm::MutableArrayRef((*this)->getRegion(0)))
1915 if (::mlir::failed(__mlir_ods_local_region_constraint_Ops2(*
this, region,
"region", index++)))
1916 return ::mlir::failure();
1918 return ::mlir::success();
1923 return ::mlir::success();
1924 return ::mlir::failure();
1943 return ::mlir::success();
1946void OldOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value value) {
1947 odsState.addOperands(value);
1948 odsState.addTypes(result);
1951void OldOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value) {
1952 odsState.addOperands(value);
1954 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1956 odsState.location, odsState.operands,
1957 odsState.attributes.getDictionary(odsState.getContext()),
1958 odsState.getRawProperties(),
1959 odsState.regions, inferredReturnTypes)))
1960 odsState.addTypes(inferredReturnTypes);
1962 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1966void OldOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value value) {
1967 odsState.addOperands(value);
1968 assert(resultTypes.size() == 1u &&
"mismatched number of results");
1969 odsState.addTypes(resultTypes);
1972void OldOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1973 assert(operands.size() == 1u &&
"mismatched number of parameters");
1974 odsState.addOperands(operands);
1975 odsState.addAttributes(attributes);
1976 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
1977 odsState.addTypes(resultTypes);
1980void OldOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1981 assert(operands.size() == 1u &&
"mismatched number of parameters");
1982 odsState.addOperands(operands);
1983 odsState.addAttributes(attributes);
1985 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1987 odsState.location, operands,
1988 odsState.attributes.getDictionary(odsState.getContext()),
1989 odsState.getRawProperties(),
1990 odsState.regions, inferredReturnTypes))) {
1991 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
1992 odsState.addTypes(inferredReturnTypes);
1994 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
2000 unsigned index = 0; (void)index;
2003 for (
auto v : valueGroup0) {
2004 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops6(*
this, v.getType(),
"operand", index++)))
2005 return ::mlir::failure();
2009 unsigned index = 0; (void)index;
2012 for (
auto v : valueGroup0) {
2013 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops6(*
this, v.getType(),
"result", index++)))
2014 return ::mlir::failure();
2018 return emitOpError(
"failed to verify that all of {value, result} have same type");
2019 return ::mlir::success();
2026::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) {
2027 inferredReturnTypes.resize(1);
2028 ::mlir::Builder odsBuilder(context);
2029 if (operands.size() <= 0)
2030 return ::mlir::failure();
2031 ::mlir::Type odsInferredType0 = operands[0].getType();
2032 inferredReturnTypes[0] = odsInferredType0;
2033 return ::mlir::success();
2036::mlir::ParseResult
OldOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2037 ::mlir::OpAsmParser::UnresolvedOperand valueRawOperand{};
2038 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> valueOperands(&valueRawOperand, 1); ::llvm::SMLoc valueOperandsLoc;
2039 (void)valueOperandsLoc;
2040 ::mlir::Type resultRawType{};
2041 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
2043 valueOperandsLoc = parser.getCurrentLocation();
2044 if (parser.parseOperand(valueRawOperand))
2045 return ::mlir::failure();
2046 if (parser.parseColon())
2047 return ::mlir::failure();
2051 if (parser.parseCustomTypeWithFallback(type))
2052 return ::mlir::failure();
2053 resultRawType = type;
2056 auto loc = parser.getCurrentLocation();(void)loc;
2057 if (parser.parseOptionalAttrDict(result.attributes))
2058 return ::mlir::failure();
2060 result.addTypes(resultTypes);
2061 if (parser.resolveOperands(valueOperands, resultTypes[0], valueOperandsLoc, result.operands))
2062 return ::mlir::failure();
2063 return ::mlir::success();
2069 _odsPrinter <<
' ' <<
":";
2073 if (
auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
2074 _odsPrinter.printStrippedAttrOrType(validType);
2076 _odsPrinter << type;
2078 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2079 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2082void OldOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
2101 return ::mlir::success();
2104void ProveDetOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value condition) {
2105 odsState.addOperands(condition);
2106 odsState.addTypes(result);
2109void ProveDetOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition) {
2110 odsState.addOperands(condition);
2112 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2114 odsState.location, odsState.operands,
2115 odsState.attributes.getDictionary(odsState.getContext()),
2116 odsState.getRawProperties(),
2117 odsState.regions, inferredReturnTypes)))
2118 odsState.addTypes(inferredReturnTypes);
2120 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
2124void ProveDetOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
2125 odsState.addOperands(condition);
2126 assert(resultTypes.size() == 1u &&
"mismatched number of results");
2127 odsState.addTypes(resultTypes);
2130void ProveDetOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2131 assert(operands.size() == 1u &&
"mismatched number of parameters");
2132 odsState.addOperands(operands);
2133 odsState.addAttributes(attributes);
2134 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
2135 odsState.addTypes(resultTypes);
2138void ProveDetOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2139 assert(operands.size() == 1u &&
"mismatched number of parameters");
2140 odsState.addOperands(operands);
2141 odsState.addAttributes(attributes);
2143 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2145 odsState.location, operands,
2146 odsState.attributes.getDictionary(odsState.getContext()),
2147 odsState.getRawProperties(),
2148 odsState.regions, inferredReturnTypes))) {
2149 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
2150 odsState.addTypes(inferredReturnTypes);
2152 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
2158 unsigned index = 0; (void)index;
2161 for (
auto v : valueGroup0) {
2162 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
2163 return ::mlir::failure();
2167 unsigned index = 0; (void)index;
2170 for (
auto v : valueGroup0) {
2171 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*
this, v.getType(),
"result", index++)))
2172 return ::mlir::failure();
2175 return ::mlir::success();
2182::llvm::LogicalResult
ProveDetOp::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) {
2183 inferredReturnTypes.resize(1);
2184 ::mlir::Builder odsBuilder(context);
2185 ::mlir::Type odsInferredType0 = odsBuilder.getIntegerType(1);
2186 inferredReturnTypes[0] = odsInferredType0;
2187 return ::mlir::success();
2191 ::mlir::OpAsmParser::UnresolvedOperand conditionRawOperand{};
2192 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> conditionOperands(&conditionRawOperand, 1); ::llvm::SMLoc conditionOperandsLoc;
2193 (void)conditionOperandsLoc;
2194 ::mlir::Type conditionRawType{};
2195 ::llvm::ArrayRef<::mlir::Type> conditionTypes(&conditionRawType, 1);
2197 conditionOperandsLoc = parser.getCurrentLocation();
2198 if (parser.parseOperand(conditionRawOperand))
2199 return ::mlir::failure();
2201 auto loc = parser.getCurrentLocation();(void)loc;
2202 if (parser.parseOptionalAttrDict(result.attributes))
2203 return ::mlir::failure();
2205 if (parser.parseColon())
2206 return ::mlir::failure();
2210 if (parser.parseCustomTypeWithFallback(type))
2211 return ::mlir::failure();
2212 conditionRawType = type;
2214 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
2215 result.addTypes(odsBuildableType0);
2216 if (parser.resolveOperands(conditionOperands, conditionTypes, conditionOperandsLoc, result.operands))
2217 return ::mlir::failure();
2218 return ::mlir::success();
2224 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2225 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2226 _odsPrinter <<
' ' <<
":";
2230 if (
auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
2231 _odsPrinter.printStrippedAttrOrType(validType);
2233 _odsPrinter << type;
2253 return ::mlir::success();
2257 odsState.addOperands(condition);
2260void RequireComputeOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
2261 odsState.addOperands(condition);
2262 assert(resultTypes.size() == 0u &&
"mismatched number of results");
2263 odsState.addTypes(resultTypes);
2266void RequireComputeOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2267 assert(operands.size() == 1u &&
"mismatched number of parameters");
2268 odsState.addOperands(operands);
2269 odsState.addAttributes(attributes);
2270 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
2271 odsState.addTypes(resultTypes);
2276 unsigned index = 0; (void)index;
2279 for (
auto v : valueGroup0) {
2280 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*
this, v.getType(),
"operand", index++)))
2281 return ::mlir::failure();
2284 return ::mlir::success();
2292 ::mlir::OpAsmParser::UnresolvedOperand conditionRawOperand{};
2293 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> conditionOperands(&conditionRawOperand, 1); ::llvm::SMLoc conditionOperandsLoc;
2294 (void)conditionOperandsLoc;
2296 conditionOperandsLoc = parser.getCurrentLocation();
2297 if (parser.parseOperand(conditionRawOperand))
2298 return ::mlir::failure();
2300 auto loc = parser.getCurrentLocation();(void)loc;
2301 if (parser.parseOptionalAttrDict(result.attributes))
2302 return ::mlir::failure();
2304 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
2305 if (parser.resolveOperands(conditionOperands, odsBuildableType0, conditionOperandsLoc, result.operands))
2306 return ::mlir::failure();
2307 return ::mlir::success();
2313 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2314 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2320 ::mlir::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects
2322 effects.emplace_back(::mlir::MemoryEffects::Write::get());
2340 return ::mlir::success();
2344 odsState.addOperands(condition);
2347void RequireConstrainOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
2348 odsState.addOperands(condition);
2349 assert(resultTypes.size() == 0u &&
"mismatched number of results");
2350 odsState.addTypes(resultTypes);
2353void RequireConstrainOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2354 assert(operands.size() == 1u &&
"mismatched number of parameters");
2355 odsState.addOperands(operands);
2356 odsState.addAttributes(attributes);
2357 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
2358 odsState.addTypes(resultTypes);
2363 unsigned index = 0; (void)index;
2366 for (
auto v : valueGroup0) {
2367 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*
this, v.getType(),
"operand", index++)))
2368 return ::mlir::failure();
2371 return ::mlir::success();
2379 ::mlir::OpAsmParser::UnresolvedOperand conditionRawOperand{};
2380 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> conditionOperands(&conditionRawOperand, 1); ::llvm::SMLoc conditionOperandsLoc;
2381 (void)conditionOperandsLoc;
2383 conditionOperandsLoc = parser.getCurrentLocation();
2384 if (parser.parseOperand(conditionRawOperand))
2385 return ::mlir::failure();
2387 auto loc = parser.getCurrentLocation();(void)loc;
2388 if (parser.parseOptionalAttrDict(result.attributes))
2389 return ::mlir::failure();
2391 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
2392 if (parser.resolveOperands(conditionOperands, odsBuildableType0, conditionOperandsLoc, result.operands))
2393 return ::mlir::failure();
2394 return ::mlir::success();
2400 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2401 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2407 ::mlir::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects
2409 effects.emplace_back(::mlir::MemoryEffects::Write::get());
2427 return ::mlir::success();
2430void StepOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
2431 (void)odsState.addRegion();
2434void StepOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
2435 (void)odsState.addRegion();
2436 assert(resultTypes.size() == 0u &&
"mismatched number of results");
2437 odsState.addTypes(resultTypes);
2440void StepOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2441 assert(operands.size() == 0u &&
"mismatched number of parameters");
2442 odsState.addOperands(operands);
2443 odsState.addAttributes(attributes);
2444 for (
unsigned i = 0; i != 1; ++i)
2445 (
void)odsState.addRegion();
2446 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
2447 odsState.addTypes(resultTypes);
2452 unsigned index = 0; (void)index;
2454 for (
auto ®ion : ::llvm::MutableArrayRef((*this)->getRegion(0)))
2455 if (::mlir::failed(__mlir_ods_local_region_constraint_Ops2(*
this, region,
"region", index++)))
2456 return ::mlir::failure();
2458 return ::mlir::success();
2465::mlir::ParseResult
StepOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2466 std::unique_ptr<::mlir::Region> regionRegion = std::make_unique<::mlir::Region>();
2468 if (parser.parseRegion(*regionRegion))
2469 return ::mlir::failure();
2471 if (regionRegion->empty()) regionRegion->emplaceBlock();
2473 auto loc = parser.getCurrentLocation();(void)loc;
2474 if (parser.parseOptionalAttrDict(result.attributes))
2475 return ::mlir::failure();
2477 result.addRegion(std::move(regionRegion));
2478 return ::mlir::success();
2484 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2485 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2491 ::mlir::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects
2493 effects.emplace_back(::mlir::MemoryEffects::Write::get());
2511 return ::mlir::success();
2514void StepYieldOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value) {
2515 odsState.addOperands(value);
2518void StepYieldOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value value) {
2519 odsState.addOperands(value);
2520 assert(resultTypes.size() == 0u &&
"mismatched number of results");
2521 odsState.addTypes(resultTypes);
2524void StepYieldOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2525 assert(operands.size() == 1u &&
"mismatched number of parameters");
2526 odsState.addOperands(operands);
2527 odsState.addAttributes(attributes);
2528 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
2529 odsState.addTypes(resultTypes);
2534 unsigned index = 0; (void)index;
2537 for (
auto v : valueGroup0) {
2538 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*
this, v.getType(),
"operand", index++)))
2539 return ::mlir::failure();
2542 return ::mlir::success();
2550 ::mlir::OpAsmParser::UnresolvedOperand valueRawOperand{};
2551 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> valueOperands(&valueRawOperand, 1); ::llvm::SMLoc valueOperandsLoc;
2552 (void)valueOperandsLoc;
2554 valueOperandsLoc = parser.getCurrentLocation();
2555 if (parser.parseOperand(valueRawOperand))
2556 return ::mlir::failure();
2558 auto loc = parser.getCurrentLocation();(void)loc;
2559 if (parser.parseOptionalAttrDict(result.attributes))
2560 return ::mlir::failure();
2562 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
2563 if (parser.resolveOperands(valueOperands, odsBuildableType0, valueOperandsLoc, result.operands))
2564 return ::mlir::failure();
2565 return ::mlir::success();
2571 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2572 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2591 return ::mlir::success();
2594void VerifAssertOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition) {
2595 odsState.addOperands(condition);
2598void VerifAssertOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
2599 odsState.addOperands(condition);
2600 assert(resultTypes.size() == 0u &&
"mismatched number of results");
2601 odsState.addTypes(resultTypes);
2604void VerifAssertOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2605 assert(operands.size() == 1u &&
"mismatched number of parameters");
2606 odsState.addOperands(operands);
2607 odsState.addAttributes(attributes);
2608 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
2609 odsState.addTypes(resultTypes);
2614 unsigned index = 0; (void)index;
2617 for (
auto v : valueGroup0) {
2618 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*
this, v.getType(),
"operand", index++)))
2619 return ::mlir::failure();
2622 return ::mlir::success();
2630 ::mlir::OpAsmParser::UnresolvedOperand conditionRawOperand{};
2631 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> conditionOperands(&conditionRawOperand, 1); ::llvm::SMLoc conditionOperandsLoc;
2632 (void)conditionOperandsLoc;
2634 conditionOperandsLoc = parser.getCurrentLocation();
2635 if (parser.parseOperand(conditionRawOperand))
2636 return ::mlir::failure();
2638 auto loc = parser.getCurrentLocation();(void)loc;
2639 if (parser.parseOptionalAttrDict(result.attributes))
2640 return ::mlir::failure();
2642 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
2643 if (parser.resolveOperands(conditionOperands, odsBuildableType0, conditionOperandsLoc, result.operands))
2644 return ::mlir::failure();
2645 return ::mlir::success();
2651 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2652 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2658 ::mlir::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects
2660 effects.emplace_back(::mlir::MemoryEffects::Write::get());
2678 return ::mlir::success();
2681void VerifProveOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition) {
2682 odsState.addOperands(condition);
2685void VerifProveOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
2686 odsState.addOperands(condition);
2687 assert(resultTypes.size() == 0u &&
"mismatched number of results");
2688 odsState.addTypes(resultTypes);
2691void VerifProveOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2692 assert(operands.size() == 1u &&
"mismatched number of parameters");
2693 odsState.addOperands(operands);
2694 odsState.addAttributes(attributes);
2695 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
2696 odsState.addTypes(resultTypes);
2701 unsigned index = 0; (void)index;
2704 for (
auto v : valueGroup0) {
2705 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*
this, v.getType(),
"operand", index++)))
2706 return ::mlir::failure();
2709 return ::mlir::success();
2717 ::mlir::OpAsmParser::UnresolvedOperand conditionRawOperand{};
2718 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> conditionOperands(&conditionRawOperand, 1); ::llvm::SMLoc conditionOperandsLoc;
2719 (void)conditionOperandsLoc;
2721 conditionOperandsLoc = parser.getCurrentLocation();
2722 if (parser.parseOperand(conditionRawOperand))
2723 return ::mlir::failure();
2725 auto loc = parser.getCurrentLocation();(void)loc;
2726 if (parser.parseOptionalAttrDict(result.attributes))
2727 return ::mlir::failure();
2729 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
2730 if (parser.resolveOperands(conditionOperands, odsBuildableType0, conditionOperandsLoc, result.operands))
2731 return ::mlir::failure();
2732 return ::mlir::success();
2738 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2739 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2745 ::mlir::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects
2747 effects.emplace_back(::mlir::MemoryEffects::Write::get());
2765 return ::mlir::success();
2769 odsState.addOperands(condition);
2772void VerifSMTProveOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
2773 odsState.addOperands(condition);
2774 assert(resultTypes.size() == 0u &&
"mismatched number of results");
2775 odsState.addTypes(resultTypes);
2778void VerifSMTProveOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2779 assert(operands.size() == 1u &&
"mismatched number of parameters");
2780 odsState.addOperands(operands);
2781 odsState.addAttributes(attributes);
2782 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
2783 odsState.addTypes(resultTypes);
2788 unsigned index = 0; (void)index;
2791 for (
auto v : valueGroup0) {
2792 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops7(*
this, v.getType(),
"operand", index++)))
2793 return ::mlir::failure();
2796 return ::mlir::success();
2804 ::mlir::OpAsmParser::UnresolvedOperand conditionRawOperand{};
2805 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> conditionOperands(&conditionRawOperand, 1); ::llvm::SMLoc conditionOperandsLoc;
2806 (void)conditionOperandsLoc;
2808 conditionOperandsLoc = parser.getCurrentLocation();
2809 if (parser.parseOperand(conditionRawOperand))
2810 return ::mlir::failure();
2812 auto loc = parser.getCurrentLocation();(void)loc;
2813 if (parser.parseOptionalAttrDict(result.attributes))
2814 return ::mlir::failure();
2817 if (parser.resolveOperands(conditionOperands, odsBuildableType0, conditionOperandsLoc, result.operands))
2818 return ::mlir::failure();
2819 return ::mlir::success();
2825 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2826 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
static FeltType get(::mlir::MLIRContext *context, ::mlir::StringAttr fieldName)
AssumeDetOpAdaptor(AssumeDetOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
AssumeDetOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::mlir::ValueRange getOperands()
::mlir::Operation::operand_range getODSOperands(unsigned index)
::mlir::TypedValue<::mlir::Type > getHint()
void print(::mlir::OpAsmPrinter &_odsPrinter)
::llvm::LogicalResult verifyInvariants()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::llvm::LogicalResult verifyInvariantsImpl()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value hint)
ContractEndOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
ContractEndOpAdaptor(ContractEndOp op)
::mlir::ValueRange getOperands()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::llvm::LogicalResult verifyInvariantsImpl()
::llvm::LogicalResult verifyInvariants()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState)
void print(::mlir::OpAsmPrinter &_odsPrinter)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
ContractOpAdaptor(ContractOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
ContractOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::ValueRange getOperands()
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::StringAttr getFunctionTypeAttrName()
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
static llvm::hash_code computePropertiesHash(const Properties &prop)
::mlir::StringAttr getTargetAttrName()
void setFunctionType(::mlir::FunctionType attrValue)
::mlir::StringAttr getSymNameAttr()
::llvm::LogicalResult verifyInvariants()
::llvm::LogicalResult verify()
::std::optional< ::mlir::ArrayAttr > getArgAttrs()
::mlir::FunctionType getFunctionType()
::mlir::StringAttr getSymNameAttrName()
::mlir::StringAttr getArgAttrsAttrName()
::mlir::TypeAttr getFunctionTypeAttr()
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::mlir::SymbolRefAttr getTargetAttr()
::mlir::SymbolRefAttr getFullyQualifiedName(bool requireParent=true)
Return the full name for this contract from the root module, including all surrounding symbol table n...
::llvm::LogicalResult verifyInvariantsImpl()
::mlir::ArrayAttr getArgAttrsAttr()
void writeProperties(::mlir::DialectBytecodeWriter &writer)
void setSymName(::llvm::StringRef attrValue)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
::mlir::SymbolRefAttr getTarget()
FoldAdaptor::Properties Properties
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, ::mlir::SymbolRefAttr target, ::mlir::TypeAttr function_type, ::mlir::ArrayAttr arg_attrs={})
::llvm::StringRef getSymName()
DecreasesOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
DecreasesOpAdaptor(DecreasesOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
::mlir::ValueRange getOperands()
::mlir::TypedValue<::llzk::felt::FeltType > getValue()
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value)
::llvm::LogicalResult verifyInvariantsImpl()
::mlir::Operation::operand_range getODSOperands(unsigned index)
::llvm::LogicalResult verifyInvariants()
void print(::mlir::OpAsmPrinter &_odsPrinter)
EnsureComputeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
EnsureComputeOpAdaptor(EnsureComputeOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
::mlir::ValueRange getOperands()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::llvm::LogicalResult verifyInvariants()
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::Operation::operand_range getODSOperands(unsigned index)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition)
::llvm::LogicalResult verifyInvariantsImpl()
::mlir::TypedValue<::mlir::IntegerType > getCondition()
::llvm::LogicalResult verify(::mlir::Location loc)
EnsureConstrainOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
EnsureConstrainOpAdaptor(EnsureConstrainOp op)
::mlir::ValueRange getOperands()
::mlir::Operation::operand_range getODSOperands(unsigned index)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::llvm::LogicalResult verifyInvariants()
void print(::mlir::OpAsmPrinter &_odsPrinter)
::llvm::LogicalResult verifyInvariantsImpl()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::TypedValue<::mlir::IntegerType > getCondition()
::llvm::LogicalResult verify(::mlir::Location loc)
IncludeOpAdaptor(IncludeOp op)
IncludeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::ValueRange getOperands()
void setNumDimsPerMap(::llvm::ArrayRef< int32_t > attrValue)
::mlir::MutableOperandRange getArgOperandsMutable()
::mlir::ArrayAttr getTemplateParamsAttr()
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::llvm::LogicalResult verifyInvariantsImpl()
static llvm::hash_code computePropertiesHash(const Properties &prop)
::mlir::Operation::operand_range getODSOperands(unsigned index)
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
void setMapOpGroupSizes(::llvm::ArrayRef< int32_t > attrValue)
::mlir::OperandRangeRange getMapOperands()
::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
void writeProperties(::mlir::DialectBytecodeWriter &writer)
::mlir::SymbolRefAttr getCalleeAttr()
FoldAdaptor::Properties Properties
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::mlir::Operation::operand_range getArgOperands()
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::mlir::SymbolRefAttr getCallee()
::mlir::StringAttr getCalleeAttrName()
::mlir::StringAttr getMapOpGroupSizesAttrName()
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::MutableOperandRangeRange getMapOperandsMutable()
::std::optional< ::mlir::ArrayAttr > getTemplateParams()
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
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)
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties)
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
::mlir::StringAttr getNumDimsPerMapAttrName()
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
::llvm::LogicalResult verifyInvariants()
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
::mlir::StringAttr getTemplateParamsAttrName()
IncreasesOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
IncreasesOpAdaptor(IncreasesOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
::mlir::ValueRange getOperands()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::llvm::LogicalResult verifyInvariants()
void print(::mlir::OpAsmPrinter &_odsPrinter)
::llvm::LogicalResult verifyInvariantsImpl()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value)
::mlir::Operation::operand_range getODSOperands(unsigned index)
::mlir::TypedValue<::llzk::felt::FeltType > getValue()
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::llvm::LogicalResult verify(::mlir::Location loc)
InvariantOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
InvariantOpAdaptor(InvariantOp op)
::mlir::ValueRange getOperands()
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::mlir::StringAttr getLoopArgTypesAttrName()
void writeProperties(::mlir::DialectBytecodeWriter &writer)
void setLoopName(::llvm::StringRef attrValue)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::mlir::ArrayAttr getLoopArgTypesAttr()
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::mlir::ArrayAttr getLoopArgTypes()
static llvm::hash_code computePropertiesHash(const Properties &prop)
::mlir::StringAttr getLoopNameAttr()
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
::llvm::StringRef getLoopName()
FoldAdaptor::Properties Properties
::llvm::LogicalResult verify()
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::llvm::LogicalResult verifyInvariantsImpl()
::llvm::LogicalResult verifyInvariants()
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::StringAttr getLoopNameAttrName()
::llvm::LogicalResult verify(::mlir::Location loc)
OldOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::mlir::ValueRange getOperands()
void print(::mlir::OpAsmPrinter &_odsPrinter)
::llvm::LogicalResult verifyInvariantsImpl()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::Operation::operand_range getODSOperands(unsigned index)
::mlir::TypedValue<::mlir::Type > getResult()
::llvm::LogicalResult verifyInvariants()
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::mlir::TypedValue<::mlir::Type > getValue()
::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)
::mlir::Operation::result_range getODSResults(unsigned index)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value value)
ProveDetOpAdaptor(ProveDetOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
ProveDetOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::mlir::ValueRange getOperands()
::llvm::LogicalResult verifyInvariantsImpl()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value condition)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::TypedValue<::mlir::Type > getCondition()
::mlir::Operation::result_range getODSResults(unsigned index)
::mlir::Operation::operand_range getODSOperands(unsigned index)
::llvm::LogicalResult verifyInvariants()
::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)
RequireComputeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
RequireComputeOpAdaptor(RequireComputeOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
::mlir::ValueRange getOperands()
::llvm::LogicalResult verifyInvariantsImpl()
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::llvm::LogicalResult verifyInvariants()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::TypedValue<::mlir::IntegerType > getCondition()
::mlir::Operation::operand_range getODSOperands(unsigned index)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition)
void print(::mlir::OpAsmPrinter &_odsPrinter)
RequireConstrainOpAdaptor(RequireConstrainOp op)
RequireConstrainOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
::mlir::ValueRange getOperands()
::llvm::LogicalResult verifyInvariants()
::mlir::TypedValue<::mlir::IntegerType > getCondition()
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::llvm::LogicalResult verifyInvariantsImpl()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::Operation::operand_range getODSOperands(unsigned index)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::llvm::LogicalResult verify(::mlir::Location loc)
StepOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::mlir::ValueRange getOperands()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::llvm::LogicalResult verifyInvariantsImpl()
::llvm::LogicalResult verifyInvariants()
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::mlir::Region & getRegion()
void print(::mlir::OpAsmPrinter &_odsPrinter)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState)
StepYieldOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
StepYieldOpAdaptor(StepYieldOp op)
::mlir::ValueRange getOperands()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value)
::mlir::TypedValue<::mlir::IntegerType > getValue()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::llvm::LogicalResult verifyInvariantsImpl()
::mlir::Operation::operand_range getODSOperands(unsigned index)
::llvm::LogicalResult verifyInvariants()
void print(::mlir::OpAsmPrinter &_odsPrinter)
VerifAssertOpAdaptor(VerifAssertOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
VerifAssertOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::mlir::ValueRange getOperands()
::mlir::TypedValue<::mlir::IntegerType > getCondition()
::llvm::LogicalResult verifyInvariantsImpl()
::mlir::Operation::operand_range getODSOperands(unsigned index)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::llvm::LogicalResult verifyInvariants()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition)
VerifProveOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
VerifProveOpAdaptor(VerifProveOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
::mlir::ValueRange getOperands()
::mlir::TypedValue<::mlir::IntegerType > getCondition()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::llvm::LogicalResult verifyInvariantsImpl()
::llvm::LogicalResult verifyInvariants()
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::mlir::Operation::operand_range getODSOperands(unsigned index)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition)
void print(::mlir::OpAsmPrinter &_odsPrinter)
VerifSMTProveOpAdaptor(VerifSMTProveOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
VerifSMTProveOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::mlir::ValueRange getOperands()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition)
::mlir::Operation::operand_range getODSOperands(unsigned index)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::llvm::LogicalResult verifyInvariants()
::llvm::LogicalResult verifyInvariantsImpl()
::mlir::TypedValue<::llzk::smt::BoolType > getCondition()
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::FunctionType getFunctionType()
::mlir::TypeAttr getFunctionTypeAttr()
::llvm::StringRef getSymName()
::std::optional<::mlir::OperationName > odsOpName
const Properties & getProperties()
ContractOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::ArrayAttr getArgAttrsAttr()
::mlir::DictionaryAttr odsAttrs
::mlir::SymbolRefAttr getTargetAttr()
::std::optional< ::mlir::ArrayAttr > getArgAttrs()
::mlir::StringAttr getSymNameAttr()
::mlir::SymbolRefAttr getTarget()
::mlir::RegionRange getRegions()
::mlir::RegionRange odsRegions
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
::mlir::RegionRange odsRegions
::mlir::SymbolRefAttr getCalleeAttr()
::std::optional<::mlir::OperationName > odsOpName
::mlir::ArrayAttr getTemplateParamsAttr()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::SymbolRefAttr getCallee()
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
const Properties & getProperties()
::std::optional< ::mlir::ArrayAttr > getTemplateParams()
IncludeOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
::mlir::DictionaryAttr odsAttrs
const Properties & getProperties()
::mlir::RegionRange getRegions()
::mlir::DictionaryAttr odsAttrs
::std::optional<::mlir::OperationName > odsOpName
::mlir::StringAttr getLoopNameAttr()
::mlir::RegionRange odsRegions
::mlir::ArrayAttr getLoopArgTypesAttr()
InvariantOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::ArrayAttr getLoopArgTypes()
::llvm::StringRef getLoopName()
void printTemplateParams(mlir::AsmPrinter &printer, mlir::ArrayAttr value)
mlir::ParseResult parseAttrDictWithWarnings(mlir::OpAsmParser &parser, mlir::NamedAttrList &extraAttrs, mlir::OperationState &state)
bool isValidEmitEqType(Type type)
bool isValidType(Type type)
void printMultiDimAndSymbolList(mlir::OpAsmPrinter &printer, mlir::Operation *op, mlir::OperandRangeRange multiMapOperands, mlir::DenseI32ArrayAttr numDimsPerMap)
void printAttrDictWithWarnings(mlir::OpAsmPrinter &printer, ConcreteOp op, mlir::DictionaryAttr extraAttrs, typename mlir::PropertiesSelector< ConcreteOp >::type state)
mlir::ParseResult parseTemplateParams(mlir::AsmParser &parser, mlir::ArrayAttr &value)
mlir::ParseResult parseMultiDimAndSymbolList(mlir::OpAsmParser &parser, mlir::SmallVector< mlir::SmallVector< mlir::OpAsmParser::UnresolvedOperand > > &multiMapOperands, mlir::DenseI32ArrayAttr &numDimsPerMap)
function_typeTy function_type
operandSegmentSizesTy operandSegmentSizes
templateParamsTy templateParams
numDimsPerMapTy numDimsPerMap
mapOpGroupSizesTy mapOpGroupSizes
loop_arg_typesTy loop_arg_types