33static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops1(
34 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
35 unsigned valueIndex) {
36 if (!((type.isSignlessInteger(1)))) {
37 return op->emitOpError(valueKind) <<
" #" << valueIndex
38 <<
" must be 1-bit signless integer, but got " << type;
40 return ::mlir::success();
43static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops2(
44 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
45 unsigned valueIndex) {
47 return op->emitOpError(valueKind) <<
" #" << valueIndex
48 <<
" must be variadic of a valid LLZK type, but got " << type;
50 return ::mlir::success();
53static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops3(
54 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
55 unsigned valueIndex) {
56 if (!((::llvm::isa<::mlir::IndexType>(type)))) {
57 return op->emitOpError(valueKind) <<
" #" << valueIndex
58 <<
" must be variadic of index, but got " << type;
60 return ::mlir::success();
63static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops1(
64 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
65 if (attr && !((::llvm::isa<::mlir::StringAttr>(attr))))
66 return emitError() <<
"attribute '" << attrName
67 <<
"' failed to satisfy constraint: string attribute";
68 return ::mlir::success();
70static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops1(
71 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
72 return __mlir_ods_local_attr_constraint_Ops1(attr, attrName, [op]() {
73 return op->emitOpError();
77static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops2(
78 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
79 if (attr && !((::llvm::isa<::mlir::SymbolRefAttr>(attr))))
80 return emitError() <<
"attribute '" << attrName
81 <<
"' failed to satisfy constraint: symbol reference attribute";
82 return ::mlir::success();
84static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops2(
85 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
86 return __mlir_ods_local_attr_constraint_Ops2(attr, attrName, [op]() {
87 return op->emitOpError();
91static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops3(
92 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
93 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())))))
94 return emitError() <<
"attribute '" << attrName
95 <<
"' failed to satisfy constraint: type attribute of function type";
96 return ::mlir::success();
98static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops3(
99 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
100 return __mlir_ods_local_attr_constraint_Ops3(attr, attrName, [op]() {
101 return op->emitOpError();
105static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops4(
106 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
107 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))); }))))
108 return emitError() <<
"attribute '" << attrName
109 <<
"' failed to satisfy constraint: Array of dictionary attributes";
110 return ::mlir::success();
112static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops4(
113 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
114 return __mlir_ods_local_attr_constraint_Ops4(attr, attrName, [op]() {
115 return op->emitOpError();
119static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops5(
120 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
121 if (attr && !((::llvm::isa<::mlir::ArrayAttr>(attr))))
122 return emitError() <<
"attribute '" << attrName
123 <<
"' failed to satisfy constraint: array attribute";
124 return ::mlir::success();
126static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops5(
127 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
128 return __mlir_ods_local_attr_constraint_Ops5(attr, attrName, [op]() {
129 return op->emitOpError();
133static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops6(
134 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
135 if (attr && !((::llvm::isa<::mlir::DenseI32ArrayAttr>(attr))))
136 return emitError() <<
"attribute '" << attrName
137 <<
"' failed to satisfy constraint: i32 dense array attribute";
138 return ::mlir::success();
140static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops6(
141 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
142 return __mlir_ods_local_attr_constraint_Ops6(attr, attrName, [op]() {
143 return op->emitOpError();
147static ::llvm::LogicalResult __mlir_ods_local_region_constraint_Ops1(
148 ::mlir::Operation *op, ::mlir::Region ®ion, ::llvm::StringRef regionName,
149 unsigned regionIndex) {
151 return op->emitOpError(
"region #") << regionIndex
152 << (regionName.empty() ?
" " :
" ('" + regionName +
"') ")
153 <<
"failed to verify constraint: any region";
155 return ::mlir::success();
171 return ::mlir::success();
177void ContractEndOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
178 assert(resultTypes.size() == 0u &&
"mismatched number of results");
179 odsState.addTypes(resultTypes);
182void ContractEndOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
183 assert(operands.size() == 0u &&
"mismatched number of parameters");
184 odsState.addOperands(operands);
185 odsState.addAttributes(attributes);
186 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
187 odsState.addTypes(resultTypes);
191 return ::mlir::success();
200 auto loc = parser.getCurrentLocation();(void)loc;
201 if (parser.parseOptionalAttrDict(result.attributes))
202 return ::mlir::failure();
204 return ::mlir::success();
208 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
209 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
231 return attr.getValue();
241 return ::llvm::cast<::mlir::FunctionType>(attr.getValue());
246 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
255 if (!tblgen_function_type)
return emitError(loc,
"'verif.contract' op ""requires attribute 'function_type'");
257 if (!tblgen_sym_name)
return emitError(loc,
"'verif.contract' op ""requires attribute 'sym_name'");
259 if (!tblgen_target)
return emitError(loc,
"'verif.contract' op ""requires attribute 'target'");
261 if (tblgen_sym_name && !((::llvm::isa<::mlir::StringAttr>(tblgen_sym_name))))
262 return emitError(loc,
"'verif.contract' op ""attribute 'sym_name' failed to satisfy constraint: string attribute");
264 if (tblgen_target && !((::llvm::isa<::mlir::SymbolRefAttr>(tblgen_target))))
265 return emitError(loc,
"'verif.contract' op ""attribute 'target' failed to satisfy constraint: symbol reference attribute");
267 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())))))
268 return emitError(loc,
"'verif.contract' op ""attribute 'function_type' failed to satisfy constraint: type attribute of function type");
270 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))); }))))
271 return emitError(loc,
"'verif.contract' op ""attribute 'arg_attrs' failed to satisfy constraint: Array of dictionary attributes");
272 return ::mlir::success();
276 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
278 emitError() <<
"expected DictionaryAttr to set properties";
279 return ::mlir::failure();
284 auto attr = dict.get(
"arg_attrs");
286 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
288 propStorage = convertedAttr;
290 emitError() <<
"Invalid attribute `arg_attrs` in property conversion: " << attr;
291 return ::mlir::failure();
298 auto attr = dict.get(
"function_type");
300 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
302 propStorage = convertedAttr;
304 emitError() <<
"Invalid attribute `function_type` in property conversion: " << attr;
305 return ::mlir::failure();
312 auto attr = dict.get(
"sym_name");
314 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
316 propStorage = convertedAttr;
318 emitError() <<
"Invalid attribute `sym_name` in property conversion: " << attr;
319 return ::mlir::failure();
325 auto &propStorage = prop.
target;
326 auto attr = dict.get(
"target");
328 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
330 propStorage = convertedAttr;
332 emitError() <<
"Invalid attribute `target` in property conversion: " << attr;
333 return ::mlir::failure();
337 return ::mlir::success();
341 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
342 ::mlir::Builder odsBuilder{ctx};
345 const auto &propStorage = prop.
arg_attrs;
347 attrs.push_back(odsBuilder.getNamedAttr(
"arg_attrs",
354 attrs.push_back(odsBuilder.getNamedAttr(
"function_type",
359 const auto &propStorage = prop.
sym_name;
361 attrs.push_back(odsBuilder.getNamedAttr(
"sym_name",
366 const auto &propStorage = prop.
target;
368 attrs.push_back(odsBuilder.getNamedAttr(
"target",
373 return odsBuilder.getDictionaryAttr(attrs);
378 return llvm::hash_combine(
379 llvm::hash_value(prop.
arg_attrs.getAsOpaquePointer()),
381 llvm::hash_value(prop.
sym_name.getAsOpaquePointer()),
382 llvm::hash_value(prop.
target.getAsOpaquePointer()));
386 if (name ==
"arg_attrs")
389 if (name ==
"function_type")
392 if (name ==
"sym_name")
395 if (name ==
"target")
401 if (name ==
"arg_attrs") {
402 prop.
arg_attrs = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
arg_attrs)>>(value);
406 if (name ==
"function_type") {
411 if (name ==
"sym_name") {
412 prop.
sym_name = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
sym_name)>>(value);
416 if (name ==
"target") {
417 prop.
target = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
target)>>(value);
432::llvm::LogicalResult
ContractOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
435 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops4(attr,
"arg_attrs", emitError)))
436 return ::mlir::failure();
441 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops3(attr,
"function_type", emitError)))
442 return ::mlir::failure();
447 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(attr,
"sym_name", emitError)))
448 return ::mlir::failure();
453 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(attr,
"target", emitError)))
454 return ::mlir::failure();
456 return ::mlir::success();
460 auto &prop = state.getOrAddProperties<
Properties>(); (void)prop;
461 if (::mlir::failed(reader.readOptionalAttribute(prop.
arg_attrs)))
462 return ::mlir::failure();
464 if (::mlir::failed(reader.readAttribute(prop.
function_type)))
465 return ::mlir::failure();
467 if (::mlir::failed(reader.readAttribute(prop.
sym_name)))
468 return ::mlir::failure();
470 if (::mlir::failed(reader.readAttribute(prop.
target)))
471 return ::mlir::failure();
472 return ::mlir::success();
476 auto &prop = getProperties(); (void)prop;
478 writer.writeOptionalAttribute(prop.
arg_attrs);
480 writer.writeAttribute(prop.
sym_name);
481 writer.writeAttribute(prop.
target);
486 return attr.getValue();
496 return ::llvm::cast<::mlir::FunctionType>(attr.getValue());
501 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
505 getProperties().sym_name = ::mlir::Builder((*this)->getContext()).getStringAttr(attrValue);
509 getProperties().function_type = ::mlir::TypeAttr::get(attrValue);
512void ContractOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, ::mlir::SymbolRefAttr target, ::mlir::TypeAttr function_type, ::mlir::ArrayAttr arg_attrs) {
513 build(odsBuilder, odsState, ::mlir::TypeRange {}, sym_name, target, function_type, arg_attrs);
517void 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) {
518 odsState.getOrAddProperties<
Properties>().sym_name = sym_name;
519 odsState.getOrAddProperties<
Properties>().target = target;
520 odsState.getOrAddProperties<
Properties>().function_type = function_type;
522 odsState.getOrAddProperties<
Properties>().arg_attrs = arg_attrs;
525 odsBuilder, odsState, ::mlir::cast<::mlir::FunctionType>(function_type.getValue())
527 assert(resultTypes.size() == 0u &&
"mismatched number of results");
528 odsState.addTypes(resultTypes);
532void ContractOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef sym_name, ::mlir::SymbolRefAttr target, ::mlir::FunctionType function_type, ::mlir::ArrayAttr arg_attrs) {
533 build(odsBuilder, odsState, ::mlir::TypeRange {}, sym_name, target, function_type, arg_attrs);
537void 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) {
538 odsState.getOrAddProperties<
Properties>().sym_name = odsBuilder.getStringAttr(sym_name);
539 odsState.getOrAddProperties<
Properties>().target = target;
540 odsState.getOrAddProperties<
Properties>().function_type = ::mlir::TypeAttr::get(function_type);
542 odsState.getOrAddProperties<
Properties>().arg_attrs = arg_attrs;
544 initializeEmptyBody(odsBuilder, odsState, function_type);
545 assert(resultTypes.size() == 0u &&
"mismatched number of results");
546 odsState.addTypes(resultTypes);
551 auto tblgen_arg_attrs = getProperties().arg_attrs; (void)tblgen_arg_attrs;
552 auto tblgen_function_type = getProperties().function_type; (void)tblgen_function_type;
553 if (!tblgen_function_type)
return emitOpError(
"requires attribute 'function_type'");
554 auto tblgen_sym_name = getProperties().sym_name; (void)tblgen_sym_name;
555 if (!tblgen_sym_name)
return emitOpError(
"requires attribute 'sym_name'");
556 auto tblgen_target = getProperties().target; (void)tblgen_target;
557 if (!tblgen_target)
return emitOpError(
"requires attribute 'target'");
559 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(*
this, tblgen_sym_name,
"sym_name")))
560 return ::mlir::failure();
562 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(*
this, tblgen_target,
"target")))
563 return ::mlir::failure();
565 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops3(*
this, tblgen_function_type,
"function_type")))
566 return ::mlir::failure();
568 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops4(*
this, tblgen_arg_attrs,
"arg_attrs")))
569 return ::mlir::failure();
571 unsigned index = 0; (void)index;
573 for (
auto ®ion : ::llvm::MutableArrayRef((*this)->getRegion(0)))
574 if (::mlir::failed(__mlir_ods_local_region_constraint_Ops1(*
this, region,
"body", index++)))
575 return ::mlir::failure();
577 return ::mlir::success();
582 return ::mlir::success();
583 return ::mlir::failure();
602 return ::mlir::success();
606 odsState.addOperands(condition);
609void EnsureComputeOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
610 odsState.addOperands(condition);
611 assert(resultTypes.size() == 0u &&
"mismatched number of results");
612 odsState.addTypes(resultTypes);
615void EnsureComputeOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
616 assert(operands.size() == 1u &&
"mismatched number of parameters");
617 odsState.addOperands(operands);
618 odsState.addAttributes(attributes);
619 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
620 odsState.addTypes(resultTypes);
625 unsigned index = 0; (void)index;
628 for (
auto v : valueGroup0) {
629 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
630 return ::mlir::failure();
633 return ::mlir::success();
641 ::mlir::OpAsmParser::UnresolvedOperand conditionRawOperand{};
642 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> conditionOperands(&conditionRawOperand, 1); ::llvm::SMLoc conditionOperandsLoc;
643 (void)conditionOperandsLoc;
645 conditionOperandsLoc = parser.getCurrentLocation();
646 if (parser.parseOperand(conditionRawOperand))
647 return ::mlir::failure();
649 auto loc = parser.getCurrentLocation();(void)loc;
650 if (parser.parseOptionalAttrDict(result.attributes))
651 return ::mlir::failure();
653 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
654 if (parser.resolveOperands(conditionOperands, odsBuildableType0, conditionOperandsLoc, result.operands))
655 return ::mlir::failure();
656 return ::mlir::success();
662 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
663 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
669 ::mlir::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects
671 effects.emplace_back(::mlir::MemoryEffects::Write::get());
689 return ::mlir::success();
693 odsState.addOperands(condition);
696void EnsureConstrainOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
697 odsState.addOperands(condition);
698 assert(resultTypes.size() == 0u &&
"mismatched number of results");
699 odsState.addTypes(resultTypes);
702void EnsureConstrainOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
703 assert(operands.size() == 1u &&
"mismatched number of parameters");
704 odsState.addOperands(operands);
705 odsState.addAttributes(attributes);
706 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
707 odsState.addTypes(resultTypes);
712 unsigned index = 0; (void)index;
715 for (
auto v : valueGroup0) {
716 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
717 return ::mlir::failure();
720 return ::mlir::success();
728 ::mlir::OpAsmParser::UnresolvedOperand conditionRawOperand{};
729 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> conditionOperands(&conditionRawOperand, 1); ::llvm::SMLoc conditionOperandsLoc;
730 (void)conditionOperandsLoc;
732 conditionOperandsLoc = parser.getCurrentLocation();
733 if (parser.parseOperand(conditionRawOperand))
734 return ::mlir::failure();
736 auto loc = parser.getCurrentLocation();(void)loc;
737 if (parser.parseOptionalAttrDict(result.attributes))
738 return ::mlir::failure();
740 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
741 if (parser.resolveOperands(conditionOperands, odsBuildableType0, conditionOperandsLoc, result.operands))
742 return ::mlir::failure();
743 return ::mlir::success();
749 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
750 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
756 ::mlir::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects
758 effects.emplace_back(::mlir::MemoryEffects::Write::get());
778 for (
unsigned i = 0; i < index; ++i)
779 start += sizeAttr[i];
780 return {start, sizeAttr[index]};
790 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
794 auto attr = ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(
getProperties().numDimsPerMap);
813 if (!tblgen_callee)
return emitError(loc,
"'verif.include' op ""requires attribute 'callee'");
815 if (!tblgen_mapOpGroupSizes)
return emitError(loc,
"'verif.include' op ""requires attribute 'mapOpGroupSizes'");
819 if (tblgen_callee && !((::llvm::isa<::mlir::SymbolRefAttr>(tblgen_callee))))
820 return emitError(loc,
"'verif.include' op ""attribute 'callee' failed to satisfy constraint: symbol reference attribute");
822 if (tblgen_templateParams && !((::llvm::isa<::mlir::ArrayAttr>(tblgen_templateParams))))
823 return emitError(loc,
"'verif.include' op ""attribute 'templateParams' failed to satisfy constraint: array attribute");
825 if (tblgen_numDimsPerMap && !((::llvm::isa<::mlir::DenseI32ArrayAttr>(tblgen_numDimsPerMap))))
826 return emitError(loc,
"'verif.include' op ""attribute 'numDimsPerMap' failed to satisfy constraint: i32 dense array attribute");
828 if (tblgen_mapOpGroupSizes && !((::llvm::isa<::mlir::DenseI32ArrayAttr>(tblgen_mapOpGroupSizes))))
829 return emitError(loc,
"'verif.include' op ""attribute 'mapOpGroupSizes' failed to satisfy constraint: i32 dense array attribute");
830 return ::mlir::success();
834 ::llvm::ArrayRef<int32_t> sizeAttr = getProperties().operandSegmentSizes;
837 for (
unsigned i = 0; i < index; ++i)
838 start += sizeAttr[i];
839 return {start, sizeAttr[index]};
844 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second, ::mlir::MutableOperandRange::OperandSegment(0u, {getOperandSegmentSizesAttrName(), ::mlir::DenseI32ArrayAttr::get(getContext(), getProperties().operandSegmentSizes)}));
850 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second, ::mlir::MutableOperandRange::OperandSegment(1u, {getOperandSegmentSizesAttrName(), ::mlir::DenseI32ArrayAttr::get(getContext(), getProperties().operandSegmentSizes)}));
855 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
857 emitError() <<
"expected DictionaryAttr to set properties";
858 return ::mlir::failure();
862 auto &propStorage = prop.
callee;
863 auto attr = dict.get(
"callee");
865 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
867 propStorage = convertedAttr;
869 emitError() <<
"Invalid attribute `callee` in property conversion: " << attr;
870 return ::mlir::failure();
877 auto attr = dict.get(
"mapOpGroupSizes");
879 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
881 propStorage = convertedAttr;
883 emitError() <<
"Invalid attribute `mapOpGroupSizes` in property conversion: " << attr;
884 return ::mlir::failure();
891 auto attr = dict.get(
"numDimsPerMap");
893 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
895 propStorage = convertedAttr;
897 emitError() <<
"Invalid attribute `numDimsPerMap` in property conversion: " << attr;
898 return ::mlir::failure();
905 auto attr = dict.get(
"templateParams");
907 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
909 propStorage = convertedAttr;
911 emitError() <<
"Invalid attribute `templateParams` in property conversion: " << attr;
912 return ::mlir::failure();
918 auto setFromAttr = [] (
auto &propStorage, ::mlir::Attribute propAttr,
919 ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) -> ::mlir::LogicalResult {
920 return convertFromAttribute(propStorage, propAttr, emitError);
922 auto attr = dict.get(
"operandSegmentSizes");
if (!attr) attr = dict.get(
"operand_segment_sizes");;
925 return ::mlir::failure();
927 return ::mlir::success();
931 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
932 ::mlir::Builder odsBuilder{ctx};
935 const auto &propStorage = prop.
callee;
937 attrs.push_back(odsBuilder.getNamedAttr(
"callee",
944 attrs.push_back(odsBuilder.getNamedAttr(
"mapOpGroupSizes",
951 attrs.push_back(odsBuilder.getNamedAttr(
"numDimsPerMap",
958 attrs.push_back(odsBuilder.getNamedAttr(
"templateParams",
964 auto attr = [&]() -> ::mlir::Attribute {
965 return ::mlir::DenseI32ArrayAttr::get(ctx, propStorage);
967 attrs.push_back(odsBuilder.getNamedAttr(
"operandSegmentSizes", attr));
971 return odsBuilder.getDictionaryAttr(attrs);
976 auto hash_operandSegmentSizes = [] (
const auto &propStorage) -> llvm::hash_code {
977 return ::llvm::hash_combine_range(std::begin(propStorage), std::end(propStorage));;
979 return llvm::hash_combine(
980 llvm::hash_value(prop.
callee.getAsOpaquePointer()),
988 if (name ==
"callee")
991 if (name ==
"mapOpGroupSizes")
994 if (name ==
"numDimsPerMap")
997 if (name ==
"templateParams")
999 if (name ==
"operand_segment_sizes" || name ==
"operandSegmentSizes")
return [&]() -> ::mlir::Attribute { return ::mlir::DenseI32ArrayAttr::get(ctx, prop.
operandSegmentSizes); }();
1000 return std::nullopt;
1004 if (name ==
"callee") {
1005 prop.
callee = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
callee)>>(value);
1009 if (name ==
"mapOpGroupSizes") {
1014 if (name ==
"numDimsPerMap") {
1019 if (name ==
"templateParams") {
1023 if (name ==
"operand_segment_sizes" || name ==
"operandSegmentSizes") {
1024 auto arrAttr = ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(value);
1025 if (!arrAttr)
return;
1041 attrs.append(
"operandSegmentSizes", [&]() -> ::mlir::Attribute { return ::mlir::DenseI32ArrayAttr::get(ctx, prop.
operandSegmentSizes); }());
1044::llvm::LogicalResult
IncludeOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1047 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(attr,
"callee", emitError)))
1048 return ::mlir::failure();
1053 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops6(attr,
"mapOpGroupSizes", emitError)))
1054 return ::mlir::failure();
1059 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops6(attr,
"numDimsPerMap", emitError)))
1060 return ::mlir::failure();
1065 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops5(attr,
"templateParams", emitError)))
1066 return ::mlir::failure();
1068 return ::mlir::success();
1072 auto &prop = state.getOrAddProperties<
Properties>(); (void)prop;
1073 if (::mlir::failed(reader.readAttribute(prop.
callee)))
1074 return ::mlir::failure();
1077 return ::mlir::failure();
1079 if (::mlir::failed(reader.readOptionalAttribute(prop.
numDimsPerMap)))
1080 return ::mlir::failure();
1082 if (reader.getBytecodeVersion() < 6) {
1084 ::mlir::DenseI32ArrayAttr attr;
1085 if (::mlir::failed(reader.readAttribute(attr))) return ::mlir::failure();
1086 if (attr.size() >
static_cast<int64_t
>(
sizeof(propStorage) /
sizeof(int32_t))) {
1087 reader.emitError(
"size mismatch for operand/result_segment_size");
1088 return ::mlir::failure();
1090 ::llvm::copy(::llvm::ArrayRef<int32_t>(attr), propStorage.begin());
1093 if (::mlir::failed(reader.readOptionalAttribute(prop.
templateParams)))
1094 return ::mlir::failure();
1098 auto readProp = [&]() {
1100 if (reader.getBytecodeVersion() >= 6)
1101 return reader.readSparseArray(::llvm::MutableArrayRef(propStorage));
1103 return ::mlir::success();
1105 if (::mlir::failed(readProp()))
1106 return ::mlir::failure();
1108 return ::mlir::success();
1112 auto &prop = getProperties(); (void)prop;
1113 writer.writeAttribute(prop.
callee);
1118if (writer.getBytecodeVersion() < 6) {
1120 writer.writeAttribute(::mlir::DenseI32ArrayAttr::get(this->getContext(), propStorage));
1128 if (writer.getBytecodeVersion() >= 6)
1129 writer.writeSparseArray(::llvm::ArrayRef(propStorage));
1141 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
1155 getProperties().numDimsPerMap = ::mlir::Builder((*this)->getContext()).getDenseI32ArrayAttr(attrValue);
1159 getProperties().mapOpGroupSizes = ::mlir::Builder((*this)->getContext()).getDenseI32ArrayAttr(attrValue);
1162void 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) {
1163 build(odsBuilder, odsState, callee, mapOperands,
1164 odsBuilder.getDenseI32ArrayAttr(numDimsPerMap),
1165 argOperands, templateParams);
1170 build(odsBuilder, odsState,
1172 argOperands, templateParams);
1176void 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) {
1177 build(odsBuilder, odsState,
1179 argOperands, templateParams);
1183void 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) {
1184 build(odsBuilder, odsState, callee, mapOperands,
1185 odsBuilder.getDenseI32ArrayAttr(numDimsPerMap),
1186 argOperands, templateParams);
1191 ::mlir::Builder odsBuilder(opName.getContext());
1193 properties.
numDimsPerMap = odsBuilder.getDenseI32ArrayAttr({});
1197 auto tblgen_callee = getProperties().callee; (void)tblgen_callee;
1198 if (!tblgen_callee)
return emitOpError(
"requires attribute 'callee'");
1199 auto tblgen_mapOpGroupSizes = getProperties().mapOpGroupSizes; (void)tblgen_mapOpGroupSizes;
1200 if (!tblgen_mapOpGroupSizes)
return emitOpError(
"requires attribute 'mapOpGroupSizes'");
1201 auto tblgen_numDimsPerMap = getProperties().numDimsPerMap; (void)tblgen_numDimsPerMap;
1202 auto tblgen_templateParams = getProperties().templateParams; (void)tblgen_templateParams;
1204 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(*
this, tblgen_callee,
"callee")))
1205 return ::mlir::failure();
1207 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops5(*
this, tblgen_templateParams,
"templateParams")))
1208 return ::mlir::failure();
1210 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops6(*
this, tblgen_numDimsPerMap,
"numDimsPerMap")))
1211 return ::mlir::failure();
1213 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops6(*
this, tblgen_mapOpGroupSizes,
"mapOpGroupSizes")))
1214 return ::mlir::failure();
1216 unsigned index = 0; (void)index;
1219 for (
auto v : valueGroup0) {
1220 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"operand", index++)))
1221 return ::mlir::failure();
1224 if (::mlir::failed(::mlir::OpTrait::impl::verifyValueSizeAttr(*
this,
"mapOpGroupSizes",
"mapOperands", valueGroup1.size())))
1225 return ::mlir::failure();
1227 for (
auto v : valueGroup1) {
1228 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*
this, v.getType(),
"operand", index++)))
1229 return ::mlir::failure();
1232 return ::mlir::success();
1239::mlir::ParseResult
IncludeOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1240 ::mlir::SymbolRefAttr calleeAttr;
1241 ::mlir::ArrayAttr templateParamsAttr;
1242 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argOperandsOperands;
1243 ::llvm::SMLoc argOperandsOperandsLoc;
1244 (void)argOperandsOperandsLoc;
1245 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> mapOperandsOperands;
1246 llvm::SmallVector<int32_t> mapOperandsOperandGroupSizes;
1247 ::llvm::SMLoc mapOperandsOperandsLoc;
1248 (void)mapOperandsOperandsLoc;
1249 ::mlir::DenseI32ArrayAttr numDimsPerMapAttr;
1250 ::llvm::ArrayRef<::mlir::Type> argOperandsTypes;
1251 ::llvm::ArrayRef<::mlir::Type> allResultTypes;
1253 if (parser.parseCustomAttributeWithFallback(calleeAttr, parser.getBuilder().getType<::mlir::NoneType>())) {
1254 return ::mlir::failure();
1257 if (::mlir::succeeded(parser.parseOptionalLess())) {
1260 if (odsResult) return ::mlir::failure();
1261 if (templateParamsAttr)
1264 if (parser.parseGreater())
1265 return ::mlir::failure();
1267 if (parser.parseLParen())
1268 return ::mlir::failure();
1270 argOperandsOperandsLoc = parser.getCurrentLocation();
1271 if (parser.parseOperandList(argOperandsOperands))
1272 return ::mlir::failure();
1273 if (parser.parseRParen())
1274 return ::mlir::failure();
1275 if (::mlir::succeeded(parser.parseOptionalLBrace())) {
1277 mapOperandsOperandsLoc = parser.getCurrentLocation();
1278 ::llvm::SmallVector<::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand>> mapOperandsOperandGroups;
1280 if (odsResult) return ::mlir::failure();
1281 for (
const auto &subRange : mapOperandsOperandGroups) {
1282 mapOperandsOperands.append(subRange.begin(), subRange.end());
1283 mapOperandsOperandGroupSizes.push_back(subRange.size());
1285 if (numDimsPerMapAttr)
1288 if (parser.parseRBrace())
1289 return ::mlir::failure();
1291 if (parser.parseColon())
1292 return ::mlir::failure();
1294 ::mlir::FunctionType argOperands__allResult_functionType;
1295 if (parser.parseType(argOperands__allResult_functionType))
1296 return ::mlir::failure();
1297 argOperandsTypes = argOperands__allResult_functionType.getInputs();
1298 allResultTypes = argOperands__allResult_functionType.getResults();
1301 if (odsResult) return ::mlir::failure();
1303::llvm::copy(::llvm::ArrayRef<int32_t>({
static_cast<int32_t
>(argOperandsOperands.size()),
static_cast<int32_t
>(mapOperandsOperands.size())}), result.getOrAddProperties<
IncludeOp::Properties>().operandSegmentSizes.begin());
1304 result.getOrAddProperties<
IncludeOp::Properties>().mapOpGroupSizes = parser.getBuilder().getDenseI32ArrayAttr(mapOperandsOperandGroupSizes);
1305 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIndexType();
1306 result.addTypes(allResultTypes);
1307 if (parser.resolveOperands(argOperandsOperands, argOperandsTypes, argOperandsOperandsLoc, result.operands))
1308 return ::mlir::failure();
1309 if (parser.resolveOperands(mapOperandsOperands, odsBuildableType0, mapOperandsOperandsLoc, result.operands))
1310 return ::mlir::failure();
1311 return ::mlir::success();
1315 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
1317 emitError() <<
"expected DictionaryAttr to set properties";
1318 return ::mlir::failure();
1323 auto attr = dict.get(
"mapOpGroupSizes");
1326 emitError() <<
"expected key entry for mapOpGroupSizes in DictionaryAttr to set "
1328 return ::mlir::failure();
1330 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
1331 if (convertedAttr) {
1332 propStorage = convertedAttr;
1334 emitError() <<
"Invalid attribute `mapOpGroupSizes` in property conversion: " << attr;
1335 return ::mlir::failure();
1339 return ::mlir::success();
1354 _odsPrinter <<
' ' <<
"{";
1358 _odsPrinter <<
' ' <<
":";
1360 _odsPrinter.printFunctionalType(
getArgOperands().getTypes(), getOperation()->getResultTypes());
1381 return ::mlir::success();
1385 odsState.addOperands(condition);
1388void RequireComputeOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
1389 odsState.addOperands(condition);
1390 assert(resultTypes.size() == 0u &&
"mismatched number of results");
1391 odsState.addTypes(resultTypes);
1394void RequireComputeOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1395 assert(operands.size() == 1u &&
"mismatched number of parameters");
1396 odsState.addOperands(operands);
1397 odsState.addAttributes(attributes);
1398 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
1399 odsState.addTypes(resultTypes);
1404 unsigned index = 0; (void)index;
1407 for (
auto v : valueGroup0) {
1408 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
1409 return ::mlir::failure();
1412 return ::mlir::success();
1420 ::mlir::OpAsmParser::UnresolvedOperand conditionRawOperand{};
1421 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> conditionOperands(&conditionRawOperand, 1); ::llvm::SMLoc conditionOperandsLoc;
1422 (void)conditionOperandsLoc;
1424 conditionOperandsLoc = parser.getCurrentLocation();
1425 if (parser.parseOperand(conditionRawOperand))
1426 return ::mlir::failure();
1428 auto loc = parser.getCurrentLocation();(void)loc;
1429 if (parser.parseOptionalAttrDict(result.attributes))
1430 return ::mlir::failure();
1432 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
1433 if (parser.resolveOperands(conditionOperands, odsBuildableType0, conditionOperandsLoc, result.operands))
1434 return ::mlir::failure();
1435 return ::mlir::success();
1441 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1442 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1448 ::mlir::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects
1450 effects.emplace_back(::mlir::MemoryEffects::Write::get());
1468 return ::mlir::success();
1472 odsState.addOperands(condition);
1475void RequireConstrainOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition) {
1476 odsState.addOperands(condition);
1477 assert(resultTypes.size() == 0u &&
"mismatched number of results");
1478 odsState.addTypes(resultTypes);
1481void RequireConstrainOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1482 assert(operands.size() == 1u &&
"mismatched number of parameters");
1483 odsState.addOperands(operands);
1484 odsState.addAttributes(attributes);
1485 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
1486 odsState.addTypes(resultTypes);
1491 unsigned index = 0; (void)index;
1494 for (
auto v : valueGroup0) {
1495 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
1496 return ::mlir::failure();
1499 return ::mlir::success();
1507 ::mlir::OpAsmParser::UnresolvedOperand conditionRawOperand{};
1508 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> conditionOperands(&conditionRawOperand, 1); ::llvm::SMLoc conditionOperandsLoc;
1509 (void)conditionOperandsLoc;
1511 conditionOperandsLoc = parser.getCurrentLocation();
1512 if (parser.parseOperand(conditionRawOperand))
1513 return ::mlir::failure();
1515 auto loc = parser.getCurrentLocation();(void)loc;
1516 if (parser.parseOptionalAttrDict(result.attributes))
1517 return ::mlir::failure();
1519 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
1520 if (parser.resolveOperands(conditionOperands, odsBuildableType0, conditionOperandsLoc, result.operands))
1521 return ::mlir::failure();
1522 return ::mlir::success();
1528 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1529 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1535 ::mlir::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects
1537 effects.emplace_back(::mlir::MemoryEffects::Write::get());
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()
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()
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)
::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
void printTemplateParams(mlir::AsmPrinter &printer, mlir::ArrayAttr value)
mlir::ParseResult parseAttrDictWithWarnings(mlir::OpAsmParser &parser, mlir::NamedAttrList &extraAttrs, mlir::OperationState &state)
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