42static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops1(
43 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
44 unsigned valueIndex) {
45 if (!((::llvm::isa<llzk::polymorphic::TypeVarType,::llzk::felt::FeltType>(type)))) {
46 return op->emitOpError(valueKind) <<
" #" << valueIndex
47 <<
" must be finite field element or type variable, but got " << type;
49 return ::mlir::success();
52static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops2(
53 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
54 unsigned valueIndex) {
55 if (!((::llvm::isa<::llzk::felt::FeltType>(type)))) {
56 return op->emitOpError(valueKind) <<
" #" << valueIndex
57 <<
" must be finite field element, but got " << type;
59 return ::mlir::success();
62static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops1(
63 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
64 if (attr && !((::llvm::isa<::llzk::felt::FeltConstAttr>(attr))))
65 return emitError() <<
"attribute '" << attrName
66 <<
"' failed to satisfy constraint: finite field element";
67 return ::mlir::success();
69static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops1(
70 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
71 return __mlir_ods_local_attr_constraint_Ops1(attr, attrName, [op]() {
72 return op->emitOpError();
89 return ::mlir::success();
92void AddFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
93 odsState.addOperands(lhs);
94 odsState.addOperands(rhs);
95 odsState.addTypes(result);
98void AddFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
99 odsState.addOperands(lhs);
100 odsState.addOperands(rhs);
102 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
104 odsState.location, odsState.operands,
105 odsState.attributes.getDictionary(odsState.getContext()),
106 odsState.getRawProperties(),
107 odsState.regions, inferredReturnTypes)))
108 odsState.addTypes(inferredReturnTypes);
110 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
114void AddFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
115 odsState.addOperands(lhs);
116 odsState.addOperands(rhs);
117 assert(resultTypes.size() == 1u &&
"mismatched number of results");
118 odsState.addTypes(resultTypes);
121void AddFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
122 assert(operands.size() == 2u &&
"mismatched number of parameters");
123 odsState.addOperands(operands);
124 odsState.addAttributes(attributes);
125 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
126 odsState.addTypes(resultTypes);
129void AddFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
130 assert(operands.size() == 2u &&
"mismatched number of parameters");
131 odsState.addOperands(operands);
132 odsState.addAttributes(attributes);
134 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
136 odsState.location, operands,
137 odsState.attributes.getDictionary(odsState.getContext()),
138 odsState.getRawProperties(),
139 odsState.regions, inferredReturnTypes))) {
140 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
141 odsState.addTypes(inferredReturnTypes);
143 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
149 unsigned index = 0; (void)index;
152 for (
auto v : valueGroup0) {
153 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
154 return ::mlir::failure();
158 for (
auto v : valueGroup1) {
159 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
160 return ::mlir::failure();
164 unsigned index = 0; (void)index;
167 for (
auto v : valueGroup0) {
168 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
169 return ::mlir::failure();
173 return emitOpError(
"failed to verify that result type matches with lhs type");
175 return emitOpError(
"failed to verify that result type matches with rhs type");
176 return ::mlir::success();
183::llvm::LogicalResult
AddFeltOp::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) {
184 inferredReturnTypes.resize(1);
185 ::mlir::Builder odsBuilder(context);
187 inferredReturnTypes[0] = odsInferredType0;
188 return ::mlir::success();
191::mlir::ParseResult
AddFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
192 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
193 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
194 (void)lhsOperandsLoc;
195 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
196 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
197 (void)rhsOperandsLoc;
198 ::mlir::Type lhsRawType{};
199 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
200 ::mlir::Type rhsRawType{};
201 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
203 lhsOperandsLoc = parser.getCurrentLocation();
204 if (parser.parseOperand(lhsRawOperand))
205 return ::mlir::failure();
206 if (parser.parseComma())
207 return ::mlir::failure();
209 rhsOperandsLoc = parser.getCurrentLocation();
210 if (parser.parseOperand(rhsRawOperand))
211 return ::mlir::failure();
213 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
214 if (odsResult) return ::mlir::failure();
217 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
218 if (odsResult) return ::mlir::failure();
221 auto loc = parser.getCurrentLocation();(void)loc;
222 if (parser.parseOptionalAttrDict(result.attributes))
223 return ::mlir::failure();
226 result.addTypes(odsBuildableType0);
227 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
228 return ::mlir::failure();
229 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
230 return ::mlir::failure();
231 return ::mlir::success();
240 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
241 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
242 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
243 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
246void AddFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
265 return ::mlir::success();
268void AndFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
269 odsState.addOperands(lhs);
270 odsState.addOperands(rhs);
271 odsState.addTypes(result);
274void AndFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
275 odsState.addOperands(lhs);
276 odsState.addOperands(rhs);
278 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
280 odsState.location, odsState.operands,
281 odsState.attributes.getDictionary(odsState.getContext()),
282 odsState.getRawProperties(),
283 odsState.regions, inferredReturnTypes)))
284 odsState.addTypes(inferredReturnTypes);
286 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
290void AndFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
291 odsState.addOperands(lhs);
292 odsState.addOperands(rhs);
293 assert(resultTypes.size() == 1u &&
"mismatched number of results");
294 odsState.addTypes(resultTypes);
297void AndFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
298 assert(operands.size() == 2u &&
"mismatched number of parameters");
299 odsState.addOperands(operands);
300 odsState.addAttributes(attributes);
301 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
302 odsState.addTypes(resultTypes);
305void AndFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
306 assert(operands.size() == 2u &&
"mismatched number of parameters");
307 odsState.addOperands(operands);
308 odsState.addAttributes(attributes);
310 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
312 odsState.location, operands,
313 odsState.attributes.getDictionary(odsState.getContext()),
314 odsState.getRawProperties(),
315 odsState.regions, inferredReturnTypes))) {
316 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
317 odsState.addTypes(inferredReturnTypes);
319 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
325 unsigned index = 0; (void)index;
328 for (
auto v : valueGroup0) {
329 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
330 return ::mlir::failure();
334 for (
auto v : valueGroup1) {
335 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
336 return ::mlir::failure();
340 unsigned index = 0; (void)index;
343 for (
auto v : valueGroup0) {
344 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
345 return ::mlir::failure();
349 return emitOpError(
"failed to verify that result type matches with lhs type");
351 return emitOpError(
"failed to verify that result type matches with rhs type");
352 return ::mlir::success();
359::llvm::LogicalResult
AndFeltOp::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) {
360 inferredReturnTypes.resize(1);
361 ::mlir::Builder odsBuilder(context);
363 inferredReturnTypes[0] = odsInferredType0;
364 return ::mlir::success();
367::mlir::ParseResult
AndFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
368 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
369 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
370 (void)lhsOperandsLoc;
371 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
372 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
373 (void)rhsOperandsLoc;
374 ::mlir::Type lhsRawType{};
375 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
376 ::mlir::Type rhsRawType{};
377 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
379 lhsOperandsLoc = parser.getCurrentLocation();
380 if (parser.parseOperand(lhsRawOperand))
381 return ::mlir::failure();
382 if (parser.parseComma())
383 return ::mlir::failure();
385 rhsOperandsLoc = parser.getCurrentLocation();
386 if (parser.parseOperand(rhsRawOperand))
387 return ::mlir::failure();
389 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
390 if (odsResult) return ::mlir::failure();
393 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
394 if (odsResult) return ::mlir::failure();
397 auto loc = parser.getCurrentLocation();(void)loc;
398 if (parser.parseOptionalAttrDict(result.attributes))
399 return ::mlir::failure();
402 result.addTypes(odsBuildableType0);
403 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
404 return ::mlir::failure();
405 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
406 return ::mlir::failure();
407 return ::mlir::success();
416 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
417 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
418 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
419 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
422void AndFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
441 return ::mlir::success();
444void DivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
445 odsState.addOperands(lhs);
446 odsState.addOperands(rhs);
447 odsState.addTypes(result);
450void DivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
451 odsState.addOperands(lhs);
452 odsState.addOperands(rhs);
454 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
456 odsState.location, odsState.operands,
457 odsState.attributes.getDictionary(odsState.getContext()),
458 odsState.getRawProperties(),
459 odsState.regions, inferredReturnTypes)))
460 odsState.addTypes(inferredReturnTypes);
462 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
466void DivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
467 odsState.addOperands(lhs);
468 odsState.addOperands(rhs);
469 assert(resultTypes.size() == 1u &&
"mismatched number of results");
470 odsState.addTypes(resultTypes);
473void DivFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
474 assert(operands.size() == 2u &&
"mismatched number of parameters");
475 odsState.addOperands(operands);
476 odsState.addAttributes(attributes);
477 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
478 odsState.addTypes(resultTypes);
481void DivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
482 assert(operands.size() == 2u &&
"mismatched number of parameters");
483 odsState.addOperands(operands);
484 odsState.addAttributes(attributes);
486 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
488 odsState.location, operands,
489 odsState.attributes.getDictionary(odsState.getContext()),
490 odsState.getRawProperties(),
491 odsState.regions, inferredReturnTypes))) {
492 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
493 odsState.addTypes(inferredReturnTypes);
495 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
501 unsigned index = 0; (void)index;
504 for (
auto v : valueGroup0) {
505 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
506 return ::mlir::failure();
510 for (
auto v : valueGroup1) {
511 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
512 return ::mlir::failure();
516 unsigned index = 0; (void)index;
519 for (
auto v : valueGroup0) {
520 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
521 return ::mlir::failure();
525 return emitOpError(
"failed to verify that result type matches with lhs type");
527 return emitOpError(
"failed to verify that result type matches with rhs type");
528 return ::mlir::success();
535::llvm::LogicalResult
DivFeltOp::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) {
536 inferredReturnTypes.resize(1);
537 ::mlir::Builder odsBuilder(context);
539 inferredReturnTypes[0] = odsInferredType0;
540 return ::mlir::success();
543::mlir::ParseResult
DivFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
544 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
545 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
546 (void)lhsOperandsLoc;
547 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
548 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
549 (void)rhsOperandsLoc;
550 ::mlir::Type lhsRawType{};
551 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
552 ::mlir::Type rhsRawType{};
553 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
555 lhsOperandsLoc = parser.getCurrentLocation();
556 if (parser.parseOperand(lhsRawOperand))
557 return ::mlir::failure();
558 if (parser.parseComma())
559 return ::mlir::failure();
561 rhsOperandsLoc = parser.getCurrentLocation();
562 if (parser.parseOperand(rhsRawOperand))
563 return ::mlir::failure();
565 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
566 if (odsResult) return ::mlir::failure();
569 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
570 if (odsResult) return ::mlir::failure();
573 auto loc = parser.getCurrentLocation();(void)loc;
574 if (parser.parseOptionalAttrDict(result.attributes))
575 return ::mlir::failure();
578 result.addTypes(odsBuildableType0);
579 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
580 return ::mlir::failure();
581 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
582 return ::mlir::failure();
583 return ::mlir::success();
592 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
593 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
594 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
595 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
598void DivFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
617 return attr.getValue();
625 if (!tblgen_value)
return emitError(loc,
"'felt.const' op ""requires attribute 'value'");
627 if (tblgen_value && !((::llvm::isa<::llzk::felt::FeltConstAttr>(tblgen_value))))
628 return emitError(loc,
"'felt.const' op ""attribute 'value' failed to satisfy constraint: finite field element");
629 return ::mlir::success();
633 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
635 emitError() <<
"expected DictionaryAttr to set properties";
636 return ::mlir::failure();
640 auto &propStorage = prop.
value;
641 auto attr = dict.get(
"value");
643 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
645 propStorage = convertedAttr;
647 emitError() <<
"Invalid attribute `value` in property conversion: " << attr;
648 return ::mlir::failure();
652 return ::mlir::success();
656 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
657 ::mlir::Builder odsBuilder{ctx};
660 const auto &propStorage = prop.
value;
662 attrs.push_back(odsBuilder.getNamedAttr(
"value",
667 return odsBuilder.getDictionaryAttr(attrs);
672 return llvm::hash_combine(
673 llvm::hash_value(prop.
value.getAsOpaquePointer()));
683 if (name ==
"value") {
684 prop.
value = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
value)>>(value);
690 if (prop.
value) attrs.append(
"value", prop.
value);
696 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(attr,
"value", emitError)))
697 return ::mlir::failure();
699 return ::mlir::success();
703 auto &prop = state.getOrAddProperties<
Properties>(); (void)prop;
704 if (::mlir::failed(reader.readAttribute(prop.
value)))
705 return ::mlir::failure();
706 return ::mlir::success();
710 auto &prop = getProperties(); (void)prop;
711 writer.writeAttribute(prop.
value);
716 return attr.getValue();
719void FeltConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::felt::FeltConstAttr value) {
720 odsState.getOrAddProperties<
Properties>().value = value;
721 odsState.addTypes(result);
724void FeltConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::felt::FeltConstAttr value) {
725 odsState.getOrAddProperties<
Properties>().value = value;
727 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
729 odsState.location, odsState.operands,
730 odsState.attributes.getDictionary(odsState.getContext()),
731 odsState.getRawProperties(),
732 odsState.regions, inferredReturnTypes)))
733 odsState.addTypes(inferredReturnTypes);
735 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
739void FeltConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llzk::felt::FeltConstAttr value) {
740 odsState.getOrAddProperties<
Properties>().value = value;
741 assert(resultTypes.size() == 1u &&
"mismatched number of results");
742 odsState.addTypes(resultTypes);
745void FeltConstantOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
746 assert(operands.size() == 0u &&
"mismatched number of parameters");
747 odsState.addOperands(operands);
748 odsState.addAttributes(attributes);
749 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
750 odsState.addTypes(resultTypes);
752 if (!attributes.empty()) {
753 ::mlir::OpaqueProperties properties =
755 std::optional<::mlir::RegisteredOperationName> info =
756 odsState.name.getRegisteredInfo();
757 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
758 odsState.attributes.getDictionary(odsState.getContext()),
nullptr)))
759 ::llvm::report_fatal_error(
"Property conversion failed.");
763void FeltConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
764 assert(operands.size() == 0u &&
"mismatched number of parameters");
765 odsState.addOperands(operands);
766 odsState.addAttributes(attributes);
768 if (!attributes.empty()) {
769 ::mlir::OpaqueProperties properties =
771 std::optional<::mlir::RegisteredOperationName> info =
772 odsState.name.getRegisteredInfo();
773 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
774 odsState.attributes.getDictionary(odsState.getContext()),
nullptr)))
775 ::llvm::report_fatal_error(
"Property conversion failed.");
777 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
779 odsState.location, operands,
780 odsState.attributes.getDictionary(odsState.getContext()),
781 odsState.getRawProperties(),
782 odsState.regions, inferredReturnTypes))) {
783 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
784 odsState.addTypes(inferredReturnTypes);
786 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
791 auto tblgen_value = getProperties().value; (void)tblgen_value;
792 if (!tblgen_value)
return emitOpError(
"requires attribute 'value'");
794 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(*
this, tblgen_value,
"value")))
795 return ::mlir::failure();
797 unsigned index = 0; (void)index;
800 for (
auto v : valueGroup0) {
801 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
802 return ::mlir::failure();
805 return ::mlir::success();
812::llvm::LogicalResult
FeltConstantOp::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) {
813 inferredReturnTypes.resize(1);
814 ::mlir::Builder odsBuilder(context);
816 inferredReturnTypes[0] = odsInferredType0;
817 return ::mlir::success();
821 ::llzk::felt::FeltConstAttr valueAttr;
823 if (parser.parseCustomAttributeWithFallback(valueAttr, ::mlir::Type{})) {
824 return ::mlir::failure();
828 auto loc = parser.getCurrentLocation();(void)loc;
829 if (parser.parseOptionalAttrDict(result.attributes))
830 return ::mlir::failure();
832 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
834 return ::mlir::failure();
837 result.addTypes(odsBuildableType0);
838 return ::mlir::success();
844 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
845 elidedAttrs.push_back(
"value");
846 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
868 return ::mlir::success();
871void FeltNonDetOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result) {
872 odsState.addTypes(result);
876 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
878 odsState.location, odsState.operands,
879 odsState.attributes.getDictionary(odsState.getContext()),
880 odsState.getRawProperties(),
881 odsState.regions, inferredReturnTypes)))
882 odsState.addTypes(inferredReturnTypes);
884 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
888void FeltNonDetOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
889 assert(resultTypes.size() == 1u &&
"mismatched number of results");
890 odsState.addTypes(resultTypes);
893void FeltNonDetOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
894 assert(operands.size() == 0u &&
"mismatched number of parameters");
895 odsState.addOperands(operands);
896 odsState.addAttributes(attributes);
897 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
898 odsState.addTypes(resultTypes);
901void FeltNonDetOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
902 assert(operands.size() == 0u &&
"mismatched number of parameters");
903 odsState.addOperands(operands);
904 odsState.addAttributes(attributes);
906 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
908 odsState.location, operands,
909 odsState.attributes.getDictionary(odsState.getContext()),
910 odsState.getRawProperties(),
911 odsState.regions, inferredReturnTypes))) {
912 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
913 odsState.addTypes(inferredReturnTypes);
915 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
921 unsigned index = 0; (void)index;
924 for (
auto v : valueGroup0) {
925 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
926 return ::mlir::failure();
929 return ::mlir::success();
936::llvm::LogicalResult
FeltNonDetOp::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) {
937 inferredReturnTypes.resize(1);
938 ::mlir::Builder odsBuilder(context);
940 inferredReturnTypes[0] = odsInferredType0;
941 return ::mlir::success();
946 auto loc = parser.getCurrentLocation();(void)loc;
947 if (parser.parseOptionalAttrDict(result.attributes))
948 return ::mlir::failure();
951 result.addTypes(odsBuildableType0);
952 return ::mlir::success();
956 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
957 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
960void FeltNonDetOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
979 return ::mlir::success();
982void InvFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value operand) {
983 odsState.addOperands(operand);
984 odsState.addTypes(result);
987void InvFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value operand) {
988 odsState.addOperands(operand);
990 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
992 odsState.location, odsState.operands,
993 odsState.attributes.getDictionary(odsState.getContext()),
994 odsState.getRawProperties(),
995 odsState.regions, inferredReturnTypes)))
996 odsState.addTypes(inferredReturnTypes);
998 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1002void InvFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value operand) {
1003 odsState.addOperands(operand);
1004 assert(resultTypes.size() == 1u &&
"mismatched number of results");
1005 odsState.addTypes(resultTypes);
1008void InvFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1009 assert(operands.size() == 1u &&
"mismatched number of parameters");
1010 odsState.addOperands(operands);
1011 odsState.addAttributes(attributes);
1012 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
1013 odsState.addTypes(resultTypes);
1016void InvFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1017 assert(operands.size() == 1u &&
"mismatched number of parameters");
1018 odsState.addOperands(operands);
1019 odsState.addAttributes(attributes);
1021 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1023 odsState.location, operands,
1024 odsState.attributes.getDictionary(odsState.getContext()),
1025 odsState.getRawProperties(),
1026 odsState.regions, inferredReturnTypes))) {
1027 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
1028 odsState.addTypes(inferredReturnTypes);
1030 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
1036 unsigned index = 0; (void)index;
1039 for (
auto v : valueGroup0) {
1040 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
1041 return ::mlir::failure();
1045 unsigned index = 0; (void)index;
1048 for (
auto v : valueGroup0) {
1049 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
1050 return ::mlir::failure();
1054 return emitOpError(
"failed to verify that result type matches with operand type");
1055 return ::mlir::success();
1062::llvm::LogicalResult
InvFeltOp::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) {
1063 inferredReturnTypes.resize(1);
1064 ::mlir::Builder odsBuilder(context);
1066 inferredReturnTypes[0] = odsInferredType0;
1067 return ::mlir::success();
1070::mlir::ParseResult
InvFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1071 ::mlir::OpAsmParser::UnresolvedOperand operandRawOperand{};
1072 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> operandOperands(&operandRawOperand, 1); ::llvm::SMLoc operandOperandsLoc;
1073 (void)operandOperandsLoc;
1074 ::mlir::Type operandRawType{};
1075 ::llvm::ArrayRef<::mlir::Type> operandTypes(&operandRawType, 1);
1077 operandOperandsLoc = parser.getCurrentLocation();
1078 if (parser.parseOperand(operandRawOperand))
1079 return ::mlir::failure();
1081 auto odsResult = parseInferredOrParsedType(parser, operandRawType,
true);
1082 if (odsResult) return ::mlir::failure();
1085 auto loc = parser.getCurrentLocation();(void)loc;
1086 if (parser.parseOptionalAttrDict(result.attributes))
1087 return ::mlir::failure();
1090 result.addTypes(odsBuildableType0);
1091 if (parser.resolveOperands(operandOperands, operandTypes, operandOperandsLoc, result.operands))
1092 return ::mlir::failure();
1093 return ::mlir::success();
1099 printInferredOrParsedType(_odsPrinter, *
this,
getOperand().getType(),
true);
1100 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1101 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1104void InvFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1123 return ::mlir::success();
1126void ModFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
1127 odsState.addOperands(lhs);
1128 odsState.addOperands(rhs);
1129 odsState.addTypes(result);
1132void ModFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
1133 odsState.addOperands(lhs);
1134 odsState.addOperands(rhs);
1136 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1138 odsState.location, odsState.operands,
1139 odsState.attributes.getDictionary(odsState.getContext()),
1140 odsState.getRawProperties(),
1141 odsState.regions, inferredReturnTypes)))
1142 odsState.addTypes(inferredReturnTypes);
1144 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1148void ModFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
1149 odsState.addOperands(lhs);
1150 odsState.addOperands(rhs);
1151 assert(resultTypes.size() == 1u &&
"mismatched number of results");
1152 odsState.addTypes(resultTypes);
1155void ModFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1156 assert(operands.size() == 2u &&
"mismatched number of parameters");
1157 odsState.addOperands(operands);
1158 odsState.addAttributes(attributes);
1159 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
1160 odsState.addTypes(resultTypes);
1163void ModFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1164 assert(operands.size() == 2u &&
"mismatched number of parameters");
1165 odsState.addOperands(operands);
1166 odsState.addAttributes(attributes);
1168 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1170 odsState.location, operands,
1171 odsState.attributes.getDictionary(odsState.getContext()),
1172 odsState.getRawProperties(),
1173 odsState.regions, inferredReturnTypes))) {
1174 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
1175 odsState.addTypes(inferredReturnTypes);
1177 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
1183 unsigned index = 0; (void)index;
1186 for (
auto v : valueGroup0) {
1187 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
1188 return ::mlir::failure();
1192 for (
auto v : valueGroup1) {
1193 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
1194 return ::mlir::failure();
1198 unsigned index = 0; (void)index;
1201 for (
auto v : valueGroup0) {
1202 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
1203 return ::mlir::failure();
1207 return emitOpError(
"failed to verify that result type matches with lhs type");
1209 return emitOpError(
"failed to verify that result type matches with rhs type");
1210 return ::mlir::success();
1217::llvm::LogicalResult
ModFeltOp::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) {
1218 inferredReturnTypes.resize(1);
1219 ::mlir::Builder odsBuilder(context);
1221 inferredReturnTypes[0] = odsInferredType0;
1222 return ::mlir::success();
1225::mlir::ParseResult
ModFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1226 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
1227 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
1228 (void)lhsOperandsLoc;
1229 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
1230 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
1231 (void)rhsOperandsLoc;
1232 ::mlir::Type lhsRawType{};
1233 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
1234 ::mlir::Type rhsRawType{};
1235 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
1237 lhsOperandsLoc = parser.getCurrentLocation();
1238 if (parser.parseOperand(lhsRawOperand))
1239 return ::mlir::failure();
1240 if (parser.parseComma())
1241 return ::mlir::failure();
1243 rhsOperandsLoc = parser.getCurrentLocation();
1244 if (parser.parseOperand(rhsRawOperand))
1245 return ::mlir::failure();
1247 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
1248 if (odsResult) return ::mlir::failure();
1251 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
1252 if (odsResult) return ::mlir::failure();
1255 auto loc = parser.getCurrentLocation();(void)loc;
1256 if (parser.parseOptionalAttrDict(result.attributes))
1257 return ::mlir::failure();
1260 result.addTypes(odsBuildableType0);
1261 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
1262 return ::mlir::failure();
1263 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
1264 return ::mlir::failure();
1265 return ::mlir::success();
1274 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
1275 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
1276 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1277 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1280void ModFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1299 return ::mlir::success();
1302void MulFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
1303 odsState.addOperands(lhs);
1304 odsState.addOperands(rhs);
1305 odsState.addTypes(result);
1308void MulFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
1309 odsState.addOperands(lhs);
1310 odsState.addOperands(rhs);
1312 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1314 odsState.location, odsState.operands,
1315 odsState.attributes.getDictionary(odsState.getContext()),
1316 odsState.getRawProperties(),
1317 odsState.regions, inferredReturnTypes)))
1318 odsState.addTypes(inferredReturnTypes);
1320 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1324void MulFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
1325 odsState.addOperands(lhs);
1326 odsState.addOperands(rhs);
1327 assert(resultTypes.size() == 1u &&
"mismatched number of results");
1328 odsState.addTypes(resultTypes);
1331void MulFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1332 assert(operands.size() == 2u &&
"mismatched number of parameters");
1333 odsState.addOperands(operands);
1334 odsState.addAttributes(attributes);
1335 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
1336 odsState.addTypes(resultTypes);
1339void MulFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1340 assert(operands.size() == 2u &&
"mismatched number of parameters");
1341 odsState.addOperands(operands);
1342 odsState.addAttributes(attributes);
1344 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1346 odsState.location, operands,
1347 odsState.attributes.getDictionary(odsState.getContext()),
1348 odsState.getRawProperties(),
1349 odsState.regions, inferredReturnTypes))) {
1350 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
1351 odsState.addTypes(inferredReturnTypes);
1353 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
1359 unsigned index = 0; (void)index;
1362 for (
auto v : valueGroup0) {
1363 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
1364 return ::mlir::failure();
1368 for (
auto v : valueGroup1) {
1369 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
1370 return ::mlir::failure();
1374 unsigned index = 0; (void)index;
1377 for (
auto v : valueGroup0) {
1378 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
1379 return ::mlir::failure();
1383 return emitOpError(
"failed to verify that result type matches with lhs type");
1385 return emitOpError(
"failed to verify that result type matches with rhs type");
1386 return ::mlir::success();
1393::llvm::LogicalResult
MulFeltOp::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) {
1394 inferredReturnTypes.resize(1);
1395 ::mlir::Builder odsBuilder(context);
1397 inferredReturnTypes[0] = odsInferredType0;
1398 return ::mlir::success();
1401::mlir::ParseResult
MulFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1402 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
1403 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
1404 (void)lhsOperandsLoc;
1405 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
1406 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
1407 (void)rhsOperandsLoc;
1408 ::mlir::Type lhsRawType{};
1409 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
1410 ::mlir::Type rhsRawType{};
1411 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
1413 lhsOperandsLoc = parser.getCurrentLocation();
1414 if (parser.parseOperand(lhsRawOperand))
1415 return ::mlir::failure();
1416 if (parser.parseComma())
1417 return ::mlir::failure();
1419 rhsOperandsLoc = parser.getCurrentLocation();
1420 if (parser.parseOperand(rhsRawOperand))
1421 return ::mlir::failure();
1423 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
1424 if (odsResult) return ::mlir::failure();
1427 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
1428 if (odsResult) return ::mlir::failure();
1431 auto loc = parser.getCurrentLocation();(void)loc;
1432 if (parser.parseOptionalAttrDict(result.attributes))
1433 return ::mlir::failure();
1436 result.addTypes(odsBuildableType0);
1437 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
1438 return ::mlir::failure();
1439 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
1440 return ::mlir::failure();
1441 return ::mlir::success();
1450 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
1451 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
1452 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1453 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1456void MulFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1475 return ::mlir::success();
1478void NegFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value operand) {
1479 odsState.addOperands(operand);
1480 odsState.addTypes(result);
1483void NegFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value operand) {
1484 odsState.addOperands(operand);
1486 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1488 odsState.location, odsState.operands,
1489 odsState.attributes.getDictionary(odsState.getContext()),
1490 odsState.getRawProperties(),
1491 odsState.regions, inferredReturnTypes)))
1492 odsState.addTypes(inferredReturnTypes);
1494 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1498void NegFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value operand) {
1499 odsState.addOperands(operand);
1500 assert(resultTypes.size() == 1u &&
"mismatched number of results");
1501 odsState.addTypes(resultTypes);
1504void NegFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1505 assert(operands.size() == 1u &&
"mismatched number of parameters");
1506 odsState.addOperands(operands);
1507 odsState.addAttributes(attributes);
1508 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
1509 odsState.addTypes(resultTypes);
1512void NegFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1513 assert(operands.size() == 1u &&
"mismatched number of parameters");
1514 odsState.addOperands(operands);
1515 odsState.addAttributes(attributes);
1517 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1519 odsState.location, operands,
1520 odsState.attributes.getDictionary(odsState.getContext()),
1521 odsState.getRawProperties(),
1522 odsState.regions, inferredReturnTypes))) {
1523 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
1524 odsState.addTypes(inferredReturnTypes);
1526 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
1532 unsigned index = 0; (void)index;
1535 for (
auto v : valueGroup0) {
1536 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
1537 return ::mlir::failure();
1541 unsigned index = 0; (void)index;
1544 for (
auto v : valueGroup0) {
1545 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
1546 return ::mlir::failure();
1550 return emitOpError(
"failed to verify that result type matches with operand type");
1551 return ::mlir::success();
1558::llvm::LogicalResult
NegFeltOp::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) {
1559 inferredReturnTypes.resize(1);
1560 ::mlir::Builder odsBuilder(context);
1562 inferredReturnTypes[0] = odsInferredType0;
1563 return ::mlir::success();
1566::mlir::ParseResult
NegFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1567 ::mlir::OpAsmParser::UnresolvedOperand operandRawOperand{};
1568 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> operandOperands(&operandRawOperand, 1); ::llvm::SMLoc operandOperandsLoc;
1569 (void)operandOperandsLoc;
1570 ::mlir::Type operandRawType{};
1571 ::llvm::ArrayRef<::mlir::Type> operandTypes(&operandRawType, 1);
1573 operandOperandsLoc = parser.getCurrentLocation();
1574 if (parser.parseOperand(operandRawOperand))
1575 return ::mlir::failure();
1577 auto odsResult = parseInferredOrParsedType(parser, operandRawType,
true);
1578 if (odsResult) return ::mlir::failure();
1581 auto loc = parser.getCurrentLocation();(void)loc;
1582 if (parser.parseOptionalAttrDict(result.attributes))
1583 return ::mlir::failure();
1586 result.addTypes(odsBuildableType0);
1587 if (parser.resolveOperands(operandOperands, operandTypes, operandOperandsLoc, result.operands))
1588 return ::mlir::failure();
1589 return ::mlir::success();
1595 printInferredOrParsedType(_odsPrinter, *
this,
getOperand().getType(),
true);
1596 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1597 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1600void NegFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1619 return ::mlir::success();
1622void NotFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value operand) {
1623 odsState.addOperands(operand);
1624 odsState.addTypes(result);
1627void NotFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value operand) {
1628 odsState.addOperands(operand);
1630 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1632 odsState.location, odsState.operands,
1633 odsState.attributes.getDictionary(odsState.getContext()),
1634 odsState.getRawProperties(),
1635 odsState.regions, inferredReturnTypes)))
1636 odsState.addTypes(inferredReturnTypes);
1638 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1642void NotFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value operand) {
1643 odsState.addOperands(operand);
1644 assert(resultTypes.size() == 1u &&
"mismatched number of results");
1645 odsState.addTypes(resultTypes);
1648void NotFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1649 assert(operands.size() == 1u &&
"mismatched number of parameters");
1650 odsState.addOperands(operands);
1651 odsState.addAttributes(attributes);
1652 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
1653 odsState.addTypes(resultTypes);
1656void NotFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1657 assert(operands.size() == 1u &&
"mismatched number of parameters");
1658 odsState.addOperands(operands);
1659 odsState.addAttributes(attributes);
1661 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1663 odsState.location, operands,
1664 odsState.attributes.getDictionary(odsState.getContext()),
1665 odsState.getRawProperties(),
1666 odsState.regions, inferredReturnTypes))) {
1667 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
1668 odsState.addTypes(inferredReturnTypes);
1670 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
1676 unsigned index = 0; (void)index;
1679 for (
auto v : valueGroup0) {
1680 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
1681 return ::mlir::failure();
1685 unsigned index = 0; (void)index;
1688 for (
auto v : valueGroup0) {
1689 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
1690 return ::mlir::failure();
1694 return emitOpError(
"failed to verify that result type matches with operand type");
1695 return ::mlir::success();
1702::llvm::LogicalResult
NotFeltOp::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) {
1703 inferredReturnTypes.resize(1);
1704 ::mlir::Builder odsBuilder(context);
1706 inferredReturnTypes[0] = odsInferredType0;
1707 return ::mlir::success();
1710::mlir::ParseResult
NotFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1711 ::mlir::OpAsmParser::UnresolvedOperand operandRawOperand{};
1712 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> operandOperands(&operandRawOperand, 1); ::llvm::SMLoc operandOperandsLoc;
1713 (void)operandOperandsLoc;
1714 ::mlir::Type operandRawType{};
1715 ::llvm::ArrayRef<::mlir::Type> operandTypes(&operandRawType, 1);
1717 operandOperandsLoc = parser.getCurrentLocation();
1718 if (parser.parseOperand(operandRawOperand))
1719 return ::mlir::failure();
1721 auto odsResult = parseInferredOrParsedType(parser, operandRawType,
true);
1722 if (odsResult) return ::mlir::failure();
1725 auto loc = parser.getCurrentLocation();(void)loc;
1726 if (parser.parseOptionalAttrDict(result.attributes))
1727 return ::mlir::failure();
1730 result.addTypes(odsBuildableType0);
1731 if (parser.resolveOperands(operandOperands, operandTypes, operandOperandsLoc, result.operands))
1732 return ::mlir::failure();
1733 return ::mlir::success();
1739 printInferredOrParsedType(_odsPrinter, *
this,
getOperand().getType(),
true);
1740 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1741 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1744void NotFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1763 return ::mlir::success();
1766void OrFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
1767 odsState.addOperands(lhs);
1768 odsState.addOperands(rhs);
1769 odsState.addTypes(result);
1772void OrFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
1773 odsState.addOperands(lhs);
1774 odsState.addOperands(rhs);
1776 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1778 odsState.location, odsState.operands,
1779 odsState.attributes.getDictionary(odsState.getContext()),
1780 odsState.getRawProperties(),
1781 odsState.regions, inferredReturnTypes)))
1782 odsState.addTypes(inferredReturnTypes);
1784 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1788void OrFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
1789 odsState.addOperands(lhs);
1790 odsState.addOperands(rhs);
1791 assert(resultTypes.size() == 1u &&
"mismatched number of results");
1792 odsState.addTypes(resultTypes);
1795void OrFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1796 assert(operands.size() == 2u &&
"mismatched number of parameters");
1797 odsState.addOperands(operands);
1798 odsState.addAttributes(attributes);
1799 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
1800 odsState.addTypes(resultTypes);
1803void OrFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1804 assert(operands.size() == 2u &&
"mismatched number of parameters");
1805 odsState.addOperands(operands);
1806 odsState.addAttributes(attributes);
1808 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1810 odsState.location, operands,
1811 odsState.attributes.getDictionary(odsState.getContext()),
1812 odsState.getRawProperties(),
1813 odsState.regions, inferredReturnTypes))) {
1814 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
1815 odsState.addTypes(inferredReturnTypes);
1817 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
1823 unsigned index = 0; (void)index;
1826 for (
auto v : valueGroup0) {
1827 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
1828 return ::mlir::failure();
1832 for (
auto v : valueGroup1) {
1833 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
1834 return ::mlir::failure();
1838 unsigned index = 0; (void)index;
1841 for (
auto v : valueGroup0) {
1842 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
1843 return ::mlir::failure();
1847 return emitOpError(
"failed to verify that result type matches with lhs type");
1849 return emitOpError(
"failed to verify that result type matches with rhs type");
1850 return ::mlir::success();
1857::llvm::LogicalResult
OrFeltOp::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) {
1858 inferredReturnTypes.resize(1);
1859 ::mlir::Builder odsBuilder(context);
1861 inferredReturnTypes[0] = odsInferredType0;
1862 return ::mlir::success();
1865::mlir::ParseResult
OrFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1866 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
1867 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
1868 (void)lhsOperandsLoc;
1869 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
1870 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
1871 (void)rhsOperandsLoc;
1872 ::mlir::Type lhsRawType{};
1873 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
1874 ::mlir::Type rhsRawType{};
1875 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
1877 lhsOperandsLoc = parser.getCurrentLocation();
1878 if (parser.parseOperand(lhsRawOperand))
1879 return ::mlir::failure();
1880 if (parser.parseComma())
1881 return ::mlir::failure();
1883 rhsOperandsLoc = parser.getCurrentLocation();
1884 if (parser.parseOperand(rhsRawOperand))
1885 return ::mlir::failure();
1887 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
1888 if (odsResult) return ::mlir::failure();
1891 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
1892 if (odsResult) return ::mlir::failure();
1895 auto loc = parser.getCurrentLocation();(void)loc;
1896 if (parser.parseOptionalAttrDict(result.attributes))
1897 return ::mlir::failure();
1900 result.addTypes(odsBuildableType0);
1901 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
1902 return ::mlir::failure();
1903 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
1904 return ::mlir::failure();
1905 return ::mlir::success();
1914 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
1915 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
1916 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1917 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1920void OrFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1939 return ::mlir::success();
1942void PowFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
1943 odsState.addOperands(lhs);
1944 odsState.addOperands(rhs);
1945 odsState.addTypes(result);
1948void PowFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
1949 odsState.addOperands(lhs);
1950 odsState.addOperands(rhs);
1952 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1954 odsState.location, odsState.operands,
1955 odsState.attributes.getDictionary(odsState.getContext()),
1956 odsState.getRawProperties(),
1957 odsState.regions, inferredReturnTypes)))
1958 odsState.addTypes(inferredReturnTypes);
1960 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1964void PowFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
1965 odsState.addOperands(lhs);
1966 odsState.addOperands(rhs);
1967 assert(resultTypes.size() == 1u &&
"mismatched number of results");
1968 odsState.addTypes(resultTypes);
1971void PowFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1972 assert(operands.size() == 2u &&
"mismatched number of parameters");
1973 odsState.addOperands(operands);
1974 odsState.addAttributes(attributes);
1975 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
1976 odsState.addTypes(resultTypes);
1979void PowFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1980 assert(operands.size() == 2u &&
"mismatched number of parameters");
1981 odsState.addOperands(operands);
1982 odsState.addAttributes(attributes);
1984 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1986 odsState.location, operands,
1987 odsState.attributes.getDictionary(odsState.getContext()),
1988 odsState.getRawProperties(),
1989 odsState.regions, inferredReturnTypes))) {
1990 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
1991 odsState.addTypes(inferredReturnTypes);
1993 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
1999 unsigned index = 0; (void)index;
2002 for (
auto v : valueGroup0) {
2003 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
2004 return ::mlir::failure();
2008 for (
auto v : valueGroup1) {
2009 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
2010 return ::mlir::failure();
2014 unsigned index = 0; (void)index;
2017 for (
auto v : valueGroup0) {
2018 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
2019 return ::mlir::failure();
2023 return emitOpError(
"failed to verify that result type matches with lhs type");
2025 return emitOpError(
"failed to verify that result type matches with rhs type");
2026 return ::mlir::success();
2033::llvm::LogicalResult
PowFeltOp::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) {
2034 inferredReturnTypes.resize(1);
2035 ::mlir::Builder odsBuilder(context);
2037 inferredReturnTypes[0] = odsInferredType0;
2038 return ::mlir::success();
2041::mlir::ParseResult
PowFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2042 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
2043 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
2044 (void)lhsOperandsLoc;
2045 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
2046 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
2047 (void)rhsOperandsLoc;
2048 ::mlir::Type lhsRawType{};
2049 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
2050 ::mlir::Type rhsRawType{};
2051 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
2053 lhsOperandsLoc = parser.getCurrentLocation();
2054 if (parser.parseOperand(lhsRawOperand))
2055 return ::mlir::failure();
2056 if (parser.parseComma())
2057 return ::mlir::failure();
2059 rhsOperandsLoc = parser.getCurrentLocation();
2060 if (parser.parseOperand(rhsRawOperand))
2061 return ::mlir::failure();
2063 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
2064 if (odsResult) return ::mlir::failure();
2067 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
2068 if (odsResult) return ::mlir::failure();
2071 auto loc = parser.getCurrentLocation();(void)loc;
2072 if (parser.parseOptionalAttrDict(result.attributes))
2073 return ::mlir::failure();
2076 result.addTypes(odsBuildableType0);
2077 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
2078 return ::mlir::failure();
2079 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
2080 return ::mlir::failure();
2081 return ::mlir::success();
2090 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
2091 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
2092 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2093 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2096void PowFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
2115 return ::mlir::success();
2118void ShlFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
2119 odsState.addOperands(lhs);
2120 odsState.addOperands(rhs);
2121 odsState.addTypes(result);
2124void ShlFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
2125 odsState.addOperands(lhs);
2126 odsState.addOperands(rhs);
2128 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2130 odsState.location, odsState.operands,
2131 odsState.attributes.getDictionary(odsState.getContext()),
2132 odsState.getRawProperties(),
2133 odsState.regions, inferredReturnTypes)))
2134 odsState.addTypes(inferredReturnTypes);
2136 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
2140void ShlFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
2141 odsState.addOperands(lhs);
2142 odsState.addOperands(rhs);
2143 assert(resultTypes.size() == 1u &&
"mismatched number of results");
2144 odsState.addTypes(resultTypes);
2147void ShlFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2148 assert(operands.size() == 2u &&
"mismatched number of parameters");
2149 odsState.addOperands(operands);
2150 odsState.addAttributes(attributes);
2151 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
2152 odsState.addTypes(resultTypes);
2155void ShlFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2156 assert(operands.size() == 2u &&
"mismatched number of parameters");
2157 odsState.addOperands(operands);
2158 odsState.addAttributes(attributes);
2160 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2162 odsState.location, operands,
2163 odsState.attributes.getDictionary(odsState.getContext()),
2164 odsState.getRawProperties(),
2165 odsState.regions, inferredReturnTypes))) {
2166 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
2167 odsState.addTypes(inferredReturnTypes);
2169 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
2175 unsigned index = 0; (void)index;
2178 for (
auto v : valueGroup0) {
2179 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
2180 return ::mlir::failure();
2184 for (
auto v : valueGroup1) {
2185 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
2186 return ::mlir::failure();
2190 unsigned index = 0; (void)index;
2193 for (
auto v : valueGroup0) {
2194 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
2195 return ::mlir::failure();
2199 return emitOpError(
"failed to verify that result type matches with lhs type");
2201 return emitOpError(
"failed to verify that result type matches with rhs type");
2202 return ::mlir::success();
2209::llvm::LogicalResult
ShlFeltOp::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) {
2210 inferredReturnTypes.resize(1);
2211 ::mlir::Builder odsBuilder(context);
2213 inferredReturnTypes[0] = odsInferredType0;
2214 return ::mlir::success();
2217::mlir::ParseResult
ShlFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2218 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
2219 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
2220 (void)lhsOperandsLoc;
2221 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
2222 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
2223 (void)rhsOperandsLoc;
2224 ::mlir::Type lhsRawType{};
2225 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
2226 ::mlir::Type rhsRawType{};
2227 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
2229 lhsOperandsLoc = parser.getCurrentLocation();
2230 if (parser.parseOperand(lhsRawOperand))
2231 return ::mlir::failure();
2232 if (parser.parseComma())
2233 return ::mlir::failure();
2235 rhsOperandsLoc = parser.getCurrentLocation();
2236 if (parser.parseOperand(rhsRawOperand))
2237 return ::mlir::failure();
2239 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
2240 if (odsResult) return ::mlir::failure();
2243 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
2244 if (odsResult) return ::mlir::failure();
2247 auto loc = parser.getCurrentLocation();(void)loc;
2248 if (parser.parseOptionalAttrDict(result.attributes))
2249 return ::mlir::failure();
2252 result.addTypes(odsBuildableType0);
2253 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
2254 return ::mlir::failure();
2255 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
2256 return ::mlir::failure();
2257 return ::mlir::success();
2266 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
2267 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
2268 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2269 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2272void ShlFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
2291 return ::mlir::success();
2294void ShrFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
2295 odsState.addOperands(lhs);
2296 odsState.addOperands(rhs);
2297 odsState.addTypes(result);
2300void ShrFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
2301 odsState.addOperands(lhs);
2302 odsState.addOperands(rhs);
2304 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2306 odsState.location, odsState.operands,
2307 odsState.attributes.getDictionary(odsState.getContext()),
2308 odsState.getRawProperties(),
2309 odsState.regions, inferredReturnTypes)))
2310 odsState.addTypes(inferredReturnTypes);
2312 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
2316void ShrFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
2317 odsState.addOperands(lhs);
2318 odsState.addOperands(rhs);
2319 assert(resultTypes.size() == 1u &&
"mismatched number of results");
2320 odsState.addTypes(resultTypes);
2323void ShrFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2324 assert(operands.size() == 2u &&
"mismatched number of parameters");
2325 odsState.addOperands(operands);
2326 odsState.addAttributes(attributes);
2327 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
2328 odsState.addTypes(resultTypes);
2331void ShrFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2332 assert(operands.size() == 2u &&
"mismatched number of parameters");
2333 odsState.addOperands(operands);
2334 odsState.addAttributes(attributes);
2336 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2338 odsState.location, operands,
2339 odsState.attributes.getDictionary(odsState.getContext()),
2340 odsState.getRawProperties(),
2341 odsState.regions, inferredReturnTypes))) {
2342 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
2343 odsState.addTypes(inferredReturnTypes);
2345 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
2351 unsigned index = 0; (void)index;
2354 for (
auto v : valueGroup0) {
2355 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
2356 return ::mlir::failure();
2360 for (
auto v : valueGroup1) {
2361 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
2362 return ::mlir::failure();
2366 unsigned index = 0; (void)index;
2369 for (
auto v : valueGroup0) {
2370 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
2371 return ::mlir::failure();
2375 return emitOpError(
"failed to verify that result type matches with lhs type");
2377 return emitOpError(
"failed to verify that result type matches with rhs type");
2378 return ::mlir::success();
2385::llvm::LogicalResult
ShrFeltOp::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) {
2386 inferredReturnTypes.resize(1);
2387 ::mlir::Builder odsBuilder(context);
2389 inferredReturnTypes[0] = odsInferredType0;
2390 return ::mlir::success();
2393::mlir::ParseResult
ShrFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2394 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
2395 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
2396 (void)lhsOperandsLoc;
2397 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
2398 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
2399 (void)rhsOperandsLoc;
2400 ::mlir::Type lhsRawType{};
2401 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
2402 ::mlir::Type rhsRawType{};
2403 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
2405 lhsOperandsLoc = parser.getCurrentLocation();
2406 if (parser.parseOperand(lhsRawOperand))
2407 return ::mlir::failure();
2408 if (parser.parseComma())
2409 return ::mlir::failure();
2411 rhsOperandsLoc = parser.getCurrentLocation();
2412 if (parser.parseOperand(rhsRawOperand))
2413 return ::mlir::failure();
2415 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
2416 if (odsResult) return ::mlir::failure();
2419 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
2420 if (odsResult) return ::mlir::failure();
2423 auto loc = parser.getCurrentLocation();(void)loc;
2424 if (parser.parseOptionalAttrDict(result.attributes))
2425 return ::mlir::failure();
2428 result.addTypes(odsBuildableType0);
2429 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
2430 return ::mlir::failure();
2431 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
2432 return ::mlir::failure();
2433 return ::mlir::success();
2442 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
2443 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
2444 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2445 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2448void ShrFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
2467 return ::mlir::success();
2470void SubFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
2471 odsState.addOperands(lhs);
2472 odsState.addOperands(rhs);
2473 odsState.addTypes(result);
2476void SubFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
2477 odsState.addOperands(lhs);
2478 odsState.addOperands(rhs);
2480 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2482 odsState.location, odsState.operands,
2483 odsState.attributes.getDictionary(odsState.getContext()),
2484 odsState.getRawProperties(),
2485 odsState.regions, inferredReturnTypes)))
2486 odsState.addTypes(inferredReturnTypes);
2488 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
2492void SubFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
2493 odsState.addOperands(lhs);
2494 odsState.addOperands(rhs);
2495 assert(resultTypes.size() == 1u &&
"mismatched number of results");
2496 odsState.addTypes(resultTypes);
2499void SubFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2500 assert(operands.size() == 2u &&
"mismatched number of parameters");
2501 odsState.addOperands(operands);
2502 odsState.addAttributes(attributes);
2503 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
2504 odsState.addTypes(resultTypes);
2507void SubFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2508 assert(operands.size() == 2u &&
"mismatched number of parameters");
2509 odsState.addOperands(operands);
2510 odsState.addAttributes(attributes);
2512 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2514 odsState.location, operands,
2515 odsState.attributes.getDictionary(odsState.getContext()),
2516 odsState.getRawProperties(),
2517 odsState.regions, inferredReturnTypes))) {
2518 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
2519 odsState.addTypes(inferredReturnTypes);
2521 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
2527 unsigned index = 0; (void)index;
2530 for (
auto v : valueGroup0) {
2531 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
2532 return ::mlir::failure();
2536 for (
auto v : valueGroup1) {
2537 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
2538 return ::mlir::failure();
2542 unsigned index = 0; (void)index;
2545 for (
auto v : valueGroup0) {
2546 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
2547 return ::mlir::failure();
2551 return emitOpError(
"failed to verify that result type matches with lhs type");
2553 return emitOpError(
"failed to verify that result type matches with rhs type");
2554 return ::mlir::success();
2561::llvm::LogicalResult
SubFeltOp::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) {
2562 inferredReturnTypes.resize(1);
2563 ::mlir::Builder odsBuilder(context);
2565 inferredReturnTypes[0] = odsInferredType0;
2566 return ::mlir::success();
2569::mlir::ParseResult
SubFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2570 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
2571 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
2572 (void)lhsOperandsLoc;
2573 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
2574 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
2575 (void)rhsOperandsLoc;
2576 ::mlir::Type lhsRawType{};
2577 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
2578 ::mlir::Type rhsRawType{};
2579 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
2581 lhsOperandsLoc = parser.getCurrentLocation();
2582 if (parser.parseOperand(lhsRawOperand))
2583 return ::mlir::failure();
2584 if (parser.parseComma())
2585 return ::mlir::failure();
2587 rhsOperandsLoc = parser.getCurrentLocation();
2588 if (parser.parseOperand(rhsRawOperand))
2589 return ::mlir::failure();
2591 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
2592 if (odsResult) return ::mlir::failure();
2595 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
2596 if (odsResult) return ::mlir::failure();
2599 auto loc = parser.getCurrentLocation();(void)loc;
2600 if (parser.parseOptionalAttrDict(result.attributes))
2601 return ::mlir::failure();
2604 result.addTypes(odsBuildableType0);
2605 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
2606 return ::mlir::failure();
2607 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
2608 return ::mlir::failure();
2609 return ::mlir::success();
2618 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
2619 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
2620 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2621 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2624void SubFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
2643 return ::mlir::success();
2646void XorFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
2647 odsState.addOperands(lhs);
2648 odsState.addOperands(rhs);
2649 odsState.addTypes(result);
2652void XorFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
2653 odsState.addOperands(lhs);
2654 odsState.addOperands(rhs);
2656 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2658 odsState.location, odsState.operands,
2659 odsState.attributes.getDictionary(odsState.getContext()),
2660 odsState.getRawProperties(),
2661 odsState.regions, inferredReturnTypes)))
2662 odsState.addTypes(inferredReturnTypes);
2664 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
2668void XorFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
2669 odsState.addOperands(lhs);
2670 odsState.addOperands(rhs);
2671 assert(resultTypes.size() == 1u &&
"mismatched number of results");
2672 odsState.addTypes(resultTypes);
2675void XorFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2676 assert(operands.size() == 2u &&
"mismatched number of parameters");
2677 odsState.addOperands(operands);
2678 odsState.addAttributes(attributes);
2679 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
2680 odsState.addTypes(resultTypes);
2683void XorFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2684 assert(operands.size() == 2u &&
"mismatched number of parameters");
2685 odsState.addOperands(operands);
2686 odsState.addAttributes(attributes);
2688 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2690 odsState.location, operands,
2691 odsState.attributes.getDictionary(odsState.getContext()),
2692 odsState.getRawProperties(),
2693 odsState.regions, inferredReturnTypes))) {
2694 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
2695 odsState.addTypes(inferredReturnTypes);
2697 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
2703 unsigned index = 0; (void)index;
2706 for (
auto v : valueGroup0) {
2707 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
2708 return ::mlir::failure();
2712 for (
auto v : valueGroup1) {
2713 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
2714 return ::mlir::failure();
2718 unsigned index = 0; (void)index;
2721 for (
auto v : valueGroup0) {
2722 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
2723 return ::mlir::failure();
2727 return emitOpError(
"failed to verify that result type matches with lhs type");
2729 return emitOpError(
"failed to verify that result type matches with rhs type");
2730 return ::mlir::success();
2737::llvm::LogicalResult
XorFeltOp::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) {
2738 inferredReturnTypes.resize(1);
2739 ::mlir::Builder odsBuilder(context);
2741 inferredReturnTypes[0] = odsInferredType0;
2742 return ::mlir::success();
2745::mlir::ParseResult
XorFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2746 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
2747 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
2748 (void)lhsOperandsLoc;
2749 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
2750 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
2751 (void)rhsOperandsLoc;
2752 ::mlir::Type lhsRawType{};
2753 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
2754 ::mlir::Type rhsRawType{};
2755 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
2757 lhsOperandsLoc = parser.getCurrentLocation();
2758 if (parser.parseOperand(lhsRawOperand))
2759 return ::mlir::failure();
2760 if (parser.parseComma())
2761 return ::mlir::failure();
2763 rhsOperandsLoc = parser.getCurrentLocation();
2764 if (parser.parseOperand(rhsRawOperand))
2765 return ::mlir::failure();
2767 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
2768 if (odsResult) return ::mlir::failure();
2771 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
2772 if (odsResult) return ::mlir::failure();
2775 auto loc = parser.getCurrentLocation();(void)loc;
2776 if (parser.parseOptionalAttrDict(result.attributes))
2777 return ::mlir::failure();
2780 result.addTypes(odsBuildableType0);
2781 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
2782 return ::mlir::failure();
2783 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
2784 return ::mlir::failure();
2785 return ::mlir::success();
2794 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
2795 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
2796 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2797 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2800void XorFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
::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()
::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)
::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)
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 verifyInvariantsImpl()
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)
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()
::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()
::mlir::TypedValue<::mlir::Type > getLhs()
::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 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 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)
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()
::llvm::LogicalResult verify(::mlir::Location loc)
FeltNonDetOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
FeltNonDetOpAdaptor(FeltNonDetOp op)
::mlir::ValueRange getOperands()
::llvm::LogicalResult verifyInvariantsImpl()
void print(::mlir::OpAsmPrinter &_odsPrinter)
::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)
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)
::llvm::LogicalResult verifyInvariants()
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 void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value operand)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::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)
ModFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
ModFeltOpAdaptor(ModFeltOp op)
::mlir::ValueRange getOperands()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::Operation::operand_range getODSOperands(unsigned index)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::Operation::result_range getODSResults(unsigned index)
::mlir::TypedValue<::mlir::Type > getLhs()
::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::TypedValue<::mlir::Type > getRhs()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::llvm::LogicalResult verifyInvariants()
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)
::mlir::TypedValue<::mlir::Type > getLhs()
::llvm::LogicalResult verifyInvariantsImpl()
::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)
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()
::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()
::mlir::Operation::result_range getODSResults(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)
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 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)
::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)
void print(::mlir::OpAsmPrinter &_odsPrinter)
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 void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
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::Operation::operand_range getODSOperands(unsigned index)
::llvm::LogicalResult verifyInvariants()
::mlir::TypedValue<::mlir::Type > getRhs()
::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)
::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)
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()
::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 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()
::mlir::TypedValue<::mlir::Type > getRhs()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
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 verifyInvariantsImpl()
::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)
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
::mlir::Operation::result_range getODSResults(unsigned index)
::llvm::LogicalResult verifyInvariantsImpl()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
::mlir::TypedValue<::mlir::Type > getLhs()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
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()
::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)
::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 verifyInvariants()
::mlir::TypedValue<::mlir::Type > getLhs()
::mlir::Operation::operand_range getODSOperands(unsigned index)
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()
::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)
::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)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::TypedValue<::mlir::Type > getRhs()
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
const Properties & getProperties()
bool typesUnify(Type lhs, Type rhs, ArrayRef< StringRef > rhsReversePrefix, UnificationMap *unifications)