32static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops1(
33 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
34 unsigned valueIndex) {
35 if (!((::llvm::isa<llzk::polymorphic::TypeVarType,::mlir::IntegerType>(type)))) {
36 return op->emitOpError(valueKind) <<
" #" << valueIndex
37 <<
" must be 1-bit signless integer or type variable, but got " << type;
39 return ::mlir::success();
42static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops2(
43 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
44 unsigned valueIndex) {
45 if (!((type.isSignlessInteger(1)))) {
46 return op->emitOpError(valueKind) <<
" #" << valueIndex
47 <<
" must be 1-bit signless integer, but got " << type;
49 return ::mlir::success();
52static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops3(
53 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
54 unsigned valueIndex) {
55 if (!((::llvm::isa<::llzk::felt::FeltType>(type)))) {
56 return op->emitOpError(valueKind) <<
" #" << valueIndex
57 <<
" must be finite field element, but got " << type;
59 return ::mlir::success();
62static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops1(
63 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
64 if (attr && !((::llvm::isa<::mlir::StringAttr>(attr))))
65 return emitError() <<
"attribute '" << attrName
66 <<
"' failed to satisfy constraint: string attribute";
67 return ::mlir::success();
69static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops1(
70 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
71 return __mlir_ods_local_attr_constraint_Ops1(attr, attrName, [op]() {
72 return op->emitOpError();
76static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops2(
77 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
78 if (attr && !((::llvm::isa<::llzk::boolean::FeltCmpPredicateAttr>(attr))))
79 return emitError() <<
"attribute '" << attrName
80 <<
"' failed to satisfy constraint: Field element comparison predicate";
81 return ::mlir::success();
83static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops2(
84 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
85 return __mlir_ods_local_attr_constraint_Ops2(attr, attrName, [op]() {
86 return op->emitOpError();
103 return ::mlir::success();
106void AndBoolOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
107 odsState.addOperands(lhs);
108 odsState.addOperands(rhs);
109 odsState.addTypes(result);
112void AndBoolOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
113 odsState.addOperands(lhs);
114 odsState.addOperands(rhs);
116 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
118 odsState.location, odsState.operands,
119 odsState.attributes.getDictionary(odsState.getContext()),
120 odsState.getRawProperties(),
121 odsState.regions, inferredReturnTypes)))
122 odsState.addTypes(inferredReturnTypes);
124 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
128void AndBoolOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
129 odsState.addOperands(lhs);
130 odsState.addOperands(rhs);
131 assert(resultTypes.size() == 1u &&
"mismatched number of results");
132 odsState.addTypes(resultTypes);
135void AndBoolOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
136 assert(operands.size() == 2u &&
"mismatched number of parameters");
137 odsState.addOperands(operands);
138 odsState.addAttributes(attributes);
139 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
140 odsState.addTypes(resultTypes);
143void AndBoolOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
144 assert(operands.size() == 2u &&
"mismatched number of parameters");
145 odsState.addOperands(operands);
146 odsState.addAttributes(attributes);
148 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
150 odsState.location, operands,
151 odsState.attributes.getDictionary(odsState.getContext()),
152 odsState.getRawProperties(),
153 odsState.regions, inferredReturnTypes))) {
154 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
155 odsState.addTypes(inferredReturnTypes);
157 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
163 unsigned index = 0; (void)index;
166 for (
auto v : valueGroup0) {
167 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
168 return ::mlir::failure();
172 for (
auto v : valueGroup1) {
173 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
174 return ::mlir::failure();
178 unsigned index = 0; (void)index;
181 for (
auto v : valueGroup0) {
182 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
183 return ::mlir::failure();
187 return emitOpError(
"failed to verify that result type matches with lhs type");
189 return emitOpError(
"failed to verify that result type matches with rhs type");
190 return ::mlir::success();
197::llvm::LogicalResult
AndBoolOp::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) {
198 inferredReturnTypes.resize(1);
199 ::mlir::Builder odsBuilder(context);
200 ::mlir::Type odsInferredType0 = odsBuilder.getIntegerType(1);
201 inferredReturnTypes[0] = odsInferredType0;
202 return ::mlir::success();
205::mlir::ParseResult
AndBoolOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
206 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
207 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
208 (void)lhsOperandsLoc;
209 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
210 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
211 (void)rhsOperandsLoc;
212 ::mlir::Type lhsRawType{};
213 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
214 ::mlir::Type rhsRawType{};
215 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
217 lhsOperandsLoc = parser.getCurrentLocation();
218 if (parser.parseOperand(lhsRawOperand))
219 return ::mlir::failure();
220 if (parser.parseComma())
221 return ::mlir::failure();
223 rhsOperandsLoc = parser.getCurrentLocation();
224 if (parser.parseOperand(rhsRawOperand))
225 return ::mlir::failure();
227 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
228 if (odsResult) return ::mlir::failure();
231 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
232 if (odsResult) return ::mlir::failure();
235 auto loc = parser.getCurrentLocation();(void)loc;
236 if (parser.parseOptionalAttrDict(result.attributes))
237 return ::mlir::failure();
239 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
240 result.addTypes(odsBuildableType0);
241 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
242 return ::mlir::failure();
243 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
244 return ::mlir::failure();
245 return ::mlir::success();
254 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
255 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
256 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
257 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
260void AndBoolOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
279 return attr ? ::std::optional< ::llvm::StringRef >(attr.getValue()) : (::std::nullopt);
288 if (tblgen_msg && !((::llvm::isa<::mlir::StringAttr>(tblgen_msg))))
289 return emitError(loc,
"'bool.assert' op ""attribute 'msg' failed to satisfy constraint: string attribute");
290 return ::mlir::success();
294 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
296 emitError() <<
"expected DictionaryAttr to set properties";
297 return ::mlir::failure();
301 auto &propStorage = prop.
msg;
302 auto attr = dict.get(
"msg");
304 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
306 propStorage = convertedAttr;
308 emitError() <<
"Invalid attribute `msg` in property conversion: " << attr;
309 return ::mlir::failure();
313 return ::mlir::success();
317 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
318 ::mlir::Builder odsBuilder{ctx};
321 const auto &propStorage = prop.
msg;
323 attrs.push_back(odsBuilder.getNamedAttr(
"msg",
328 return odsBuilder.getDictionaryAttr(attrs);
333 return llvm::hash_combine(
334 llvm::hash_value(prop.
msg.getAsOpaquePointer()));
345 prop.
msg = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
msg)>>(value);
351 if (prop.
msg) attrs.append(
"msg", prop.
msg);
354::llvm::LogicalResult
AssertOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
357 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(attr,
"msg", emitError)))
358 return ::mlir::failure();
360 return ::mlir::success();
364 auto &prop = state.getOrAddProperties<
Properties>(); (void)prop;
365 if (::mlir::failed(reader.readOptionalAttribute(prop.
msg)))
366 return ::mlir::failure();
367 return ::mlir::success();
371 auto &prop = getProperties(); (void)prop;
373 writer.writeOptionalAttribute(prop.
msg);
378 return attr ? ::std::optional< ::llvm::StringRef >(attr.getValue()) : (::std::nullopt);
382 auto &odsProp = getProperties().msg;
384 odsProp = ::mlir::Builder((*this)->getContext()).getStringAttr(*attrValue);
389void AssertOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition, ::mlir::StringAttr msg) {
390 odsState.addOperands(condition);
392 odsState.getOrAddProperties<
Properties>().msg = msg;
396void AssertOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition, ::mlir::StringAttr msg) {
397 odsState.addOperands(condition);
399 odsState.getOrAddProperties<
Properties>().msg = msg;
401 assert(resultTypes.size() == 0u &&
"mismatched number of results");
402 odsState.addTypes(resultTypes);
405void AssertOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
406 assert(operands.size() == 1u &&
"mismatched number of parameters");
407 odsState.addOperands(operands);
408 odsState.addAttributes(attributes);
409 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
410 odsState.addTypes(resultTypes);
412 if (!attributes.empty()) {
413 ::mlir::OpaqueProperties properties =
415 std::optional<::mlir::RegisteredOperationName> info =
416 odsState.name.getRegisteredInfo();
417 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
418 odsState.attributes.getDictionary(odsState.getContext()),
nullptr)))
419 ::llvm::report_fatal_error(
"Property conversion failed.");
424 auto tblgen_msg = getProperties().msg; (void)tblgen_msg;
426 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(*
this, tblgen_msg,
"msg")))
427 return ::mlir::failure();
429 unsigned index = 0; (void)index;
432 for (
auto v : valueGroup0) {
433 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"operand", index++)))
434 return ::mlir::failure();
437 return ::mlir::success();
444::mlir::ParseResult
AssertOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
445 ::mlir::OpAsmParser::UnresolvedOperand conditionRawOperand{};
446 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> conditionOperands(&conditionRawOperand, 1); ::llvm::SMLoc conditionOperandsLoc;
447 (void)conditionOperandsLoc;
448 ::mlir::StringAttr msgAttr;
450 conditionOperandsLoc = parser.getCurrentLocation();
451 if (parser.parseOperand(conditionRawOperand))
452 return ::mlir::failure();
453 if (::mlir::succeeded(parser.parseOptionalComma())) {
455 if (parser.parseCustomAttributeWithFallback(msgAttr, parser.getBuilder().getType<::mlir::NoneType>())) {
456 return ::mlir::failure();
461 auto loc = parser.getCurrentLocation();(void)loc;
462 if (parser.parseOptionalAttrDict(result.attributes))
463 return ::mlir::failure();
465 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
467 return ::mlir::failure();
469 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
470 if (parser.resolveOperands(conditionOperands, odsBuildableType0, conditionOperandsLoc, result.operands))
471 return ::mlir::failure();
472 return ::mlir::success();
481 _odsPrinter.printAttributeWithoutType(
getMsgAttr());
483 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
484 elidedAttrs.push_back(
"msg");
485 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
504 return attr.getValue();
512 if (!tblgen_predicate)
return emitError(loc,
"'bool.cmp' op ""requires attribute 'predicate'");
514 if (tblgen_predicate && !((::llvm::isa<::llzk::boolean::FeltCmpPredicateAttr>(tblgen_predicate))))
515 return emitError(loc,
"'bool.cmp' op ""attribute 'predicate' failed to satisfy constraint: Field element comparison predicate");
516 return ::mlir::success();
520 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
522 emitError() <<
"expected DictionaryAttr to set properties";
523 return ::mlir::failure();
528 auto attr = dict.get(
"predicate");
530 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
532 propStorage = convertedAttr;
534 emitError() <<
"Invalid attribute `predicate` in property conversion: " << attr;
535 return ::mlir::failure();
539 return ::mlir::success();
543 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
544 ::mlir::Builder odsBuilder{ctx};
547 const auto &propStorage = prop.
predicate;
549 attrs.push_back(odsBuilder.getNamedAttr(
"predicate",
554 return odsBuilder.getDictionaryAttr(attrs);
559 return llvm::hash_combine(
560 llvm::hash_value(prop.
predicate.getAsOpaquePointer()));
564 if (name ==
"predicate")
570 if (name ==
"predicate") {
571 prop.
predicate = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
predicate)>>(value);
580::llvm::LogicalResult
CmpOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
583 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(attr,
"predicate", emitError)))
584 return ::mlir::failure();
586 return ::mlir::success();
590 auto &prop = state.getOrAddProperties<
Properties>(); (void)prop;
591 if (::mlir::failed(reader.readAttribute(prop.
predicate)))
592 return ::mlir::failure();
593 return ::mlir::success();
597 auto &prop = getProperties(); (void)prop;
603 return attr.getValue();
607 getProperties().predicate = ::llzk::boolean::FeltCmpPredicateAttr::get(::mlir::Builder((*this)->getContext()).getContext(), attrValue);
610void CmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::boolean::FeltCmpPredicateAttr predicate, ::mlir::Value lhs, ::mlir::Value rhs) {
611 odsState.addOperands(lhs);
612 odsState.addOperands(rhs);
613 odsState.getOrAddProperties<
Properties>().predicate = predicate;
614 odsState.addTypes(result);
617void CmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::boolean::FeltCmpPredicateAttr predicate, ::mlir::Value lhs, ::mlir::Value rhs) {
618 odsState.addOperands(lhs);
619 odsState.addOperands(rhs);
620 odsState.getOrAddProperties<
Properties>().predicate = predicate;
622 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
624 odsState.location, odsState.operands,
625 odsState.attributes.getDictionary(odsState.getContext()),
626 odsState.getRawProperties(),
627 odsState.regions, inferredReturnTypes)))
628 odsState.addTypes(inferredReturnTypes);
630 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
634void CmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llzk::boolean::FeltCmpPredicateAttr predicate, ::mlir::Value lhs, ::mlir::Value rhs) {
635 odsState.addOperands(lhs);
636 odsState.addOperands(rhs);
637 odsState.getOrAddProperties<
Properties>().predicate = predicate;
638 assert(resultTypes.size() == 1u &&
"mismatched number of results");
639 odsState.addTypes(resultTypes);
643 odsState.addOperands(lhs);
644 odsState.addOperands(rhs);
645 odsState.getOrAddProperties<
Properties>().predicate = ::llzk::boolean::FeltCmpPredicateAttr::get(odsBuilder.getContext(), predicate);
646 odsState.addTypes(result);
650 odsState.addOperands(lhs);
651 odsState.addOperands(rhs);
652 odsState.getOrAddProperties<
Properties>().predicate = ::llzk::boolean::FeltCmpPredicateAttr::get(odsBuilder.getContext(), predicate);
654 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
656 odsState.location, odsState.operands,
657 odsState.attributes.getDictionary(odsState.getContext()),
658 odsState.getRawProperties(),
659 odsState.regions, inferredReturnTypes)))
660 odsState.addTypes(inferredReturnTypes);
662 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
667 odsState.addOperands(lhs);
668 odsState.addOperands(rhs);
669 odsState.getOrAddProperties<
Properties>().predicate = ::llzk::boolean::FeltCmpPredicateAttr::get(odsBuilder.getContext(), predicate);
670 assert(resultTypes.size() == 1u &&
"mismatched number of results");
671 odsState.addTypes(resultTypes);
674void CmpOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
675 assert(operands.size() == 2u &&
"mismatched number of parameters");
676 odsState.addOperands(operands);
677 odsState.addAttributes(attributes);
678 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
679 odsState.addTypes(resultTypes);
681 if (!attributes.empty()) {
682 ::mlir::OpaqueProperties properties =
684 std::optional<::mlir::RegisteredOperationName> info =
685 odsState.name.getRegisteredInfo();
686 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
687 odsState.attributes.getDictionary(odsState.getContext()),
nullptr)))
688 ::llvm::report_fatal_error(
"Property conversion failed.");
692void CmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
693 assert(operands.size() == 2u &&
"mismatched number of parameters");
694 odsState.addOperands(operands);
695 odsState.addAttributes(attributes);
697 if (!attributes.empty()) {
698 ::mlir::OpaqueProperties properties =
700 std::optional<::mlir::RegisteredOperationName> info =
701 odsState.name.getRegisteredInfo();
702 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
703 odsState.attributes.getDictionary(odsState.getContext()),
nullptr)))
704 ::llvm::report_fatal_error(
"Property conversion failed.");
706 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
708 odsState.location, operands,
709 odsState.attributes.getDictionary(odsState.getContext()),
710 odsState.getRawProperties(),
711 odsState.regions, inferredReturnTypes))) {
712 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
713 odsState.addTypes(inferredReturnTypes);
715 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
720 auto tblgen_predicate = getProperties().predicate; (void)tblgen_predicate;
721 if (!tblgen_predicate)
return emitOpError(
"requires attribute 'predicate'");
723 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(*
this, tblgen_predicate,
"predicate")))
724 return ::mlir::failure();
726 unsigned index = 0; (void)index;
729 for (
auto v : valueGroup0) {
730 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*
this, v.getType(),
"operand", index++)))
731 return ::mlir::failure();
735 for (
auto v : valueGroup1) {
736 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*
this, v.getType(),
"operand", index++)))
737 return ::mlir::failure();
741 unsigned index = 0; (void)index;
744 for (
auto v : valueGroup0) {
745 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
746 return ::mlir::failure();
750 return emitOpError(
"failed to verify that rhs type matches with lhs type");
751 return ::mlir::success();
758::llvm::LogicalResult
CmpOp::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) {
759 inferredReturnTypes.resize(1);
760 ::mlir::Builder odsBuilder(context);
761 ::mlir::Type odsInferredType0 = odsBuilder.getIntegerType(1);
762 inferredReturnTypes[0] = odsInferredType0;
763 return ::mlir::success();
766::mlir::ParseResult
CmpOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
767 ::llzk::boolean::FeltCmpPredicateAttr predicateAttr;
768 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
769 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
770 (void)lhsOperandsLoc;
771 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
772 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
773 (void)rhsOperandsLoc;
774 ::mlir::Type lhsRawType{};
775 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
776 ::mlir::Type rhsRawType{};
777 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
779 if (parser.parseCustomAttributeWithFallback(predicateAttr, ::mlir::Type{})) {
780 return ::mlir::failure();
782 if (predicateAttr) result.getOrAddProperties<
CmpOp::Properties>().predicate = predicateAttr;
783 if (parser.parseLParen())
784 return ::mlir::failure();
786 lhsOperandsLoc = parser.getCurrentLocation();
787 if (parser.parseOperand(lhsRawOperand))
788 return ::mlir::failure();
789 if (parser.parseComma())
790 return ::mlir::failure();
792 rhsOperandsLoc = parser.getCurrentLocation();
793 if (parser.parseOperand(rhsRawOperand))
794 return ::mlir::failure();
795 if (parser.parseRParen())
796 return ::mlir::failure();
798 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
799 if (odsResult) return ::mlir::failure();
802 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
803 if (odsResult) return ::mlir::failure();
806 auto loc = parser.getCurrentLocation();(void)loc;
807 if (parser.parseOptionalAttrDict(result.attributes))
808 return ::mlir::failure();
810 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
812 return ::mlir::failure();
814 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
815 result.addTypes(odsBuildableType0);
816 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
817 return ::mlir::failure();
818 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
819 return ::mlir::failure();
820 return ::mlir::success();
831 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
832 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
833 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
834 elidedAttrs.push_back(
"predicate");
835 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
838void CmpOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
857 return ::mlir::success();
860void NotBoolOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value operand) {
861 odsState.addOperands(operand);
862 odsState.addTypes(result);
865void NotBoolOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value operand) {
866 odsState.addOperands(operand);
868 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
870 odsState.location, odsState.operands,
871 odsState.attributes.getDictionary(odsState.getContext()),
872 odsState.getRawProperties(),
873 odsState.regions, inferredReturnTypes)))
874 odsState.addTypes(inferredReturnTypes);
876 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
880void NotBoolOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value operand) {
881 odsState.addOperands(operand);
882 assert(resultTypes.size() == 1u &&
"mismatched number of results");
883 odsState.addTypes(resultTypes);
886void NotBoolOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
887 assert(operands.size() == 1u &&
"mismatched number of parameters");
888 odsState.addOperands(operands);
889 odsState.addAttributes(attributes);
890 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
891 odsState.addTypes(resultTypes);
894void NotBoolOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
895 assert(operands.size() == 1u &&
"mismatched number of parameters");
896 odsState.addOperands(operands);
897 odsState.addAttributes(attributes);
899 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
901 odsState.location, operands,
902 odsState.attributes.getDictionary(odsState.getContext()),
903 odsState.getRawProperties(),
904 odsState.regions, inferredReturnTypes))) {
905 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
906 odsState.addTypes(inferredReturnTypes);
908 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
914 unsigned index = 0; (void)index;
917 for (
auto v : valueGroup0) {
918 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
919 return ::mlir::failure();
923 unsigned index = 0; (void)index;
926 for (
auto v : valueGroup0) {
927 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
928 return ::mlir::failure();
932 return emitOpError(
"failed to verify that result type matches with operand type");
933 return ::mlir::success();
940::llvm::LogicalResult
NotBoolOp::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) {
941 inferredReturnTypes.resize(1);
942 ::mlir::Builder odsBuilder(context);
943 ::mlir::Type odsInferredType0 = odsBuilder.getIntegerType(1);
944 inferredReturnTypes[0] = odsInferredType0;
945 return ::mlir::success();
948::mlir::ParseResult
NotBoolOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
949 ::mlir::OpAsmParser::UnresolvedOperand operandRawOperand{};
950 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> operandOperands(&operandRawOperand, 1); ::llvm::SMLoc operandOperandsLoc;
951 (void)operandOperandsLoc;
952 ::mlir::Type operandRawType{};
953 ::llvm::ArrayRef<::mlir::Type> operandTypes(&operandRawType, 1);
955 operandOperandsLoc = parser.getCurrentLocation();
956 if (parser.parseOperand(operandRawOperand))
957 return ::mlir::failure();
959 auto odsResult = parseInferredOrParsedType(parser, operandRawType,
true);
960 if (odsResult) return ::mlir::failure();
963 auto loc = parser.getCurrentLocation();(void)loc;
964 if (parser.parseOptionalAttrDict(result.attributes))
965 return ::mlir::failure();
967 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
968 result.addTypes(odsBuildableType0);
969 if (parser.resolveOperands(operandOperands, operandTypes, operandOperandsLoc, result.operands))
970 return ::mlir::failure();
971 return ::mlir::success();
977 printInferredOrParsedType(_odsPrinter, *
this,
getOperand().getType(),
true);
978 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
979 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
982void NotBoolOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1001 return ::mlir::success();
1004void OrBoolOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
1005 odsState.addOperands(lhs);
1006 odsState.addOperands(rhs);
1007 odsState.addTypes(result);
1010void OrBoolOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
1011 odsState.addOperands(lhs);
1012 odsState.addOperands(rhs);
1014 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1016 odsState.location, odsState.operands,
1017 odsState.attributes.getDictionary(odsState.getContext()),
1018 odsState.getRawProperties(),
1019 odsState.regions, inferredReturnTypes)))
1020 odsState.addTypes(inferredReturnTypes);
1022 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1026void OrBoolOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
1027 odsState.addOperands(lhs);
1028 odsState.addOperands(rhs);
1029 assert(resultTypes.size() == 1u &&
"mismatched number of results");
1030 odsState.addTypes(resultTypes);
1033void OrBoolOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1034 assert(operands.size() == 2u &&
"mismatched number of parameters");
1035 odsState.addOperands(operands);
1036 odsState.addAttributes(attributes);
1037 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
1038 odsState.addTypes(resultTypes);
1041void OrBoolOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1042 assert(operands.size() == 2u &&
"mismatched number of parameters");
1043 odsState.addOperands(operands);
1044 odsState.addAttributes(attributes);
1046 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1048 odsState.location, operands,
1049 odsState.attributes.getDictionary(odsState.getContext()),
1050 odsState.getRawProperties(),
1051 odsState.regions, inferredReturnTypes))) {
1052 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
1053 odsState.addTypes(inferredReturnTypes);
1055 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
1061 unsigned index = 0; (void)index;
1064 for (
auto v : valueGroup0) {
1065 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
1066 return ::mlir::failure();
1070 for (
auto v : valueGroup1) {
1071 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
1072 return ::mlir::failure();
1076 unsigned index = 0; (void)index;
1079 for (
auto v : valueGroup0) {
1080 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
1081 return ::mlir::failure();
1085 return emitOpError(
"failed to verify that result type matches with lhs type");
1087 return emitOpError(
"failed to verify that result type matches with rhs type");
1088 return ::mlir::success();
1095::llvm::LogicalResult
OrBoolOp::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) {
1096 inferredReturnTypes.resize(1);
1097 ::mlir::Builder odsBuilder(context);
1098 ::mlir::Type odsInferredType0 = odsBuilder.getIntegerType(1);
1099 inferredReturnTypes[0] = odsInferredType0;
1100 return ::mlir::success();
1103::mlir::ParseResult
OrBoolOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1104 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
1105 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
1106 (void)lhsOperandsLoc;
1107 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
1108 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
1109 (void)rhsOperandsLoc;
1110 ::mlir::Type lhsRawType{};
1111 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
1112 ::mlir::Type rhsRawType{};
1113 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
1115 lhsOperandsLoc = parser.getCurrentLocation();
1116 if (parser.parseOperand(lhsRawOperand))
1117 return ::mlir::failure();
1118 if (parser.parseComma())
1119 return ::mlir::failure();
1121 rhsOperandsLoc = parser.getCurrentLocation();
1122 if (parser.parseOperand(rhsRawOperand))
1123 return ::mlir::failure();
1125 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
1126 if (odsResult) return ::mlir::failure();
1129 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
1130 if (odsResult) return ::mlir::failure();
1133 auto loc = parser.getCurrentLocation();(void)loc;
1134 if (parser.parseOptionalAttrDict(result.attributes))
1135 return ::mlir::failure();
1137 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
1138 result.addTypes(odsBuildableType0);
1139 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
1140 return ::mlir::failure();
1141 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
1142 return ::mlir::failure();
1143 return ::mlir::success();
1152 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
1153 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
1154 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1155 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1158void OrBoolOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1177 return ::mlir::success();
1180void XorBoolOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
1181 odsState.addOperands(lhs);
1182 odsState.addOperands(rhs);
1183 odsState.addTypes(result);
1186void XorBoolOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
1187 odsState.addOperands(lhs);
1188 odsState.addOperands(rhs);
1190 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1192 odsState.location, odsState.operands,
1193 odsState.attributes.getDictionary(odsState.getContext()),
1194 odsState.getRawProperties(),
1195 odsState.regions, inferredReturnTypes)))
1196 odsState.addTypes(inferredReturnTypes);
1198 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1202void XorBoolOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
1203 odsState.addOperands(lhs);
1204 odsState.addOperands(rhs);
1205 assert(resultTypes.size() == 1u &&
"mismatched number of results");
1206 odsState.addTypes(resultTypes);
1209void XorBoolOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1210 assert(operands.size() == 2u &&
"mismatched number of parameters");
1211 odsState.addOperands(operands);
1212 odsState.addAttributes(attributes);
1213 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
1214 odsState.addTypes(resultTypes);
1217void XorBoolOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1218 assert(operands.size() == 2u &&
"mismatched number of parameters");
1219 odsState.addOperands(operands);
1220 odsState.addAttributes(attributes);
1222 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1224 odsState.location, operands,
1225 odsState.attributes.getDictionary(odsState.getContext()),
1226 odsState.getRawProperties(),
1227 odsState.regions, inferredReturnTypes))) {
1228 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
1229 odsState.addTypes(inferredReturnTypes);
1231 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
1237 unsigned index = 0; (void)index;
1240 for (
auto v : valueGroup0) {
1241 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
1242 return ::mlir::failure();
1246 for (
auto v : valueGroup1) {
1247 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
1248 return ::mlir::failure();
1252 unsigned index = 0; (void)index;
1255 for (
auto v : valueGroup0) {
1256 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
1257 return ::mlir::failure();
1261 return emitOpError(
"failed to verify that result type matches with lhs type");
1263 return emitOpError(
"failed to verify that result type matches with rhs type");
1264 return ::mlir::success();
1271::llvm::LogicalResult
XorBoolOp::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) {
1272 inferredReturnTypes.resize(1);
1273 ::mlir::Builder odsBuilder(context);
1274 ::mlir::Type odsInferredType0 = odsBuilder.getIntegerType(1);
1275 inferredReturnTypes[0] = odsInferredType0;
1276 return ::mlir::success();
1279::mlir::ParseResult
XorBoolOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1280 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
1281 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
1282 (void)lhsOperandsLoc;
1283 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
1284 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
1285 (void)rhsOperandsLoc;
1286 ::mlir::Type lhsRawType{};
1287 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
1288 ::mlir::Type rhsRawType{};
1289 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
1291 lhsOperandsLoc = parser.getCurrentLocation();
1292 if (parser.parseOperand(lhsRawOperand))
1293 return ::mlir::failure();
1294 if (parser.parseComma())
1295 return ::mlir::failure();
1297 rhsOperandsLoc = parser.getCurrentLocation();
1298 if (parser.parseOperand(rhsRawOperand))
1299 return ::mlir::failure();
1301 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
1302 if (odsResult) return ::mlir::failure();
1305 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
1306 if (odsResult) return ::mlir::failure();
1309 auto loc = parser.getCurrentLocation();(void)loc;
1310 if (parser.parseOptionalAttrDict(result.attributes))
1311 return ::mlir::failure();
1313 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
1314 result.addTypes(odsBuildableType0);
1315 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
1316 return ::mlir::failure();
1317 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
1318 return ::mlir::failure();
1319 return ::mlir::success();
1328 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
1329 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
1330 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1331 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1334void XorBoolOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
::llvm::LogicalResult verify(::mlir::Location loc)
AndBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
AndBoolOpAdaptor(AndBoolOp op)
::mlir::ValueRange getOperands()
::mlir::Operation::operand_range getODSOperands(unsigned index)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
::mlir::Operation::result_range getODSResults(unsigned index)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::llvm::LogicalResult verifyInvariants()
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::TypedValue<::mlir::Type > getLhs()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::TypedValue<::mlir::Type > getRhs()
::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)
::llvm::LogicalResult verifyInvariantsImpl()
AssertOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
AssertOpAdaptor(AssertOp op)
::mlir::ValueRange getOperands()
::mlir::TypedValue<::mlir::IntegerType > getCondition()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition, ::mlir::StringAttr msg)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
::std::optional< ::llvm::StringRef > getMsg()
::mlir::StringAttr getMsgAttr()
void setMsg(::std::optional<::llvm::StringRef > attrValue)
static llvm::hash_code computePropertiesHash(const Properties &prop)
::mlir::Operation::operand_range getODSOperands(unsigned index)
void writeProperties(::mlir::DialectBytecodeWriter &writer)
void print(::mlir::OpAsmPrinter &_odsPrinter)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
FoldAdaptor::Properties Properties
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::llvm::LogicalResult verifyInvariants()
::mlir::StringAttr getMsgAttrName()
::llvm::LogicalResult verifyInvariantsImpl()
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::llvm::LogicalResult verify(::mlir::Location loc)
CmpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::ValueRange getOperands()
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::boolean::FeltCmpPredicateAttr predicate, ::mlir::Value lhs, ::mlir::Value rhs)
::mlir::TypedValue<::llzk::felt::FeltType > getLhs()
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::mlir::StringAttr getPredicateAttrName()
::mlir::Operation::result_range getODSResults(unsigned index)
::llvm::LogicalResult verifyInvariants()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::llzk::boolean::FeltCmpPredicate getPredicate()
::llvm::LogicalResult verifyInvariantsImpl()
void setPredicate(::llzk::boolean::FeltCmpPredicate attrValue)
::llzk::boolean::FeltCmpPredicateAttr getPredicateAttr()
::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::operand_range getODSOperands(unsigned index)
FoldAdaptor::Properties Properties
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::TypedValue<::llzk::felt::FeltType > getRhs()
void writeProperties(::mlir::DialectBytecodeWriter &writer)
static llvm::hash_code computePropertiesHash(const Properties &prop)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
NotBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
NotBoolOpAdaptor(NotBoolOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
::mlir::ValueRange getOperands()
::llvm::LogicalResult verifyInvariantsImpl()
::mlir::TypedValue<::mlir::Type > getOperand()
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::llvm::LogicalResult verifyInvariants()
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value operand)
::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::operand_range getODSOperands(unsigned index)
::mlir::Operation::result_range getODSResults(unsigned index)
OrBoolOpAdaptor(OrBoolOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
OrBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::mlir::ValueRange getOperands()
::llvm::LogicalResult verifyInvariantsImpl()
::mlir::Operation::operand_range getODSOperands(unsigned index)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::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::TypedValue<::mlir::Type > getLhs()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
::llvm::LogicalResult verifyInvariants()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::TypedValue<::mlir::Type > getRhs()
::mlir::Operation::result_range getODSResults(unsigned index)
XorBoolOpAdaptor(XorBoolOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
XorBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::mlir::ValueRange getOperands()
::llvm::LogicalResult verifyInvariantsImpl()
::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)
::mlir::Operation::operand_range getODSOperands(unsigned index)
::mlir::Operation::result_range getODSResults(unsigned index)
::mlir::TypedValue<::mlir::Type > getLhs()
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::TypedValue<::mlir::Type > getRhs()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
const Properties & getProperties()
::std::optional<::mlir::OperationName > odsOpName
AssertOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::StringAttr getMsgAttr()
::mlir::DictionaryAttr odsAttrs
::mlir::RegionRange odsRegions
::std::optional< ::llvm::StringRef > getMsg()
::llzk::boolean::FeltCmpPredicateAttr getPredicateAttr()
::mlir::RegionRange odsRegions
::std::optional<::mlir::OperationName > odsOpName
CmpOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::DictionaryAttr odsAttrs
::llzk::boolean::FeltCmpPredicate getPredicate()
const Properties & getProperties()
bool typesUnify(Type lhs, Type rhs, ArrayRef< StringRef > rhsReversePrefix, UnificationMap *unifications)