44static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops1(
45 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
46 unsigned valueIndex) {
47 if (!((::llvm::isa<llzk::polymorphic::TypeVarType,::llzk::felt::FeltType>(type)))) {
48 return op->emitOpError(valueKind) <<
" #" << valueIndex
49 <<
" must be finite field element or type variable, but got " << type;
51 return ::mlir::success();
54static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops2(
55 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
56 unsigned valueIndex) {
58 return op->emitOpError(valueKind) <<
" #" << valueIndex
59 <<
" must be a valid LLZK type, but got " << type;
61 return ::mlir::success();
64static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops1(
65 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
66 if (attr && !((::llvm::isa<::llzk::felt::FeltConstAttr>(attr))))
67 return emitError() <<
"attribute '" << attrName
68 <<
"' failed to satisfy constraint: finite field element";
69 return ::mlir::success();
71static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops1(
72 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
73 return __mlir_ods_local_attr_constraint_Ops1(attr, attrName, [op]() {
74 return op->emitOpError();
91 return ::mlir::success();
94void AddFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
95 odsState.addOperands(lhs);
96 odsState.addOperands(rhs);
97 odsState.addTypes(result);
100void AddFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
101 odsState.addOperands(lhs);
102 odsState.addOperands(rhs);
104 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
106 odsState.location, odsState.operands,
107 odsState.attributes.getDictionary(odsState.getContext()),
108 odsState.getRawProperties(),
109 odsState.regions, inferredReturnTypes)))
110 odsState.addTypes(inferredReturnTypes);
112 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
116void AddFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
117 odsState.addOperands(lhs);
118 odsState.addOperands(rhs);
119 assert(resultTypes.size() == 1u &&
"mismatched number of results");
120 odsState.addTypes(resultTypes);
123void AddFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
124 assert(operands.size() == 2u &&
"mismatched number of parameters");
125 odsState.addOperands(operands);
126 odsState.addAttributes(attributes);
127 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
128 odsState.addTypes(resultTypes);
131void AddFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
132 assert(operands.size() == 2u &&
"mismatched number of parameters");
133 odsState.addOperands(operands);
134 odsState.addAttributes(attributes);
136 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
138 odsState.location, operands,
139 odsState.attributes.getDictionary(odsState.getContext()),
140 odsState.getRawProperties(),
141 odsState.regions, inferredReturnTypes))) {
142 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
143 odsState.addTypes(inferredReturnTypes);
145 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
151 unsigned index = 0; (void)index;
154 for (
auto v : valueGroup0) {
155 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
156 return ::mlir::failure();
160 for (
auto v : valueGroup1) {
161 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
162 return ::mlir::failure();
166 unsigned index = 0; (void)index;
169 for (
auto v : valueGroup0) {
170 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
171 return ::mlir::failure();
175 return emitOpError(
"failed to verify that rhs type matches with lhs type");
177 return emitOpError(
"failed to verify that result type matches with lhs type");
179 return emitOpError(
"failed to verify that result type matches with rhs type");
180 return ::mlir::success();
187::mlir::ParseResult
AddFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
188 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
189 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
190 (void)lhsOperandsLoc;
191 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
192 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
193 (void)rhsOperandsLoc;
194 ::mlir::Type lhsRawType{};
195 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
196 ::mlir::Type rhsRawType{};
197 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
199 lhsOperandsLoc = parser.getCurrentLocation();
200 if (parser.parseOperand(lhsRawOperand))
201 return ::mlir::failure();
202 if (parser.parseComma())
203 return ::mlir::failure();
205 rhsOperandsLoc = parser.getCurrentLocation();
206 if (parser.parseOperand(rhsRawOperand))
207 return ::mlir::failure();
209 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
210 if (odsResult) return ::mlir::failure();
213 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
214 if (odsResult) return ::mlir::failure();
217 auto loc = parser.getCurrentLocation();(void)loc;
218 if (parser.parseOptionalAttrDict(result.attributes))
219 return ::mlir::failure();
221 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
222 return ::mlir::failure();
223 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
224 return ::mlir::failure();
226 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
228 result.location, result.operands,
229 result.attributes.getDictionary(parser.getContext()),
230 result.getRawProperties(),
231 result.regions, inferredReturnTypes)))
232 return ::mlir::failure();
233 result.addTypes(inferredReturnTypes);
234 return ::mlir::success();
243 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
244 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
245 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
246 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
249void AddFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
252 ::llvm::LogicalResult
254 std::optional<::mlir::Location> location,
255 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
256 ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions,
257 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
260 location, adaptor, inferredReturnTypes);
265 mlir::MLIRContext *context, std::optional<mlir::Location> loc, Adaptor adaptor,
266 llvm::SmallVectorImpl<mlir::Type> &inferred
269 auto value = adaptor.getLhs();
270 inferred[0] = value ? value.getType() :
FeltType::get(context, mlir::StringAttr());
271 return mlir::success();
293 return ::mlir::success();
296void AndFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
297 odsState.addOperands(lhs);
298 odsState.addOperands(rhs);
299 odsState.addTypes(result);
302void AndFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
303 odsState.addOperands(lhs);
304 odsState.addOperands(rhs);
306 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
308 odsState.location, odsState.operands,
309 odsState.attributes.getDictionary(odsState.getContext()),
310 odsState.getRawProperties(),
311 odsState.regions, inferredReturnTypes)))
312 odsState.addTypes(inferredReturnTypes);
314 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
318void AndFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
319 odsState.addOperands(lhs);
320 odsState.addOperands(rhs);
321 assert(resultTypes.size() == 1u &&
"mismatched number of results");
322 odsState.addTypes(resultTypes);
325void AndFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
326 assert(operands.size() == 2u &&
"mismatched number of parameters");
327 odsState.addOperands(operands);
328 odsState.addAttributes(attributes);
329 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
330 odsState.addTypes(resultTypes);
333void AndFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
334 assert(operands.size() == 2u &&
"mismatched number of parameters");
335 odsState.addOperands(operands);
336 odsState.addAttributes(attributes);
338 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
340 odsState.location, operands,
341 odsState.attributes.getDictionary(odsState.getContext()),
342 odsState.getRawProperties(),
343 odsState.regions, inferredReturnTypes))) {
344 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
345 odsState.addTypes(inferredReturnTypes);
347 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
353 unsigned index = 0; (void)index;
356 for (
auto v : valueGroup0) {
357 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
358 return ::mlir::failure();
362 for (
auto v : valueGroup1) {
363 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
364 return ::mlir::failure();
368 unsigned index = 0; (void)index;
371 for (
auto v : valueGroup0) {
372 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
373 return ::mlir::failure();
377 return emitOpError(
"failed to verify that rhs type matches with lhs type");
379 return emitOpError(
"failed to verify that result type matches with lhs type");
381 return emitOpError(
"failed to verify that result type matches with rhs type");
382 return ::mlir::success();
389::mlir::ParseResult
AndFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
390 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
391 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
392 (void)lhsOperandsLoc;
393 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
394 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
395 (void)rhsOperandsLoc;
396 ::mlir::Type lhsRawType{};
397 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
398 ::mlir::Type rhsRawType{};
399 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
401 lhsOperandsLoc = parser.getCurrentLocation();
402 if (parser.parseOperand(lhsRawOperand))
403 return ::mlir::failure();
404 if (parser.parseComma())
405 return ::mlir::failure();
407 rhsOperandsLoc = parser.getCurrentLocation();
408 if (parser.parseOperand(rhsRawOperand))
409 return ::mlir::failure();
411 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
412 if (odsResult) return ::mlir::failure();
415 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
416 if (odsResult) return ::mlir::failure();
419 auto loc = parser.getCurrentLocation();(void)loc;
420 if (parser.parseOptionalAttrDict(result.attributes))
421 return ::mlir::failure();
423 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
424 return ::mlir::failure();
425 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
426 return ::mlir::failure();
428 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
430 result.location, result.operands,
431 result.attributes.getDictionary(parser.getContext()),
432 result.getRawProperties(),
433 result.regions, inferredReturnTypes)))
434 return ::mlir::failure();
435 result.addTypes(inferredReturnTypes);
436 return ::mlir::success();
445 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
446 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
447 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
448 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
451void AndFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
454 ::llvm::LogicalResult
456 std::optional<::mlir::Location> location,
457 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
458 ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions,
459 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
462 location, adaptor, inferredReturnTypes);
467 mlir::MLIRContext *context, std::optional<mlir::Location> loc, Adaptor adaptor,
468 llvm::SmallVectorImpl<mlir::Type> &inferred
471 auto value = adaptor.getLhs();
472 inferred[0] = value ? value.getType() :
FeltType::get(context, mlir::StringAttr());
473 return mlir::success();
495 return ::mlir::success();
498void DivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
499 odsState.addOperands(lhs);
500 odsState.addOperands(rhs);
501 odsState.addTypes(result);
504void DivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
505 odsState.addOperands(lhs);
506 odsState.addOperands(rhs);
508 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
510 odsState.location, odsState.operands,
511 odsState.attributes.getDictionary(odsState.getContext()),
512 odsState.getRawProperties(),
513 odsState.regions, inferredReturnTypes)))
514 odsState.addTypes(inferredReturnTypes);
516 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
520void DivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
521 odsState.addOperands(lhs);
522 odsState.addOperands(rhs);
523 assert(resultTypes.size() == 1u &&
"mismatched number of results");
524 odsState.addTypes(resultTypes);
527void DivFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
528 assert(operands.size() == 2u &&
"mismatched number of parameters");
529 odsState.addOperands(operands);
530 odsState.addAttributes(attributes);
531 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
532 odsState.addTypes(resultTypes);
535void DivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
536 assert(operands.size() == 2u &&
"mismatched number of parameters");
537 odsState.addOperands(operands);
538 odsState.addAttributes(attributes);
540 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
542 odsState.location, operands,
543 odsState.attributes.getDictionary(odsState.getContext()),
544 odsState.getRawProperties(),
545 odsState.regions, inferredReturnTypes))) {
546 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
547 odsState.addTypes(inferredReturnTypes);
549 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
555 unsigned index = 0; (void)index;
558 for (
auto v : valueGroup0) {
559 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
560 return ::mlir::failure();
564 for (
auto v : valueGroup1) {
565 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
566 return ::mlir::failure();
570 unsigned index = 0; (void)index;
573 for (
auto v : valueGroup0) {
574 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
575 return ::mlir::failure();
579 return emitOpError(
"failed to verify that rhs type matches with lhs type");
581 return emitOpError(
"failed to verify that result type matches with lhs type");
583 return emitOpError(
"failed to verify that result type matches with rhs type");
584 return ::mlir::success();
591::mlir::ParseResult
DivFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
592 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
593 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
594 (void)lhsOperandsLoc;
595 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
596 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
597 (void)rhsOperandsLoc;
598 ::mlir::Type lhsRawType{};
599 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
600 ::mlir::Type rhsRawType{};
601 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
603 lhsOperandsLoc = parser.getCurrentLocation();
604 if (parser.parseOperand(lhsRawOperand))
605 return ::mlir::failure();
606 if (parser.parseComma())
607 return ::mlir::failure();
609 rhsOperandsLoc = parser.getCurrentLocation();
610 if (parser.parseOperand(rhsRawOperand))
611 return ::mlir::failure();
613 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
614 if (odsResult) return ::mlir::failure();
617 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
618 if (odsResult) return ::mlir::failure();
621 auto loc = parser.getCurrentLocation();(void)loc;
622 if (parser.parseOptionalAttrDict(result.attributes))
623 return ::mlir::failure();
625 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
626 return ::mlir::failure();
627 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
628 return ::mlir::failure();
630 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
632 result.location, result.operands,
633 result.attributes.getDictionary(parser.getContext()),
634 result.getRawProperties(),
635 result.regions, inferredReturnTypes)))
636 return ::mlir::failure();
637 result.addTypes(inferredReturnTypes);
638 return ::mlir::success();
647 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
648 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
649 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
650 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
653void DivFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
656 ::llvm::LogicalResult
658 std::optional<::mlir::Location> location,
659 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
660 ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions,
661 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
664 location, adaptor, inferredReturnTypes);
669 mlir::MLIRContext *context, std::optional<mlir::Location> loc, Adaptor adaptor,
670 llvm::SmallVectorImpl<mlir::Type> &inferred
673 auto value = adaptor.getLhs();
674 inferred[0] = value ? value.getType() :
FeltType::get(context, mlir::StringAttr());
675 return mlir::success();
697 return ::llvm::cast<::llzk::felt::FeltConstAttr>(attr);
705 if (!tblgen_value)
return emitError(loc,
"'felt.const' op ""requires attribute 'value'");
707 if (tblgen_value && !((::llvm::isa<::llzk::felt::FeltConstAttr>(tblgen_value))))
708 return emitError(loc,
"'felt.const' op ""attribute 'value' failed to satisfy constraint: finite field element");
709 return ::mlir::success();
713 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
715 emitError() <<
"expected DictionaryAttr to set properties";
716 return ::mlir::failure();
720 auto &propStorage = prop.
value;
721 auto attr = dict.get(
"value");
723 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
725 propStorage = convertedAttr;
727 emitError() <<
"Invalid attribute `value` in property conversion: " << attr;
728 return ::mlir::failure();
732 return ::mlir::success();
736 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
737 ::mlir::Builder odsBuilder{ctx};
740 const auto &propStorage = prop.
value;
742 attrs.push_back(odsBuilder.getNamedAttr(
"value",
747 return odsBuilder.getDictionaryAttr(attrs);
752 return llvm::hash_combine(
753 llvm::hash_value(prop.
value.getAsOpaquePointer()));
763 if (name ==
"value") {
764 prop.
value = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
value)>>(value);
770 if (prop.
value) attrs.append(
"value", prop.
value);
776 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(attr,
"value", emitError)))
777 return ::mlir::failure();
779 return ::mlir::success();
783 auto &prop = state.getOrAddProperties<
Properties>(); (void)prop;
784 if (::mlir::failed(reader.readAttribute(prop.
value)))
785 return ::mlir::failure();
786 return ::mlir::success();
790 auto &prop = getProperties(); (void)prop;
791 writer.writeAttribute(prop.
value);
796 return ::llvm::cast<::llzk::felt::FeltConstAttr>(attr);
799void FeltConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::felt::FeltConstAttr value) {
800 odsState.getOrAddProperties<
Properties>().value = value;
801 odsState.addTypes(result);
804void FeltConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::felt::FeltConstAttr value) {
805 odsState.getOrAddProperties<
Properties>().value = value;
807 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
809 odsState.location, odsState.operands,
810 odsState.attributes.getDictionary(odsState.getContext()),
811 odsState.getRawProperties(),
812 odsState.regions, inferredReturnTypes)))
813 odsState.addTypes(inferredReturnTypes);
815 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
819void FeltConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llzk::felt::FeltConstAttr value) {
820 odsState.getOrAddProperties<
Properties>().value = value;
821 assert(resultTypes.size() == 1u &&
"mismatched number of results");
822 odsState.addTypes(resultTypes);
825void FeltConstantOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
826 assert(operands.size() == 0u &&
"mismatched number of parameters");
827 odsState.addOperands(operands);
828 odsState.addAttributes(attributes);
829 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
830 odsState.addTypes(resultTypes);
832 if (!attributes.empty()) {
833 ::mlir::OpaqueProperties properties =
835 std::optional<::mlir::RegisteredOperationName> info =
836 odsState.name.getRegisteredInfo();
837 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
838 odsState.attributes.getDictionary(odsState.getContext()),
nullptr)))
839 ::llvm::report_fatal_error(
"Property conversion failed.");
843void FeltConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
844 assert(operands.size() == 0u &&
"mismatched number of parameters");
845 odsState.addOperands(operands);
846 odsState.addAttributes(attributes);
848 if (!attributes.empty()) {
849 ::mlir::OpaqueProperties properties =
851 std::optional<::mlir::RegisteredOperationName> info =
852 odsState.name.getRegisteredInfo();
853 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
854 odsState.attributes.getDictionary(odsState.getContext()),
nullptr)))
855 ::llvm::report_fatal_error(
"Property conversion failed.");
857 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
859 odsState.location, operands,
860 odsState.attributes.getDictionary(odsState.getContext()),
861 odsState.getRawProperties(),
862 odsState.regions, inferredReturnTypes))) {
863 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
864 odsState.addTypes(inferredReturnTypes);
866 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
871 auto tblgen_value = getProperties().value; (void)tblgen_value;
872 if (!tblgen_value)
return emitOpError(
"requires attribute 'value'");
874 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(*
this, tblgen_value,
"value")))
875 return ::mlir::failure();
877 unsigned index = 0; (void)index;
880 for (
auto v : valueGroup0) {
881 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
882 return ::mlir::failure();
886 return emitOpError(
"failed to verify that result type matches with value type");
887 return ::mlir::success();
895 ::llzk::felt::FeltConstAttr valueAttr;
897 if (parser.parseCustomAttributeWithFallback(valueAttr, ::mlir::Type{})) {
898 return ::mlir::failure();
902 auto loc = parser.getCurrentLocation();(void)loc;
903 if (parser.parseOptionalAttrDict(result.attributes))
904 return ::mlir::failure();
906 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
908 return ::mlir::failure();
911 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
913 result.location, result.operands,
914 result.attributes.getDictionary(parser.getContext()),
915 result.getRawProperties(),
916 result.regions, inferredReturnTypes)))
917 return ::mlir::failure();
918 result.addTypes(inferredReturnTypes);
919 return ::mlir::success();
925 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
926 elidedAttrs.push_back(
"value");
927 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
935 std::optional<::mlir::Location> location,
936 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
937 ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions,
938 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
941 location, adaptor, inferredReturnTypes);
960 return ::mlir::success();
963void InvFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value operand) {
964 odsState.addOperands(operand);
965 odsState.addTypes(result);
968void InvFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value operand) {
969 odsState.addOperands(operand);
971 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
973 odsState.location, odsState.operands,
974 odsState.attributes.getDictionary(odsState.getContext()),
975 odsState.getRawProperties(),
976 odsState.regions, inferredReturnTypes)))
977 odsState.addTypes(inferredReturnTypes);
979 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
983void InvFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value operand) {
984 odsState.addOperands(operand);
985 assert(resultTypes.size() == 1u &&
"mismatched number of results");
986 odsState.addTypes(resultTypes);
989void InvFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
990 assert(operands.size() == 1u &&
"mismatched number of parameters");
991 odsState.addOperands(operands);
992 odsState.addAttributes(attributes);
993 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
994 odsState.addTypes(resultTypes);
997void InvFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
998 assert(operands.size() == 1u &&
"mismatched number of parameters");
999 odsState.addOperands(operands);
1000 odsState.addAttributes(attributes);
1002 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1004 odsState.location, operands,
1005 odsState.attributes.getDictionary(odsState.getContext()),
1006 odsState.getRawProperties(),
1007 odsState.regions, inferredReturnTypes))) {
1008 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
1009 odsState.addTypes(inferredReturnTypes);
1011 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
1017 unsigned index = 0; (void)index;
1020 for (
auto v : valueGroup0) {
1021 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
1022 return ::mlir::failure();
1026 unsigned index = 0; (void)index;
1029 for (
auto v : valueGroup0) {
1030 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
1031 return ::mlir::failure();
1035 return emitOpError(
"failed to verify that result type matches with operand type");
1036 return ::mlir::success();
1043::mlir::ParseResult
InvFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1044 ::mlir::OpAsmParser::UnresolvedOperand operandRawOperand{};
1045 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> operandOperands(&operandRawOperand, 1); ::llvm::SMLoc operandOperandsLoc;
1046 (void)operandOperandsLoc;
1047 ::mlir::Type operandRawType{};
1048 ::llvm::ArrayRef<::mlir::Type> operandTypes(&operandRawType, 1);
1050 operandOperandsLoc = parser.getCurrentLocation();
1051 if (parser.parseOperand(operandRawOperand))
1052 return ::mlir::failure();
1054 auto odsResult = parseInferredOrParsedType(parser, operandRawType,
true);
1055 if (odsResult) return ::mlir::failure();
1058 auto loc = parser.getCurrentLocation();(void)loc;
1059 if (parser.parseOptionalAttrDict(result.attributes))
1060 return ::mlir::failure();
1062 if (parser.resolveOperands(operandOperands, operandTypes, operandOperandsLoc, result.operands))
1063 return ::mlir::failure();
1065 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
1067 result.location, result.operands,
1068 result.attributes.getDictionary(parser.getContext()),
1069 result.getRawProperties(),
1070 result.regions, inferredReturnTypes)))
1071 return ::mlir::failure();
1072 result.addTypes(inferredReturnTypes);
1073 return ::mlir::success();
1079 printInferredOrParsedType(_odsPrinter, *
this,
getOperand().getType(),
true);
1080 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1081 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1084void InvFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1087 ::llvm::LogicalResult
1089 std::optional<::mlir::Location> location,
1090 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
1091 ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions,
1092 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
1095 location, adaptor, inferredReturnTypes);
1100 mlir::MLIRContext *context, std::optional<mlir::Location> loc, Adaptor adaptor,
1101 llvm::SmallVectorImpl<mlir::Type> &inferred
1104 auto value = adaptor.getOperand();
1105 inferred[0] = value ? value.getType() :
FeltType::get(context, mlir::StringAttr());
1106 return mlir::success();
1128 return ::mlir::success();
1131void MulFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
1132 odsState.addOperands(lhs);
1133 odsState.addOperands(rhs);
1134 odsState.addTypes(result);
1137void MulFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
1138 odsState.addOperands(lhs);
1139 odsState.addOperands(rhs);
1141 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1143 odsState.location, odsState.operands,
1144 odsState.attributes.getDictionary(odsState.getContext()),
1145 odsState.getRawProperties(),
1146 odsState.regions, inferredReturnTypes)))
1147 odsState.addTypes(inferredReturnTypes);
1149 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1153void MulFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
1154 odsState.addOperands(lhs);
1155 odsState.addOperands(rhs);
1156 assert(resultTypes.size() == 1u &&
"mismatched number of results");
1157 odsState.addTypes(resultTypes);
1160void MulFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1161 assert(operands.size() == 2u &&
"mismatched number of parameters");
1162 odsState.addOperands(operands);
1163 odsState.addAttributes(attributes);
1164 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
1165 odsState.addTypes(resultTypes);
1168void MulFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1169 assert(operands.size() == 2u &&
"mismatched number of parameters");
1170 odsState.addOperands(operands);
1171 odsState.addAttributes(attributes);
1173 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1175 odsState.location, operands,
1176 odsState.attributes.getDictionary(odsState.getContext()),
1177 odsState.getRawProperties(),
1178 odsState.regions, inferredReturnTypes))) {
1179 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
1180 odsState.addTypes(inferredReturnTypes);
1182 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
1188 unsigned index = 0; (void)index;
1191 for (
auto v : valueGroup0) {
1192 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
1193 return ::mlir::failure();
1197 for (
auto v : valueGroup1) {
1198 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
1199 return ::mlir::failure();
1203 unsigned index = 0; (void)index;
1206 for (
auto v : valueGroup0) {
1207 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
1208 return ::mlir::failure();
1212 return emitOpError(
"failed to verify that rhs type matches with lhs type");
1214 return emitOpError(
"failed to verify that result type matches with lhs type");
1216 return emitOpError(
"failed to verify that result type matches with rhs type");
1217 return ::mlir::success();
1224::mlir::ParseResult
MulFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1225 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
1226 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
1227 (void)lhsOperandsLoc;
1228 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
1229 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
1230 (void)rhsOperandsLoc;
1231 ::mlir::Type lhsRawType{};
1232 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
1233 ::mlir::Type rhsRawType{};
1234 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
1236 lhsOperandsLoc = parser.getCurrentLocation();
1237 if (parser.parseOperand(lhsRawOperand))
1238 return ::mlir::failure();
1239 if (parser.parseComma())
1240 return ::mlir::failure();
1242 rhsOperandsLoc = parser.getCurrentLocation();
1243 if (parser.parseOperand(rhsRawOperand))
1244 return ::mlir::failure();
1246 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
1247 if (odsResult) return ::mlir::failure();
1250 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
1251 if (odsResult) return ::mlir::failure();
1254 auto loc = parser.getCurrentLocation();(void)loc;
1255 if (parser.parseOptionalAttrDict(result.attributes))
1256 return ::mlir::failure();
1258 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
1259 return ::mlir::failure();
1260 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
1261 return ::mlir::failure();
1263 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
1265 result.location, result.operands,
1266 result.attributes.getDictionary(parser.getContext()),
1267 result.getRawProperties(),
1268 result.regions, inferredReturnTypes)))
1269 return ::mlir::failure();
1270 result.addTypes(inferredReturnTypes);
1271 return ::mlir::success();
1280 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
1281 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
1282 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1283 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1286void MulFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1289 ::llvm::LogicalResult
1291 std::optional<::mlir::Location> location,
1292 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
1293 ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions,
1294 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
1297 location, adaptor, inferredReturnTypes);
1302 mlir::MLIRContext *context, std::optional<mlir::Location> loc, Adaptor adaptor,
1303 llvm::SmallVectorImpl<mlir::Type> &inferred
1306 auto value = adaptor.getLhs();
1307 inferred[0] = value ? value.getType() :
FeltType::get(context, mlir::StringAttr());
1308 return mlir::success();
1330 return ::mlir::success();
1333void NegFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value operand) {
1334 odsState.addOperands(operand);
1335 odsState.addTypes(result);
1338void NegFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value operand) {
1339 odsState.addOperands(operand);
1341 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1343 odsState.location, odsState.operands,
1344 odsState.attributes.getDictionary(odsState.getContext()),
1345 odsState.getRawProperties(),
1346 odsState.regions, inferredReturnTypes)))
1347 odsState.addTypes(inferredReturnTypes);
1349 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1353void NegFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value operand) {
1354 odsState.addOperands(operand);
1355 assert(resultTypes.size() == 1u &&
"mismatched number of results");
1356 odsState.addTypes(resultTypes);
1359void NegFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1360 assert(operands.size() == 1u &&
"mismatched number of parameters");
1361 odsState.addOperands(operands);
1362 odsState.addAttributes(attributes);
1363 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
1364 odsState.addTypes(resultTypes);
1367void NegFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1368 assert(operands.size() == 1u &&
"mismatched number of parameters");
1369 odsState.addOperands(operands);
1370 odsState.addAttributes(attributes);
1372 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1374 odsState.location, operands,
1375 odsState.attributes.getDictionary(odsState.getContext()),
1376 odsState.getRawProperties(),
1377 odsState.regions, inferredReturnTypes))) {
1378 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
1379 odsState.addTypes(inferredReturnTypes);
1381 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
1387 unsigned index = 0; (void)index;
1390 for (
auto v : valueGroup0) {
1391 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
1392 return ::mlir::failure();
1396 unsigned index = 0; (void)index;
1399 for (
auto v : valueGroup0) {
1400 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
1401 return ::mlir::failure();
1405 return emitOpError(
"failed to verify that result type matches with operand type");
1406 return ::mlir::success();
1413::mlir::ParseResult
NegFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1414 ::mlir::OpAsmParser::UnresolvedOperand operandRawOperand{};
1415 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> operandOperands(&operandRawOperand, 1); ::llvm::SMLoc operandOperandsLoc;
1416 (void)operandOperandsLoc;
1417 ::mlir::Type operandRawType{};
1418 ::llvm::ArrayRef<::mlir::Type> operandTypes(&operandRawType, 1);
1420 operandOperandsLoc = parser.getCurrentLocation();
1421 if (parser.parseOperand(operandRawOperand))
1422 return ::mlir::failure();
1424 auto odsResult = parseInferredOrParsedType(parser, operandRawType,
true);
1425 if (odsResult) return ::mlir::failure();
1428 auto loc = parser.getCurrentLocation();(void)loc;
1429 if (parser.parseOptionalAttrDict(result.attributes))
1430 return ::mlir::failure();
1432 if (parser.resolveOperands(operandOperands, operandTypes, operandOperandsLoc, result.operands))
1433 return ::mlir::failure();
1435 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
1437 result.location, result.operands,
1438 result.attributes.getDictionary(parser.getContext()),
1439 result.getRawProperties(),
1440 result.regions, inferredReturnTypes)))
1441 return ::mlir::failure();
1442 result.addTypes(inferredReturnTypes);
1443 return ::mlir::success();
1449 printInferredOrParsedType(_odsPrinter, *
this,
getOperand().getType(),
true);
1450 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1451 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1454void NegFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1457 ::llvm::LogicalResult
1459 std::optional<::mlir::Location> location,
1460 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
1461 ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions,
1462 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
1465 location, adaptor, inferredReturnTypes);
1470 mlir::MLIRContext *context, std::optional<mlir::Location> loc, Adaptor adaptor,
1471 llvm::SmallVectorImpl<mlir::Type> &inferred
1474 auto value = adaptor.getOperand();
1475 inferred[0] = value ? value.getType() :
FeltType::get(context, mlir::StringAttr());
1476 return mlir::success();
1498 return ::mlir::success();
1501void NotFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value operand) {
1502 odsState.addOperands(operand);
1503 odsState.addTypes(result);
1506void NotFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value operand) {
1507 odsState.addOperands(operand);
1509 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1511 odsState.location, odsState.operands,
1512 odsState.attributes.getDictionary(odsState.getContext()),
1513 odsState.getRawProperties(),
1514 odsState.regions, inferredReturnTypes)))
1515 odsState.addTypes(inferredReturnTypes);
1517 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1521void NotFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value operand) {
1522 odsState.addOperands(operand);
1523 assert(resultTypes.size() == 1u &&
"mismatched number of results");
1524 odsState.addTypes(resultTypes);
1527void NotFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1528 assert(operands.size() == 1u &&
"mismatched number of parameters");
1529 odsState.addOperands(operands);
1530 odsState.addAttributes(attributes);
1531 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
1532 odsState.addTypes(resultTypes);
1535void NotFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1536 assert(operands.size() == 1u &&
"mismatched number of parameters");
1537 odsState.addOperands(operands);
1538 odsState.addAttributes(attributes);
1540 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1542 odsState.location, operands,
1543 odsState.attributes.getDictionary(odsState.getContext()),
1544 odsState.getRawProperties(),
1545 odsState.regions, inferredReturnTypes))) {
1546 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
1547 odsState.addTypes(inferredReturnTypes);
1549 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
1555 unsigned index = 0; (void)index;
1558 for (
auto v : valueGroup0) {
1559 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
1560 return ::mlir::failure();
1564 unsigned index = 0; (void)index;
1567 for (
auto v : valueGroup0) {
1568 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
1569 return ::mlir::failure();
1573 return emitOpError(
"failed to verify that result type matches with operand type");
1574 return ::mlir::success();
1581::mlir::ParseResult
NotFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1582 ::mlir::OpAsmParser::UnresolvedOperand operandRawOperand{};
1583 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> operandOperands(&operandRawOperand, 1); ::llvm::SMLoc operandOperandsLoc;
1584 (void)operandOperandsLoc;
1585 ::mlir::Type operandRawType{};
1586 ::llvm::ArrayRef<::mlir::Type> operandTypes(&operandRawType, 1);
1588 operandOperandsLoc = parser.getCurrentLocation();
1589 if (parser.parseOperand(operandRawOperand))
1590 return ::mlir::failure();
1592 auto odsResult = parseInferredOrParsedType(parser, operandRawType,
true);
1593 if (odsResult) return ::mlir::failure();
1596 auto loc = parser.getCurrentLocation();(void)loc;
1597 if (parser.parseOptionalAttrDict(result.attributes))
1598 return ::mlir::failure();
1600 if (parser.resolveOperands(operandOperands, operandTypes, operandOperandsLoc, result.operands))
1601 return ::mlir::failure();
1603 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
1605 result.location, result.operands,
1606 result.attributes.getDictionary(parser.getContext()),
1607 result.getRawProperties(),
1608 result.regions, inferredReturnTypes)))
1609 return ::mlir::failure();
1610 result.addTypes(inferredReturnTypes);
1611 return ::mlir::success();
1617 printInferredOrParsedType(_odsPrinter, *
this,
getOperand().getType(),
true);
1618 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1619 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1622void NotFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1625 ::llvm::LogicalResult
1627 std::optional<::mlir::Location> location,
1628 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
1629 ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions,
1630 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
1633 location, adaptor, inferredReturnTypes);
1638 mlir::MLIRContext *context, std::optional<mlir::Location> loc, Adaptor adaptor,
1639 llvm::SmallVectorImpl<mlir::Type> &inferred
1642 auto value = adaptor.getOperand();
1643 inferred[0] = value ? value.getType() :
FeltType::get(context, mlir::StringAttr());
1644 return mlir::success();
1666 return ::mlir::success();
1669void OrFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
1670 odsState.addOperands(lhs);
1671 odsState.addOperands(rhs);
1672 odsState.addTypes(result);
1675void OrFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
1676 odsState.addOperands(lhs);
1677 odsState.addOperands(rhs);
1679 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1681 odsState.location, odsState.operands,
1682 odsState.attributes.getDictionary(odsState.getContext()),
1683 odsState.getRawProperties(),
1684 odsState.regions, inferredReturnTypes)))
1685 odsState.addTypes(inferredReturnTypes);
1687 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1691void OrFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
1692 odsState.addOperands(lhs);
1693 odsState.addOperands(rhs);
1694 assert(resultTypes.size() == 1u &&
"mismatched number of results");
1695 odsState.addTypes(resultTypes);
1698void OrFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1699 assert(operands.size() == 2u &&
"mismatched number of parameters");
1700 odsState.addOperands(operands);
1701 odsState.addAttributes(attributes);
1702 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
1703 odsState.addTypes(resultTypes);
1706void OrFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1707 assert(operands.size() == 2u &&
"mismatched number of parameters");
1708 odsState.addOperands(operands);
1709 odsState.addAttributes(attributes);
1711 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1713 odsState.location, operands,
1714 odsState.attributes.getDictionary(odsState.getContext()),
1715 odsState.getRawProperties(),
1716 odsState.regions, inferredReturnTypes))) {
1717 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
1718 odsState.addTypes(inferredReturnTypes);
1720 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
1726 unsigned index = 0; (void)index;
1729 for (
auto v : valueGroup0) {
1730 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
1731 return ::mlir::failure();
1735 for (
auto v : valueGroup1) {
1736 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
1737 return ::mlir::failure();
1741 unsigned index = 0; (void)index;
1744 for (
auto v : valueGroup0) {
1745 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
1746 return ::mlir::failure();
1750 return emitOpError(
"failed to verify that rhs type matches with lhs type");
1752 return emitOpError(
"failed to verify that result type matches with lhs type");
1754 return emitOpError(
"failed to verify that result type matches with rhs type");
1755 return ::mlir::success();
1762::mlir::ParseResult
OrFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1763 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
1764 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
1765 (void)lhsOperandsLoc;
1766 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
1767 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
1768 (void)rhsOperandsLoc;
1769 ::mlir::Type lhsRawType{};
1770 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
1771 ::mlir::Type rhsRawType{};
1772 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
1774 lhsOperandsLoc = parser.getCurrentLocation();
1775 if (parser.parseOperand(lhsRawOperand))
1776 return ::mlir::failure();
1777 if (parser.parseComma())
1778 return ::mlir::failure();
1780 rhsOperandsLoc = parser.getCurrentLocation();
1781 if (parser.parseOperand(rhsRawOperand))
1782 return ::mlir::failure();
1784 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
1785 if (odsResult) return ::mlir::failure();
1788 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
1789 if (odsResult) return ::mlir::failure();
1792 auto loc = parser.getCurrentLocation();(void)loc;
1793 if (parser.parseOptionalAttrDict(result.attributes))
1794 return ::mlir::failure();
1796 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
1797 return ::mlir::failure();
1798 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
1799 return ::mlir::failure();
1801 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
1803 result.location, result.operands,
1804 result.attributes.getDictionary(parser.getContext()),
1805 result.getRawProperties(),
1806 result.regions, inferredReturnTypes)))
1807 return ::mlir::failure();
1808 result.addTypes(inferredReturnTypes);
1809 return ::mlir::success();
1818 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
1819 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
1820 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1821 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1824void OrFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1827 ::llvm::LogicalResult
1829 std::optional<::mlir::Location> location,
1830 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
1831 ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions,
1832 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
1835 location, adaptor, inferredReturnTypes);
1840 mlir::MLIRContext *context, std::optional<mlir::Location> loc, Adaptor adaptor,
1841 llvm::SmallVectorImpl<mlir::Type> &inferred
1844 auto value = adaptor.getLhs();
1845 inferred[0] = value ? value.getType() :
FeltType::get(context, mlir::StringAttr());
1846 return mlir::success();
1868 return ::mlir::success();
1871void PowFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
1872 odsState.addOperands(lhs);
1873 odsState.addOperands(rhs);
1874 odsState.addTypes(result);
1877void PowFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
1878 odsState.addOperands(lhs);
1879 odsState.addOperands(rhs);
1881 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1883 odsState.location, odsState.operands,
1884 odsState.attributes.getDictionary(odsState.getContext()),
1885 odsState.getRawProperties(),
1886 odsState.regions, inferredReturnTypes)))
1887 odsState.addTypes(inferredReturnTypes);
1889 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1893void PowFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
1894 odsState.addOperands(lhs);
1895 odsState.addOperands(rhs);
1896 assert(resultTypes.size() == 1u &&
"mismatched number of results");
1897 odsState.addTypes(resultTypes);
1900void PowFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1901 assert(operands.size() == 2u &&
"mismatched number of parameters");
1902 odsState.addOperands(operands);
1903 odsState.addAttributes(attributes);
1904 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
1905 odsState.addTypes(resultTypes);
1908void PowFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1909 assert(operands.size() == 2u &&
"mismatched number of parameters");
1910 odsState.addOperands(operands);
1911 odsState.addAttributes(attributes);
1913 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1915 odsState.location, operands,
1916 odsState.attributes.getDictionary(odsState.getContext()),
1917 odsState.getRawProperties(),
1918 odsState.regions, inferredReturnTypes))) {
1919 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
1920 odsState.addTypes(inferredReturnTypes);
1922 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
1928 unsigned index = 0; (void)index;
1931 for (
auto v : valueGroup0) {
1932 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
1933 return ::mlir::failure();
1937 for (
auto v : valueGroup1) {
1938 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
1939 return ::mlir::failure();
1943 unsigned index = 0; (void)index;
1946 for (
auto v : valueGroup0) {
1947 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
1948 return ::mlir::failure();
1952 return emitOpError(
"failed to verify that rhs type matches with lhs type");
1954 return emitOpError(
"failed to verify that result type matches with lhs type");
1956 return emitOpError(
"failed to verify that result type matches with rhs type");
1957 return ::mlir::success();
1964::mlir::ParseResult
PowFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1965 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
1966 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
1967 (void)lhsOperandsLoc;
1968 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
1969 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
1970 (void)rhsOperandsLoc;
1971 ::mlir::Type lhsRawType{};
1972 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
1973 ::mlir::Type rhsRawType{};
1974 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
1976 lhsOperandsLoc = parser.getCurrentLocation();
1977 if (parser.parseOperand(lhsRawOperand))
1978 return ::mlir::failure();
1979 if (parser.parseComma())
1980 return ::mlir::failure();
1982 rhsOperandsLoc = parser.getCurrentLocation();
1983 if (parser.parseOperand(rhsRawOperand))
1984 return ::mlir::failure();
1986 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
1987 if (odsResult) return ::mlir::failure();
1990 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
1991 if (odsResult) return ::mlir::failure();
1994 auto loc = parser.getCurrentLocation();(void)loc;
1995 if (parser.parseOptionalAttrDict(result.attributes))
1996 return ::mlir::failure();
1998 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
1999 return ::mlir::failure();
2000 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
2001 return ::mlir::failure();
2003 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
2005 result.location, result.operands,
2006 result.attributes.getDictionary(parser.getContext()),
2007 result.getRawProperties(),
2008 result.regions, inferredReturnTypes)))
2009 return ::mlir::failure();
2010 result.addTypes(inferredReturnTypes);
2011 return ::mlir::success();
2020 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
2021 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
2022 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2023 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2026void PowFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
2029 ::llvm::LogicalResult
2031 std::optional<::mlir::Location> location,
2032 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
2033 ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions,
2034 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
2037 location, adaptor, inferredReturnTypes);
2042 mlir::MLIRContext *context, std::optional<mlir::Location> loc, Adaptor adaptor,
2043 llvm::SmallVectorImpl<mlir::Type> &inferred
2046 auto value = adaptor.getLhs();
2047 inferred[0] = value ? value.getType() :
FeltType::get(context, mlir::StringAttr());
2048 return mlir::success();
2070 return ::mlir::success();
2073void ShlFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
2074 odsState.addOperands(lhs);
2075 odsState.addOperands(rhs);
2076 odsState.addTypes(result);
2079void ShlFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
2080 odsState.addOperands(lhs);
2081 odsState.addOperands(rhs);
2083 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2085 odsState.location, odsState.operands,
2086 odsState.attributes.getDictionary(odsState.getContext()),
2087 odsState.getRawProperties(),
2088 odsState.regions, inferredReturnTypes)))
2089 odsState.addTypes(inferredReturnTypes);
2091 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
2095void ShlFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
2096 odsState.addOperands(lhs);
2097 odsState.addOperands(rhs);
2098 assert(resultTypes.size() == 1u &&
"mismatched number of results");
2099 odsState.addTypes(resultTypes);
2102void ShlFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2103 assert(operands.size() == 2u &&
"mismatched number of parameters");
2104 odsState.addOperands(operands);
2105 odsState.addAttributes(attributes);
2106 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
2107 odsState.addTypes(resultTypes);
2110void ShlFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2111 assert(operands.size() == 2u &&
"mismatched number of parameters");
2112 odsState.addOperands(operands);
2113 odsState.addAttributes(attributes);
2115 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2117 odsState.location, operands,
2118 odsState.attributes.getDictionary(odsState.getContext()),
2119 odsState.getRawProperties(),
2120 odsState.regions, inferredReturnTypes))) {
2121 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
2122 odsState.addTypes(inferredReturnTypes);
2124 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
2130 unsigned index = 0; (void)index;
2133 for (
auto v : valueGroup0) {
2134 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
2135 return ::mlir::failure();
2139 for (
auto v : valueGroup1) {
2140 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
2141 return ::mlir::failure();
2145 unsigned index = 0; (void)index;
2148 for (
auto v : valueGroup0) {
2149 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
2150 return ::mlir::failure();
2154 return emitOpError(
"failed to verify that rhs type matches with lhs type");
2156 return emitOpError(
"failed to verify that result type matches with lhs type");
2158 return emitOpError(
"failed to verify that result type matches with rhs type");
2159 return ::mlir::success();
2166::mlir::ParseResult
ShlFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2167 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
2168 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
2169 (void)lhsOperandsLoc;
2170 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
2171 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
2172 (void)rhsOperandsLoc;
2173 ::mlir::Type lhsRawType{};
2174 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
2175 ::mlir::Type rhsRawType{};
2176 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
2178 lhsOperandsLoc = parser.getCurrentLocation();
2179 if (parser.parseOperand(lhsRawOperand))
2180 return ::mlir::failure();
2181 if (parser.parseComma())
2182 return ::mlir::failure();
2184 rhsOperandsLoc = parser.getCurrentLocation();
2185 if (parser.parseOperand(rhsRawOperand))
2186 return ::mlir::failure();
2188 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
2189 if (odsResult) return ::mlir::failure();
2192 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
2193 if (odsResult) return ::mlir::failure();
2196 auto loc = parser.getCurrentLocation();(void)loc;
2197 if (parser.parseOptionalAttrDict(result.attributes))
2198 return ::mlir::failure();
2200 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
2201 return ::mlir::failure();
2202 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
2203 return ::mlir::failure();
2205 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
2207 result.location, result.operands,
2208 result.attributes.getDictionary(parser.getContext()),
2209 result.getRawProperties(),
2210 result.regions, inferredReturnTypes)))
2211 return ::mlir::failure();
2212 result.addTypes(inferredReturnTypes);
2213 return ::mlir::success();
2222 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
2223 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
2224 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2225 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2228void ShlFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
2231 ::llvm::LogicalResult
2233 std::optional<::mlir::Location> location,
2234 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
2235 ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions,
2236 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
2239 location, adaptor, inferredReturnTypes);
2244 mlir::MLIRContext *context, std::optional<mlir::Location> loc, Adaptor adaptor,
2245 llvm::SmallVectorImpl<mlir::Type> &inferred
2248 auto value = adaptor.getLhs();
2249 inferred[0] = value ? value.getType() :
FeltType::get(context, mlir::StringAttr());
2250 return mlir::success();
2272 return ::mlir::success();
2275void ShrFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
2276 odsState.addOperands(lhs);
2277 odsState.addOperands(rhs);
2278 odsState.addTypes(result);
2281void ShrFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
2282 odsState.addOperands(lhs);
2283 odsState.addOperands(rhs);
2285 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2287 odsState.location, odsState.operands,
2288 odsState.attributes.getDictionary(odsState.getContext()),
2289 odsState.getRawProperties(),
2290 odsState.regions, inferredReturnTypes)))
2291 odsState.addTypes(inferredReturnTypes);
2293 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
2297void ShrFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
2298 odsState.addOperands(lhs);
2299 odsState.addOperands(rhs);
2300 assert(resultTypes.size() == 1u &&
"mismatched number of results");
2301 odsState.addTypes(resultTypes);
2304void ShrFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2305 assert(operands.size() == 2u &&
"mismatched number of parameters");
2306 odsState.addOperands(operands);
2307 odsState.addAttributes(attributes);
2308 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
2309 odsState.addTypes(resultTypes);
2312void ShrFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2313 assert(operands.size() == 2u &&
"mismatched number of parameters");
2314 odsState.addOperands(operands);
2315 odsState.addAttributes(attributes);
2317 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2319 odsState.location, operands,
2320 odsState.attributes.getDictionary(odsState.getContext()),
2321 odsState.getRawProperties(),
2322 odsState.regions, inferredReturnTypes))) {
2323 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
2324 odsState.addTypes(inferredReturnTypes);
2326 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
2332 unsigned index = 0; (void)index;
2335 for (
auto v : valueGroup0) {
2336 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
2337 return ::mlir::failure();
2341 for (
auto v : valueGroup1) {
2342 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
2343 return ::mlir::failure();
2347 unsigned index = 0; (void)index;
2350 for (
auto v : valueGroup0) {
2351 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
2352 return ::mlir::failure();
2356 return emitOpError(
"failed to verify that rhs type matches with lhs type");
2358 return emitOpError(
"failed to verify that result type matches with lhs type");
2360 return emitOpError(
"failed to verify that result type matches with rhs type");
2361 return ::mlir::success();
2368::mlir::ParseResult
ShrFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2369 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
2370 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
2371 (void)lhsOperandsLoc;
2372 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
2373 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
2374 (void)rhsOperandsLoc;
2375 ::mlir::Type lhsRawType{};
2376 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
2377 ::mlir::Type rhsRawType{};
2378 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
2380 lhsOperandsLoc = parser.getCurrentLocation();
2381 if (parser.parseOperand(lhsRawOperand))
2382 return ::mlir::failure();
2383 if (parser.parseComma())
2384 return ::mlir::failure();
2386 rhsOperandsLoc = parser.getCurrentLocation();
2387 if (parser.parseOperand(rhsRawOperand))
2388 return ::mlir::failure();
2390 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
2391 if (odsResult) return ::mlir::failure();
2394 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
2395 if (odsResult) return ::mlir::failure();
2398 auto loc = parser.getCurrentLocation();(void)loc;
2399 if (parser.parseOptionalAttrDict(result.attributes))
2400 return ::mlir::failure();
2402 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
2403 return ::mlir::failure();
2404 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
2405 return ::mlir::failure();
2407 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
2409 result.location, result.operands,
2410 result.attributes.getDictionary(parser.getContext()),
2411 result.getRawProperties(),
2412 result.regions, inferredReturnTypes)))
2413 return ::mlir::failure();
2414 result.addTypes(inferredReturnTypes);
2415 return ::mlir::success();
2424 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
2425 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
2426 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2427 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2430void ShrFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
2433 ::llvm::LogicalResult
2435 std::optional<::mlir::Location> location,
2436 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
2437 ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions,
2438 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
2441 location, adaptor, inferredReturnTypes);
2446 mlir::MLIRContext *context, std::optional<mlir::Location> loc, Adaptor adaptor,
2447 llvm::SmallVectorImpl<mlir::Type> &inferred
2450 auto value = adaptor.getLhs();
2451 inferred[0] = value ? value.getType() :
FeltType::get(context, mlir::StringAttr());
2452 return mlir::success();
2474 return ::mlir::success();
2477void SignedIntDivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
2478 odsState.addOperands(lhs);
2479 odsState.addOperands(rhs);
2480 odsState.addTypes(result);
2484 odsState.addOperands(lhs);
2485 odsState.addOperands(rhs);
2487 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2489 odsState.location, odsState.operands,
2490 odsState.attributes.getDictionary(odsState.getContext()),
2491 odsState.getRawProperties(),
2492 odsState.regions, inferredReturnTypes)))
2493 odsState.addTypes(inferredReturnTypes);
2495 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
2499void SignedIntDivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
2500 odsState.addOperands(lhs);
2501 odsState.addOperands(rhs);
2502 assert(resultTypes.size() == 1u &&
"mismatched number of results");
2503 odsState.addTypes(resultTypes);
2506void SignedIntDivFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2507 assert(operands.size() == 2u &&
"mismatched number of parameters");
2508 odsState.addOperands(operands);
2509 odsState.addAttributes(attributes);
2510 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
2511 odsState.addTypes(resultTypes);
2514void SignedIntDivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2515 assert(operands.size() == 2u &&
"mismatched number of parameters");
2516 odsState.addOperands(operands);
2517 odsState.addAttributes(attributes);
2519 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2521 odsState.location, operands,
2522 odsState.attributes.getDictionary(odsState.getContext()),
2523 odsState.getRawProperties(),
2524 odsState.regions, inferredReturnTypes))) {
2525 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
2526 odsState.addTypes(inferredReturnTypes);
2528 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
2534 unsigned index = 0; (void)index;
2537 for (
auto v : valueGroup0) {
2538 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
2539 return ::mlir::failure();
2543 for (
auto v : valueGroup1) {
2544 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
2545 return ::mlir::failure();
2549 unsigned index = 0; (void)index;
2552 for (
auto v : valueGroup0) {
2553 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
2554 return ::mlir::failure();
2558 return emitOpError(
"failed to verify that rhs type matches with lhs type");
2560 return emitOpError(
"failed to verify that result type matches with lhs type");
2562 return emitOpError(
"failed to verify that result type matches with rhs type");
2563 return ::mlir::success();
2571 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
2572 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
2573 (void)lhsOperandsLoc;
2574 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
2575 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
2576 (void)rhsOperandsLoc;
2577 ::mlir::Type lhsRawType{};
2578 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
2579 ::mlir::Type rhsRawType{};
2580 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
2582 lhsOperandsLoc = parser.getCurrentLocation();
2583 if (parser.parseOperand(lhsRawOperand))
2584 return ::mlir::failure();
2585 if (parser.parseComma())
2586 return ::mlir::failure();
2588 rhsOperandsLoc = parser.getCurrentLocation();
2589 if (parser.parseOperand(rhsRawOperand))
2590 return ::mlir::failure();
2592 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
2593 if (odsResult) return ::mlir::failure();
2596 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
2597 if (odsResult) return ::mlir::failure();
2600 auto loc = parser.getCurrentLocation();(void)loc;
2601 if (parser.parseOptionalAttrDict(result.attributes))
2602 return ::mlir::failure();
2604 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
2605 return ::mlir::failure();
2606 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
2607 return ::mlir::failure();
2609 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
2611 result.location, result.operands,
2612 result.attributes.getDictionary(parser.getContext()),
2613 result.getRawProperties(),
2614 result.regions, inferredReturnTypes)))
2615 return ::mlir::failure();
2616 result.addTypes(inferredReturnTypes);
2617 return ::mlir::success();
2626 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
2627 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
2628 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2629 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2635 ::llvm::LogicalResult
2637 std::optional<::mlir::Location> location,
2638 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
2639 ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions,
2640 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
2643 location, adaptor, inferredReturnTypes);
2648 mlir::MLIRContext *context, std::optional<mlir::Location> loc, Adaptor adaptor,
2649 llvm::SmallVectorImpl<mlir::Type> &inferred
2652 auto value = adaptor.getLhs();
2653 inferred[0] = value ? value.getType() :
FeltType::get(context, mlir::StringAttr());
2654 return mlir::success();
2676 return ::mlir::success();
2679void SignedModFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
2680 odsState.addOperands(lhs);
2681 odsState.addOperands(rhs);
2682 odsState.addTypes(result);
2685void SignedModFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
2686 odsState.addOperands(lhs);
2687 odsState.addOperands(rhs);
2689 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2691 odsState.location, odsState.operands,
2692 odsState.attributes.getDictionary(odsState.getContext()),
2693 odsState.getRawProperties(),
2694 odsState.regions, inferredReturnTypes)))
2695 odsState.addTypes(inferredReturnTypes);
2697 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
2701void SignedModFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
2702 odsState.addOperands(lhs);
2703 odsState.addOperands(rhs);
2704 assert(resultTypes.size() == 1u &&
"mismatched number of results");
2705 odsState.addTypes(resultTypes);
2708void SignedModFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2709 assert(operands.size() == 2u &&
"mismatched number of parameters");
2710 odsState.addOperands(operands);
2711 odsState.addAttributes(attributes);
2712 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
2713 odsState.addTypes(resultTypes);
2716void SignedModFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2717 assert(operands.size() == 2u &&
"mismatched number of parameters");
2718 odsState.addOperands(operands);
2719 odsState.addAttributes(attributes);
2721 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2723 odsState.location, operands,
2724 odsState.attributes.getDictionary(odsState.getContext()),
2725 odsState.getRawProperties(),
2726 odsState.regions, inferredReturnTypes))) {
2727 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
2728 odsState.addTypes(inferredReturnTypes);
2730 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
2736 unsigned index = 0; (void)index;
2739 for (
auto v : valueGroup0) {
2740 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
2741 return ::mlir::failure();
2745 for (
auto v : valueGroup1) {
2746 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
2747 return ::mlir::failure();
2751 unsigned index = 0; (void)index;
2754 for (
auto v : valueGroup0) {
2755 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
2756 return ::mlir::failure();
2760 return emitOpError(
"failed to verify that rhs type matches with lhs type");
2762 return emitOpError(
"failed to verify that result type matches with lhs type");
2764 return emitOpError(
"failed to verify that result type matches with rhs type");
2765 return ::mlir::success();
2773 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
2774 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
2775 (void)lhsOperandsLoc;
2776 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
2777 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
2778 (void)rhsOperandsLoc;
2779 ::mlir::Type lhsRawType{};
2780 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
2781 ::mlir::Type rhsRawType{};
2782 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
2784 lhsOperandsLoc = parser.getCurrentLocation();
2785 if (parser.parseOperand(lhsRawOperand))
2786 return ::mlir::failure();
2787 if (parser.parseComma())
2788 return ::mlir::failure();
2790 rhsOperandsLoc = parser.getCurrentLocation();
2791 if (parser.parseOperand(rhsRawOperand))
2792 return ::mlir::failure();
2794 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
2795 if (odsResult) return ::mlir::failure();
2798 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
2799 if (odsResult) return ::mlir::failure();
2802 auto loc = parser.getCurrentLocation();(void)loc;
2803 if (parser.parseOptionalAttrDict(result.attributes))
2804 return ::mlir::failure();
2806 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
2807 return ::mlir::failure();
2808 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
2809 return ::mlir::failure();
2811 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
2813 result.location, result.operands,
2814 result.attributes.getDictionary(parser.getContext()),
2815 result.getRawProperties(),
2816 result.regions, inferredReturnTypes)))
2817 return ::mlir::failure();
2818 result.addTypes(inferredReturnTypes);
2819 return ::mlir::success();
2828 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
2829 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
2830 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2831 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2837 ::llvm::LogicalResult
2839 std::optional<::mlir::Location> location,
2840 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
2841 ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions,
2842 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
2845 location, adaptor, inferredReturnTypes);
2850 mlir::MLIRContext *context, std::optional<mlir::Location> loc, Adaptor adaptor,
2851 llvm::SmallVectorImpl<mlir::Type> &inferred
2854 auto value = adaptor.getLhs();
2855 inferred[0] = value ? value.getType() :
FeltType::get(context, mlir::StringAttr());
2856 return mlir::success();
2878 return ::mlir::success();
2881void SubFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
2882 odsState.addOperands(lhs);
2883 odsState.addOperands(rhs);
2884 odsState.addTypes(result);
2887void SubFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
2888 odsState.addOperands(lhs);
2889 odsState.addOperands(rhs);
2891 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2893 odsState.location, odsState.operands,
2894 odsState.attributes.getDictionary(odsState.getContext()),
2895 odsState.getRawProperties(),
2896 odsState.regions, inferredReturnTypes)))
2897 odsState.addTypes(inferredReturnTypes);
2899 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
2903void SubFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
2904 odsState.addOperands(lhs);
2905 odsState.addOperands(rhs);
2906 assert(resultTypes.size() == 1u &&
"mismatched number of results");
2907 odsState.addTypes(resultTypes);
2910void SubFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2911 assert(operands.size() == 2u &&
"mismatched number of parameters");
2912 odsState.addOperands(operands);
2913 odsState.addAttributes(attributes);
2914 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
2915 odsState.addTypes(resultTypes);
2918void SubFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2919 assert(operands.size() == 2u &&
"mismatched number of parameters");
2920 odsState.addOperands(operands);
2921 odsState.addAttributes(attributes);
2923 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2925 odsState.location, operands,
2926 odsState.attributes.getDictionary(odsState.getContext()),
2927 odsState.getRawProperties(),
2928 odsState.regions, inferredReturnTypes))) {
2929 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
2930 odsState.addTypes(inferredReturnTypes);
2932 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
2938 unsigned index = 0; (void)index;
2941 for (
auto v : valueGroup0) {
2942 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
2943 return ::mlir::failure();
2947 for (
auto v : valueGroup1) {
2948 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
2949 return ::mlir::failure();
2953 unsigned index = 0; (void)index;
2956 for (
auto v : valueGroup0) {
2957 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
2958 return ::mlir::failure();
2962 return emitOpError(
"failed to verify that rhs type matches with lhs type");
2964 return emitOpError(
"failed to verify that result type matches with lhs type");
2966 return emitOpError(
"failed to verify that result type matches with rhs type");
2967 return ::mlir::success();
2974::mlir::ParseResult
SubFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2975 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
2976 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
2977 (void)lhsOperandsLoc;
2978 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
2979 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
2980 (void)rhsOperandsLoc;
2981 ::mlir::Type lhsRawType{};
2982 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
2983 ::mlir::Type rhsRawType{};
2984 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
2986 lhsOperandsLoc = parser.getCurrentLocation();
2987 if (parser.parseOperand(lhsRawOperand))
2988 return ::mlir::failure();
2989 if (parser.parseComma())
2990 return ::mlir::failure();
2992 rhsOperandsLoc = parser.getCurrentLocation();
2993 if (parser.parseOperand(rhsRawOperand))
2994 return ::mlir::failure();
2996 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
2997 if (odsResult) return ::mlir::failure();
3000 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
3001 if (odsResult) return ::mlir::failure();
3004 auto loc = parser.getCurrentLocation();(void)loc;
3005 if (parser.parseOptionalAttrDict(result.attributes))
3006 return ::mlir::failure();
3008 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
3009 return ::mlir::failure();
3010 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
3011 return ::mlir::failure();
3013 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
3015 result.location, result.operands,
3016 result.attributes.getDictionary(parser.getContext()),
3017 result.getRawProperties(),
3018 result.regions, inferredReturnTypes)))
3019 return ::mlir::failure();
3020 result.addTypes(inferredReturnTypes);
3021 return ::mlir::success();
3030 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
3031 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
3032 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
3033 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
3036void SubFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
3039 ::llvm::LogicalResult
3041 std::optional<::mlir::Location> location,
3042 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
3043 ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions,
3044 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
3047 location, adaptor, inferredReturnTypes);
3052 mlir::MLIRContext *context, std::optional<mlir::Location> loc, Adaptor adaptor,
3053 llvm::SmallVectorImpl<mlir::Type> &inferred
3056 auto value = adaptor.getLhs();
3057 inferred[0] = value ? value.getType() :
FeltType::get(context, mlir::StringAttr());
3058 return mlir::success();
3080 return ::mlir::success();
3083void UnsignedIntDivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
3084 odsState.addOperands(lhs);
3085 odsState.addOperands(rhs);
3086 odsState.addTypes(result);
3090 odsState.addOperands(lhs);
3091 odsState.addOperands(rhs);
3093 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3095 odsState.location, odsState.operands,
3096 odsState.attributes.getDictionary(odsState.getContext()),
3097 odsState.getRawProperties(),
3098 odsState.regions, inferredReturnTypes)))
3099 odsState.addTypes(inferredReturnTypes);
3101 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
3105void UnsignedIntDivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
3106 odsState.addOperands(lhs);
3107 odsState.addOperands(rhs);
3108 assert(resultTypes.size() == 1u &&
"mismatched number of results");
3109 odsState.addTypes(resultTypes);
3112void UnsignedIntDivFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3113 assert(operands.size() == 2u &&
"mismatched number of parameters");
3114 odsState.addOperands(operands);
3115 odsState.addAttributes(attributes);
3116 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
3117 odsState.addTypes(resultTypes);
3120void UnsignedIntDivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3121 assert(operands.size() == 2u &&
"mismatched number of parameters");
3122 odsState.addOperands(operands);
3123 odsState.addAttributes(attributes);
3125 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3127 odsState.location, operands,
3128 odsState.attributes.getDictionary(odsState.getContext()),
3129 odsState.getRawProperties(),
3130 odsState.regions, inferredReturnTypes))) {
3131 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
3132 odsState.addTypes(inferredReturnTypes);
3134 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
3140 unsigned index = 0; (void)index;
3143 for (
auto v : valueGroup0) {
3144 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
3145 return ::mlir::failure();
3149 for (
auto v : valueGroup1) {
3150 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
3151 return ::mlir::failure();
3155 unsigned index = 0; (void)index;
3158 for (
auto v : valueGroup0) {
3159 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
3160 return ::mlir::failure();
3164 return emitOpError(
"failed to verify that rhs type matches with lhs type");
3166 return emitOpError(
"failed to verify that result type matches with lhs type");
3168 return emitOpError(
"failed to verify that result type matches with rhs type");
3169 return ::mlir::success();
3177 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
3178 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
3179 (void)lhsOperandsLoc;
3180 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
3181 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
3182 (void)rhsOperandsLoc;
3183 ::mlir::Type lhsRawType{};
3184 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
3185 ::mlir::Type rhsRawType{};
3186 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
3188 lhsOperandsLoc = parser.getCurrentLocation();
3189 if (parser.parseOperand(lhsRawOperand))
3190 return ::mlir::failure();
3191 if (parser.parseComma())
3192 return ::mlir::failure();
3194 rhsOperandsLoc = parser.getCurrentLocation();
3195 if (parser.parseOperand(rhsRawOperand))
3196 return ::mlir::failure();
3198 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
3199 if (odsResult) return ::mlir::failure();
3202 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
3203 if (odsResult) return ::mlir::failure();
3206 auto loc = parser.getCurrentLocation();(void)loc;
3207 if (parser.parseOptionalAttrDict(result.attributes))
3208 return ::mlir::failure();
3210 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
3211 return ::mlir::failure();
3212 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
3213 return ::mlir::failure();
3215 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
3217 result.location, result.operands,
3218 result.attributes.getDictionary(parser.getContext()),
3219 result.getRawProperties(),
3220 result.regions, inferredReturnTypes)))
3221 return ::mlir::failure();
3222 result.addTypes(inferredReturnTypes);
3223 return ::mlir::success();
3232 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
3233 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
3234 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
3235 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
3241 ::llvm::LogicalResult
3243 std::optional<::mlir::Location> location,
3244 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
3245 ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions,
3246 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
3249 location, adaptor, inferredReturnTypes);
3254 mlir::MLIRContext *context, std::optional<mlir::Location> loc, Adaptor adaptor,
3255 llvm::SmallVectorImpl<mlir::Type> &inferred
3258 auto value = adaptor.getLhs();
3259 inferred[0] = value ? value.getType() :
FeltType::get(context, mlir::StringAttr());
3260 return mlir::success();
3282 return ::mlir::success();
3285void UnsignedModFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
3286 odsState.addOperands(lhs);
3287 odsState.addOperands(rhs);
3288 odsState.addTypes(result);
3292 odsState.addOperands(lhs);
3293 odsState.addOperands(rhs);
3295 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3297 odsState.location, odsState.operands,
3298 odsState.attributes.getDictionary(odsState.getContext()),
3299 odsState.getRawProperties(),
3300 odsState.regions, inferredReturnTypes)))
3301 odsState.addTypes(inferredReturnTypes);
3303 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
3307void UnsignedModFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
3308 odsState.addOperands(lhs);
3309 odsState.addOperands(rhs);
3310 assert(resultTypes.size() == 1u &&
"mismatched number of results");
3311 odsState.addTypes(resultTypes);
3314void UnsignedModFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3315 assert(operands.size() == 2u &&
"mismatched number of parameters");
3316 odsState.addOperands(operands);
3317 odsState.addAttributes(attributes);
3318 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
3319 odsState.addTypes(resultTypes);
3322void UnsignedModFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3323 assert(operands.size() == 2u &&
"mismatched number of parameters");
3324 odsState.addOperands(operands);
3325 odsState.addAttributes(attributes);
3327 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3329 odsState.location, operands,
3330 odsState.attributes.getDictionary(odsState.getContext()),
3331 odsState.getRawProperties(),
3332 odsState.regions, inferredReturnTypes))) {
3333 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
3334 odsState.addTypes(inferredReturnTypes);
3336 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
3342 unsigned index = 0; (void)index;
3345 for (
auto v : valueGroup0) {
3346 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
3347 return ::mlir::failure();
3351 for (
auto v : valueGroup1) {
3352 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
3353 return ::mlir::failure();
3357 unsigned index = 0; (void)index;
3360 for (
auto v : valueGroup0) {
3361 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
3362 return ::mlir::failure();
3366 return emitOpError(
"failed to verify that rhs type matches with lhs type");
3368 return emitOpError(
"failed to verify that result type matches with lhs type");
3370 return emitOpError(
"failed to verify that result type matches with rhs type");
3371 return ::mlir::success();
3379 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
3380 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
3381 (void)lhsOperandsLoc;
3382 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
3383 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
3384 (void)rhsOperandsLoc;
3385 ::mlir::Type lhsRawType{};
3386 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
3387 ::mlir::Type rhsRawType{};
3388 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
3390 lhsOperandsLoc = parser.getCurrentLocation();
3391 if (parser.parseOperand(lhsRawOperand))
3392 return ::mlir::failure();
3393 if (parser.parseComma())
3394 return ::mlir::failure();
3396 rhsOperandsLoc = parser.getCurrentLocation();
3397 if (parser.parseOperand(rhsRawOperand))
3398 return ::mlir::failure();
3400 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
3401 if (odsResult) return ::mlir::failure();
3404 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
3405 if (odsResult) return ::mlir::failure();
3408 auto loc = parser.getCurrentLocation();(void)loc;
3409 if (parser.parseOptionalAttrDict(result.attributes))
3410 return ::mlir::failure();
3412 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
3413 return ::mlir::failure();
3414 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
3415 return ::mlir::failure();
3417 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
3419 result.location, result.operands,
3420 result.attributes.getDictionary(parser.getContext()),
3421 result.getRawProperties(),
3422 result.regions, inferredReturnTypes)))
3423 return ::mlir::failure();
3424 result.addTypes(inferredReturnTypes);
3425 return ::mlir::success();
3434 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
3435 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
3436 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
3437 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
3443 ::llvm::LogicalResult
3445 std::optional<::mlir::Location> location,
3446 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
3447 ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions,
3448 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
3451 location, adaptor, inferredReturnTypes);
3456 mlir::MLIRContext *context, std::optional<mlir::Location> loc, Adaptor adaptor,
3457 llvm::SmallVectorImpl<mlir::Type> &inferred
3460 auto value = adaptor.getLhs();
3461 inferred[0] = value ? value.getType() :
FeltType::get(context, mlir::StringAttr());
3462 return mlir::success();
3484 return ::mlir::success();
3487void XorFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
3488 odsState.addOperands(lhs);
3489 odsState.addOperands(rhs);
3490 odsState.addTypes(result);
3493void XorFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
3494 odsState.addOperands(lhs);
3495 odsState.addOperands(rhs);
3497 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3499 odsState.location, odsState.operands,
3500 odsState.attributes.getDictionary(odsState.getContext()),
3501 odsState.getRawProperties(),
3502 odsState.regions, inferredReturnTypes)))
3503 odsState.addTypes(inferredReturnTypes);
3505 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
3509void XorFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
3510 odsState.addOperands(lhs);
3511 odsState.addOperands(rhs);
3512 assert(resultTypes.size() == 1u &&
"mismatched number of results");
3513 odsState.addTypes(resultTypes);
3516void XorFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3517 assert(operands.size() == 2u &&
"mismatched number of parameters");
3518 odsState.addOperands(operands);
3519 odsState.addAttributes(attributes);
3520 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
3521 odsState.addTypes(resultTypes);
3524void XorFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3525 assert(operands.size() == 2u &&
"mismatched number of parameters");
3526 odsState.addOperands(operands);
3527 odsState.addAttributes(attributes);
3529 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3531 odsState.location, operands,
3532 odsState.attributes.getDictionary(odsState.getContext()),
3533 odsState.getRawProperties(),
3534 odsState.regions, inferredReturnTypes))) {
3535 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
3536 odsState.addTypes(inferredReturnTypes);
3538 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
3544 unsigned index = 0; (void)index;
3547 for (
auto v : valueGroup0) {
3548 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
3549 return ::mlir::failure();
3553 for (
auto v : valueGroup1) {
3554 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
3555 return ::mlir::failure();
3559 unsigned index = 0; (void)index;
3562 for (
auto v : valueGroup0) {
3563 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
3564 return ::mlir::failure();
3568 return emitOpError(
"failed to verify that rhs type matches with lhs type");
3570 return emitOpError(
"failed to verify that result type matches with lhs type");
3572 return emitOpError(
"failed to verify that result type matches with rhs type");
3573 return ::mlir::success();
3580::mlir::ParseResult
XorFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
3581 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
3582 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
3583 (void)lhsOperandsLoc;
3584 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
3585 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
3586 (void)rhsOperandsLoc;
3587 ::mlir::Type lhsRawType{};
3588 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
3589 ::mlir::Type rhsRawType{};
3590 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
3592 lhsOperandsLoc = parser.getCurrentLocation();
3593 if (parser.parseOperand(lhsRawOperand))
3594 return ::mlir::failure();
3595 if (parser.parseComma())
3596 return ::mlir::failure();
3598 rhsOperandsLoc = parser.getCurrentLocation();
3599 if (parser.parseOperand(rhsRawOperand))
3600 return ::mlir::failure();
3602 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
3603 if (odsResult) return ::mlir::failure();
3606 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
3607 if (odsResult) return ::mlir::failure();
3610 auto loc = parser.getCurrentLocation();(void)loc;
3611 if (parser.parseOptionalAttrDict(result.attributes))
3612 return ::mlir::failure();
3614 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
3615 return ::mlir::failure();
3616 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
3617 return ::mlir::failure();
3619 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
3621 result.location, result.operands,
3622 result.attributes.getDictionary(parser.getContext()),
3623 result.getRawProperties(),
3624 result.regions, inferredReturnTypes)))
3625 return ::mlir::failure();
3626 result.addTypes(inferredReturnTypes);
3627 return ::mlir::success();
3636 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
3637 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
3638 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
3639 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
3642void XorFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
3645 ::llvm::LogicalResult
3647 std::optional<::mlir::Location> location,
3648 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
3649 ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions,
3650 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
3653 location, adaptor, inferredReturnTypes);
3658 mlir::MLIRContext *context, std::optional<mlir::Location> loc, Adaptor adaptor,
3659 llvm::SmallVectorImpl<mlir::Type> &inferred
3662 auto value = adaptor.getLhs();
3663 inferred[0] = value ? value.getType() :
FeltType::get(context, mlir::StringAttr());
3664 return mlir::success();
::llvm::LogicalResult verify(::mlir::Location loc)
AddFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
AddFeltOpAdaptor(AddFeltOp op)
::mlir::ValueRange getOperands()
::llvm::LogicalResult verifyInvariants()
::mlir::TypedValue<::mlir::Type > getLhs()
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
::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()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::Operation::result_range getODSResults(unsigned index)
::mlir::TypedValue<::mlir::Type > getRhs()
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::mlir::Operation::operand_range getODSOperands(unsigned index)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
AndFeltOpAdaptor(AndFeltOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
AndFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::mlir::ValueRange getOperands()
::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()
void print(::mlir::OpAsmPrinter &_odsPrinter)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
::llvm::LogicalResult verifyInvariants()
::mlir::TypedValue<::mlir::Type > getRhs()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::Operation::operand_range getODSOperands(unsigned index)
::mlir::TypedValue<::mlir::Type > getLhs()
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
::mlir::Operation::result_range getODSResults(unsigned index)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::llvm::LogicalResult verify(::mlir::Location loc)
DivFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
DivFeltOpAdaptor(DivFeltOp op)
::mlir::ValueRange getOperands()
::mlir::Operation::result_range getODSResults(unsigned index)
::llvm::LogicalResult verifyInvariantsImpl()
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::TypedValue<::mlir::Type > getRhs()
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
::mlir::TypedValue<::mlir::Type > getLhs()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::llvm::LogicalResult verifyInvariants()
::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)
::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 verify(::mlir::Location loc)
FeltConstantOpAdaptor(FeltConstantOp op)
FeltConstantOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::ValueRange getOperands()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::felt::FeltConstAttr value)
void writeProperties(::mlir::DialectBytecodeWriter &writer)
FeltConstantOpAdaptor Adaptor
FoldAdaptor::Properties Properties
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)
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::llvm::LogicalResult verifyInvariantsImpl()
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::llzk::felt::FeltConstAttr getValueAttr()
::mlir::Operation::result_range getODSResults(unsigned index)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::mlir::StringAttr getValueAttrName()
static llvm::hash_code computePropertiesHash(const Properties &prop)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::llvm::LogicalResult verifyInvariants()
::llzk::felt::FeltConstAttr getValue()
static FeltType get(::mlir::MLIRContext *context, ::mlir::StringAttr fieldName)
InvFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
InvFeltOpAdaptor(InvFeltOp op)
::mlir::ValueRange getOperands()
::mlir::TypedValue<::mlir::Type > getOperand()
::mlir::Operation::result_range getODSResults(unsigned index)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::llvm::LogicalResult verifyInvariants()
::mlir::Operation::operand_range getODSOperands(unsigned index)
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
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::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::llvm::LogicalResult verifyInvariantsImpl()
MulFeltOpAdaptor(MulFeltOp op)
MulFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
::mlir::ValueRange getOperands()
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()
::llvm::LogicalResult verifyInvariantsImpl()
::mlir::TypedValue<::mlir::Type > getRhs()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::mlir::Operation::result_range getODSResults(unsigned index)
::llvm::LogicalResult verifyInvariants()
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
::mlir::Operation::operand_range getODSOperands(unsigned index)
NegFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
NegFeltOpAdaptor(NegFeltOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
::mlir::ValueRange getOperands()
::llvm::LogicalResult verifyInvariantsImpl()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value operand)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::llvm::LogicalResult verifyInvariants()
::mlir::TypedValue<::mlir::Type > getOperand()
::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)
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
::mlir::Operation::result_range getODSResults(unsigned index)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::Operation::operand_range getODSOperands(unsigned index)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
NotFeltOpAdaptor(NotFeltOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
NotFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::mlir::ValueRange getOperands()
::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()
::mlir::Operation::result_range getODSResults(unsigned index)
::mlir::Operation::operand_range getODSOperands(unsigned index)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value operand)
::mlir::TypedValue<::mlir::Type > getOperand()
::llvm::LogicalResult verifyInvariants()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
void print(::mlir::OpAsmPrinter &_odsPrinter)
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
OrFeltOpAdaptor(OrFeltOp op)
OrFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
::mlir::ValueRange getOperands()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::Operation::result_range getODSResults(unsigned index)
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::Operation::operand_range getODSOperands(unsigned index)
::llvm::LogicalResult verifyInvariants()
::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()
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::mlir::TypedValue<::mlir::Type > getLhs()
::llvm::LogicalResult verify(::mlir::Location loc)
PowFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
PowFeltOpAdaptor(PowFeltOp op)
::mlir::ValueRange getOperands()
::mlir::TypedValue<::mlir::Type > getLhs()
::mlir::Operation::operand_range getODSOperands(unsigned index)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::mlir::Operation::result_range getODSResults(unsigned index)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::TypedValue<::mlir::Type > getRhs()
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::llvm::LogicalResult verifyInvariantsImpl()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
::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)
::llvm::LogicalResult verify(::mlir::Location loc)
ShlFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
ShlFeltOpAdaptor(ShlFeltOp op)
::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, ::mlir::Value lhs, ::mlir::Value rhs)
::mlir::TypedValue<::mlir::Type > getLhs()
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
::mlir::TypedValue<::mlir::Type > getRhs()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::llvm::LogicalResult verifyInvariantsImpl()
::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)
::llvm::LogicalResult verifyInvariants()
ShrFeltOpAdaptor(ShrFeltOp op)
ShrFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
::mlir::ValueRange getOperands()
::llvm::LogicalResult verifyInvariants()
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::Operation::operand_range getODSOperands(unsigned index)
::mlir::TypedValue<::mlir::Type > getRhs()
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::mlir::Operation::result_range getODSResults(unsigned index)
::llvm::LogicalResult verifyInvariantsImpl()
::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)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
::mlir::TypedValue<::mlir::Type > getLhs()
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::llvm::LogicalResult verify(::mlir::Location loc)
SignedIntDivFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
SignedIntDivFeltOpAdaptor(SignedIntDivFeltOp op)
::mlir::ValueRange getOperands()
::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::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
::llvm::LogicalResult verifyInvariantsImpl()
::mlir::Operation::operand_range getODSOperands(unsigned index)
::mlir::Operation::result_range getODSResults(unsigned index)
::mlir::TypedValue<::mlir::Type > getRhs()
::mlir::TypedValue<::mlir::Type > getLhs()
::llvm::LogicalResult verifyInvariants()
SignedIntDivFeltOpAdaptor Adaptor
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
void print(::mlir::OpAsmPrinter &_odsPrinter)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
SignedModFeltOpAdaptor(SignedModFeltOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
SignedModFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::mlir::ValueRange getOperands()
::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)
SignedModFeltOpAdaptor Adaptor
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::TypedValue<::mlir::Type > getRhs()
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
void print(::mlir::OpAsmPrinter &_odsPrinter)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
::mlir::TypedValue<::mlir::Type > getLhs()
::mlir::Operation::result_range getODSResults(unsigned index)
::mlir::Operation::operand_range getODSOperands(unsigned index)
::llvm::LogicalResult verifyInvariantsImpl()
::llvm::LogicalResult verifyInvariants()
SubFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
SubFeltOpAdaptor(SubFeltOp op)
::mlir::ValueRange getOperands()
::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::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::Operation::result_range getODSResults(unsigned index)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
::llvm::LogicalResult verifyInvariantsImpl()
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::mlir::TypedValue<::mlir::Type > getRhs()
void print(::mlir::OpAsmPrinter &_odsPrinter)
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
::llvm::LogicalResult verifyInvariants()
::mlir::TypedValue<::mlir::Type > getLhs()
::mlir::Operation::operand_range getODSOperands(unsigned index)
UnsignedIntDivFeltOpAdaptor(UnsignedIntDivFeltOp op)
UnsignedIntDivFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
::mlir::ValueRange getOperands()
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::TypedValue<::mlir::Type > getRhs()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
UnsignedIntDivFeltOpAdaptor Adaptor
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::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)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
::llvm::LogicalResult verifyInvariantsImpl()
::mlir::TypedValue<::mlir::Type > getLhs()
::mlir::Operation::result_range getODSResults(unsigned index)
::llvm::LogicalResult verifyInvariants()
::mlir::Operation::operand_range getODSOperands(unsigned index)
UnsignedModFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
UnsignedModFeltOpAdaptor(UnsignedModFeltOp op)
::mlir::ValueRange getOperands()
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::mlir::TypedValue<::mlir::Type > getRhs()
::mlir::Operation::operand_range getODSOperands(unsigned index)
::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)
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
::llvm::LogicalResult verifyInvariants()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::Operation::result_range getODSResults(unsigned index)
UnsignedModFeltOpAdaptor Adaptor
::llvm::LogicalResult verifyInvariantsImpl()
::mlir::TypedValue<::mlir::Type > getLhs()
void print(::mlir::OpAsmPrinter &_odsPrinter)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
XorFeltOpAdaptor(XorFeltOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
XorFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::mlir::ValueRange getOperands()
::mlir::Operation::result_range getODSResults(unsigned index)
::llvm::LogicalResult verifyInvariantsImpl()
::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::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::TypedValue<::mlir::Type > getLhs()
::llvm::LogicalResult verifyInvariants()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
::mlir::Operation::operand_range getODSOperands(unsigned index)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::TypedValue<::mlir::Type > getRhs()
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::mlir::RegionRange odsRegions
::llzk::felt::FeltConstAttr getValueAttr()
::std::optional<::mlir::OperationName > odsOpName
FeltConstantOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::DictionaryAttr odsAttrs
::llzk::felt::FeltConstAttr getValue()
const Properties & getProperties()
bool isValidType(Type type)
bool typesUnify(Type lhs, Type rhs, ArrayRef< StringRef > rhsReversePrefix, UnificationMap *unifications)