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) {
56 return op->emitOpError(valueKind) <<
" #" << valueIndex
57 <<
" must be a valid LLZK type, 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();
91 return ::mlir::success();
95 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
97 emitError() <<
"expected DictionaryAttr to set properties";
98 return ::mlir::failure();
100 return ::mlir::success();
104 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
105 ::mlir::Builder odsBuilder{ctx};
108 return odsBuilder.getDictionaryAttr(attrs);
113 using llvm::hash_value;
114 return llvm::hash_combine();
127::llvm::LogicalResult
AddFeltOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
128 return ::mlir::success();
131void AddFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
132 odsState.addOperands(lhs);
133 odsState.addOperands(rhs);
134 odsState.addTypes(result);
137AddFeltOp AddFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
139 build(builder, __state__, std::forward<
decltype(result)>(result), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
140 auto __res__ = ::llvm::dyn_cast<AddFeltOp>(builder.create(__state__));
141 assert(__res__ &&
"builder didn't return the right type");
146 return create(builder, builder.getLoc(), std::forward<
decltype(result)>(result), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
149void AddFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
150 odsState.addOperands(lhs);
151 odsState.addOperands(rhs);
153 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
155 odsState.location, odsState.operands,
156 odsState.attributes.getDictionary(odsState.getContext()),
157 odsState.getRawProperties(),
158 odsState.regions, inferredReturnTypes)))
159 odsState.addTypes(inferredReturnTypes);
161 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
167 build(builder, __state__, std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
168 auto __res__ = ::llvm::dyn_cast<AddFeltOp>(builder.create(__state__));
169 assert(__res__ &&
"builder didn't return the right type");
174 return create(builder, builder.getLoc(), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
177void AddFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
178 odsState.addOperands(lhs);
179 odsState.addOperands(rhs);
180 assert(resultTypes.size() == 1u &&
"mismatched number of results");
181 odsState.addTypes(resultTypes);
184AddFeltOp AddFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
186 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
187 auto __res__ = ::llvm::dyn_cast<AddFeltOp>(builder.create(__state__));
188 assert(__res__ &&
"builder didn't return the right type");
193 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
196void AddFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
197 assert(operands.size() == 2u &&
"mismatched number of parameters");
198 odsState.addOperands(operands);
199 odsState.addAttributes(attributes);
200 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
201 odsState.addTypes(resultTypes);
204AddFeltOp AddFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
206 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
207 auto __res__ = ::llvm::dyn_cast<AddFeltOp>(builder.create(__state__));
208 assert(__res__ &&
"builder didn't return the right type");
212AddFeltOp AddFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
213 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
216void AddFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
217 assert(operands.size() == 2u &&
"mismatched number of parameters");
218 odsState.addOperands(operands);
219 odsState.addAttributes(attributes);
221 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
223 odsState.location, operands,
224 odsState.attributes.getDictionary(odsState.getContext()),
225 odsState.getRawProperties(),
226 odsState.regions, inferredReturnTypes))) {
227 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
228 odsState.addTypes(inferredReturnTypes);
230 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
234AddFeltOp AddFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
236 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
237 auto __res__ = ::llvm::dyn_cast<AddFeltOp>(builder.create(__state__));
238 assert(__res__ &&
"builder didn't return the right type");
242AddFeltOp AddFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
243 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
246void AddFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
247 assert(operands.size() == 2u &&
"mismatched number of parameters");
248 odsState.addOperands(operands);
249 odsState.useProperties(
const_cast<Properties&
>(properties));
250 odsState.addAttributes(discardableAttributes);
251 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
252 odsState.addTypes(resultTypes);
255AddFeltOp AddFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
257 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
258 auto __res__ = ::llvm::dyn_cast<AddFeltOp>(builder.create(__state__));
259 assert(__res__ &&
"builder didn't return the right type");
263AddFeltOp AddFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
264 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
267void AddFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
268 assert(operands.size() == 2u &&
"mismatched number of parameters");
269 odsState.addOperands(operands);
270 odsState.useProperties(
const_cast<Properties &
>(properties));
271 odsState.addAttributes(discardableAttributes);
273 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
275 odsState.location, operands,
276 odsState.attributes.getDictionary(odsState.getContext()),
277 odsState.getRawProperties(),
278 odsState.regions, inferredReturnTypes))) {
279 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
280 odsState.addTypes(inferredReturnTypes);
282 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
286AddFeltOp AddFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
288 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
289 auto __res__ = ::llvm::dyn_cast<AddFeltOp>(builder.create(__state__));
290 assert(__res__ &&
"builder didn't return the right type");
295 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
300 unsigned index = 0; (void)index;
303 for (
auto v : valueGroup0) {
304 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
305 return ::mlir::failure();
309 for (
auto v : valueGroup1) {
310 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
311 return ::mlir::failure();
315 unsigned index = 0; (void)index;
318 for (
auto v : valueGroup0) {
319 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
320 return ::mlir::failure();
324 return emitOpError(
"failed to verify that rhs type matches with lhs type");
326 return emitOpError(
"failed to verify that result type matches with lhs type");
328 return emitOpError(
"failed to verify that result type matches with rhs type");
329 return ::mlir::success();
336::mlir::ParseResult
AddFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
337 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
338 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
339 (void)lhsOperandsLoc;
340 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
341 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
342 (void)rhsOperandsLoc;
343 ::mlir::Type lhsRawType{};
344 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
345 ::mlir::Type rhsRawType{};
346 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
348 lhsOperandsLoc = parser.getCurrentLocation();
349 if (parser.parseOperand(lhsRawOperand))
350 return ::mlir::failure();
351 if (parser.parseComma())
352 return ::mlir::failure();
354 rhsOperandsLoc = parser.getCurrentLocation();
355 if (parser.parseOperand(rhsRawOperand))
356 return ::mlir::failure();
358 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
359 if (odsResult) return ::mlir::failure();
362 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
363 if (odsResult) return ::mlir::failure();
366 auto loc = parser.getCurrentLocation();(void)loc;
367 if (parser.parseOptionalAttrDict(result.attributes))
368 return ::mlir::failure();
370 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
372 return ::mlir::failure();
374 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
375 return ::mlir::failure();
376 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
377 return ::mlir::failure();
379 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
381 result.location, result.operands,
382 result.attributes.getDictionary(parser.getContext()),
383 result.getRawProperties(),
384 result.regions, inferredReturnTypes)))
385 return ::mlir::failure();
386 result.addTypes(inferredReturnTypes);
387 return ::mlir::success();
396 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
397 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
398 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
399 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
402void AddFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
405 ::llvm::LogicalResult
407 std::optional<::mlir::Location> location,
408 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
409 ::mlir::PropertyRef properties, ::mlir::RegionRange regions,
410 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
413 location, adaptor, inferredReturnTypes);
418 mlir::MLIRContext *context, std::optional<mlir::Location> loc, Adaptor adaptor,
419 llvm::SmallVectorImpl<mlir::Type> &inferred
422 auto value = adaptor.getLhs();
423 inferred[0] = value ? value.getType() :
FeltType::get(context, mlir::StringAttr());
424 return mlir::success();
450 return ::mlir::success();
454 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
456 emitError() <<
"expected DictionaryAttr to set properties";
457 return ::mlir::failure();
459 return ::mlir::success();
463 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
464 ::mlir::Builder odsBuilder{ctx};
467 return odsBuilder.getDictionaryAttr(attrs);
472 using llvm::hash_value;
473 return llvm::hash_combine();
486::llvm::LogicalResult
AndFeltOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
487 return ::mlir::success();
490void AndFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
491 odsState.addOperands(lhs);
492 odsState.addOperands(rhs);
493 odsState.addTypes(result);
496AndFeltOp AndFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
498 build(builder, __state__, std::forward<
decltype(result)>(result), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
499 auto __res__ = ::llvm::dyn_cast<AndFeltOp>(builder.create(__state__));
500 assert(__res__ &&
"builder didn't return the right type");
505 return create(builder, builder.getLoc(), std::forward<
decltype(result)>(result), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
508void AndFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
509 odsState.addOperands(lhs);
510 odsState.addOperands(rhs);
512 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
514 odsState.location, odsState.operands,
515 odsState.attributes.getDictionary(odsState.getContext()),
516 odsState.getRawProperties(),
517 odsState.regions, inferredReturnTypes)))
518 odsState.addTypes(inferredReturnTypes);
520 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
526 build(builder, __state__, std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
527 auto __res__ = ::llvm::dyn_cast<AndFeltOp>(builder.create(__state__));
528 assert(__res__ &&
"builder didn't return the right type");
533 return create(builder, builder.getLoc(), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
536void AndFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
537 odsState.addOperands(lhs);
538 odsState.addOperands(rhs);
539 assert(resultTypes.size() == 1u &&
"mismatched number of results");
540 odsState.addTypes(resultTypes);
543AndFeltOp AndFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
545 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
546 auto __res__ = ::llvm::dyn_cast<AndFeltOp>(builder.create(__state__));
547 assert(__res__ &&
"builder didn't return the right type");
552 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
555void AndFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
556 assert(operands.size() == 2u &&
"mismatched number of parameters");
557 odsState.addOperands(operands);
558 odsState.addAttributes(attributes);
559 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
560 odsState.addTypes(resultTypes);
563AndFeltOp AndFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
565 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
566 auto __res__ = ::llvm::dyn_cast<AndFeltOp>(builder.create(__state__));
567 assert(__res__ &&
"builder didn't return the right type");
571AndFeltOp AndFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
572 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
575void AndFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
576 assert(operands.size() == 2u &&
"mismatched number of parameters");
577 odsState.addOperands(operands);
578 odsState.addAttributes(attributes);
580 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
582 odsState.location, operands,
583 odsState.attributes.getDictionary(odsState.getContext()),
584 odsState.getRawProperties(),
585 odsState.regions, inferredReturnTypes))) {
586 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
587 odsState.addTypes(inferredReturnTypes);
589 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
593AndFeltOp AndFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
595 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
596 auto __res__ = ::llvm::dyn_cast<AndFeltOp>(builder.create(__state__));
597 assert(__res__ &&
"builder didn't return the right type");
601AndFeltOp AndFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
602 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
605void AndFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
606 assert(operands.size() == 2u &&
"mismatched number of parameters");
607 odsState.addOperands(operands);
608 odsState.useProperties(
const_cast<Properties&
>(properties));
609 odsState.addAttributes(discardableAttributes);
610 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
611 odsState.addTypes(resultTypes);
614AndFeltOp AndFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
616 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
617 auto __res__ = ::llvm::dyn_cast<AndFeltOp>(builder.create(__state__));
618 assert(__res__ &&
"builder didn't return the right type");
622AndFeltOp AndFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
623 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
626void AndFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
627 assert(operands.size() == 2u &&
"mismatched number of parameters");
628 odsState.addOperands(operands);
629 odsState.useProperties(
const_cast<Properties &
>(properties));
630 odsState.addAttributes(discardableAttributes);
632 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
634 odsState.location, operands,
635 odsState.attributes.getDictionary(odsState.getContext()),
636 odsState.getRawProperties(),
637 odsState.regions, inferredReturnTypes))) {
638 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
639 odsState.addTypes(inferredReturnTypes);
641 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
645AndFeltOp AndFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
647 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
648 auto __res__ = ::llvm::dyn_cast<AndFeltOp>(builder.create(__state__));
649 assert(__res__ &&
"builder didn't return the right type");
654 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
659 unsigned index = 0; (void)index;
662 for (
auto v : valueGroup0) {
663 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
664 return ::mlir::failure();
668 for (
auto v : valueGroup1) {
669 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
670 return ::mlir::failure();
674 unsigned index = 0; (void)index;
677 for (
auto v : valueGroup0) {
678 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
679 return ::mlir::failure();
683 return emitOpError(
"failed to verify that rhs type matches with lhs type");
685 return emitOpError(
"failed to verify that result type matches with lhs type");
687 return emitOpError(
"failed to verify that result type matches with rhs type");
688 return ::mlir::success();
695::mlir::ParseResult
AndFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
696 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
697 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
698 (void)lhsOperandsLoc;
699 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
700 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
701 (void)rhsOperandsLoc;
702 ::mlir::Type lhsRawType{};
703 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
704 ::mlir::Type rhsRawType{};
705 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
707 lhsOperandsLoc = parser.getCurrentLocation();
708 if (parser.parseOperand(lhsRawOperand))
709 return ::mlir::failure();
710 if (parser.parseComma())
711 return ::mlir::failure();
713 rhsOperandsLoc = parser.getCurrentLocation();
714 if (parser.parseOperand(rhsRawOperand))
715 return ::mlir::failure();
717 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
718 if (odsResult) return ::mlir::failure();
721 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
722 if (odsResult) return ::mlir::failure();
725 auto loc = parser.getCurrentLocation();(void)loc;
726 if (parser.parseOptionalAttrDict(result.attributes))
727 return ::mlir::failure();
729 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
731 return ::mlir::failure();
733 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
734 return ::mlir::failure();
735 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
736 return ::mlir::failure();
738 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
740 result.location, result.operands,
741 result.attributes.getDictionary(parser.getContext()),
742 result.getRawProperties(),
743 result.regions, inferredReturnTypes)))
744 return ::mlir::failure();
745 result.addTypes(inferredReturnTypes);
746 return ::mlir::success();
755 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
756 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
757 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
758 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
761void AndFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
764 ::llvm::LogicalResult
766 std::optional<::mlir::Location> location,
767 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
768 ::mlir::PropertyRef properties, ::mlir::RegionRange regions,
769 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
772 location, adaptor, inferredReturnTypes);
777 mlir::MLIRContext *context, std::optional<mlir::Location> loc, Adaptor adaptor,
778 llvm::SmallVectorImpl<mlir::Type> &inferred
781 auto value = adaptor.getLhs();
782 inferred[0] = value ? value.getType() :
FeltType::get(context, mlir::StringAttr());
783 return mlir::success();
809 return ::mlir::success();
813 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
815 emitError() <<
"expected DictionaryAttr to set properties";
816 return ::mlir::failure();
818 return ::mlir::success();
822 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
823 ::mlir::Builder odsBuilder{ctx};
826 return odsBuilder.getDictionaryAttr(attrs);
831 using llvm::hash_value;
832 return llvm::hash_combine();
845::llvm::LogicalResult
DivFeltOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
846 return ::mlir::success();
849void DivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
850 odsState.addOperands(lhs);
851 odsState.addOperands(rhs);
852 odsState.addTypes(result);
855DivFeltOp DivFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
857 build(builder, __state__, std::forward<
decltype(result)>(result), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
858 auto __res__ = ::llvm::dyn_cast<DivFeltOp>(builder.create(__state__));
859 assert(__res__ &&
"builder didn't return the right type");
864 return create(builder, builder.getLoc(), std::forward<
decltype(result)>(result), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
867void DivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
868 odsState.addOperands(lhs);
869 odsState.addOperands(rhs);
871 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
873 odsState.location, odsState.operands,
874 odsState.attributes.getDictionary(odsState.getContext()),
875 odsState.getRawProperties(),
876 odsState.regions, inferredReturnTypes)))
877 odsState.addTypes(inferredReturnTypes);
879 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
885 build(builder, __state__, std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
886 auto __res__ = ::llvm::dyn_cast<DivFeltOp>(builder.create(__state__));
887 assert(__res__ &&
"builder didn't return the right type");
892 return create(builder, builder.getLoc(), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
895void DivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
896 odsState.addOperands(lhs);
897 odsState.addOperands(rhs);
898 assert(resultTypes.size() == 1u &&
"mismatched number of results");
899 odsState.addTypes(resultTypes);
902DivFeltOp DivFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
904 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
905 auto __res__ = ::llvm::dyn_cast<DivFeltOp>(builder.create(__state__));
906 assert(__res__ &&
"builder didn't return the right type");
911 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
914void DivFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
915 assert(operands.size() == 2u &&
"mismatched number of parameters");
916 odsState.addOperands(operands);
917 odsState.addAttributes(attributes);
918 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
919 odsState.addTypes(resultTypes);
922DivFeltOp DivFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
924 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
925 auto __res__ = ::llvm::dyn_cast<DivFeltOp>(builder.create(__state__));
926 assert(__res__ &&
"builder didn't return the right type");
930DivFeltOp DivFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
931 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
934void DivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
935 assert(operands.size() == 2u &&
"mismatched number of parameters");
936 odsState.addOperands(operands);
937 odsState.addAttributes(attributes);
939 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
941 odsState.location, operands,
942 odsState.attributes.getDictionary(odsState.getContext()),
943 odsState.getRawProperties(),
944 odsState.regions, inferredReturnTypes))) {
945 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
946 odsState.addTypes(inferredReturnTypes);
948 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
952DivFeltOp DivFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
954 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
955 auto __res__ = ::llvm::dyn_cast<DivFeltOp>(builder.create(__state__));
956 assert(__res__ &&
"builder didn't return the right type");
960DivFeltOp DivFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
961 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
964void DivFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
965 assert(operands.size() == 2u &&
"mismatched number of parameters");
966 odsState.addOperands(operands);
967 odsState.useProperties(
const_cast<Properties&
>(properties));
968 odsState.addAttributes(discardableAttributes);
969 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
970 odsState.addTypes(resultTypes);
973DivFeltOp DivFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
975 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
976 auto __res__ = ::llvm::dyn_cast<DivFeltOp>(builder.create(__state__));
977 assert(__res__ &&
"builder didn't return the right type");
981DivFeltOp DivFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
982 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
985void DivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
986 assert(operands.size() == 2u &&
"mismatched number of parameters");
987 odsState.addOperands(operands);
988 odsState.useProperties(
const_cast<Properties &
>(properties));
989 odsState.addAttributes(discardableAttributes);
991 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
993 odsState.location, operands,
994 odsState.attributes.getDictionary(odsState.getContext()),
995 odsState.getRawProperties(),
996 odsState.regions, inferredReturnTypes))) {
997 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
998 odsState.addTypes(inferredReturnTypes);
1000 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
1004DivFeltOp DivFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1006 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
1007 auto __res__ = ::llvm::dyn_cast<DivFeltOp>(builder.create(__state__));
1008 assert(__res__ &&
"builder didn't return the right type");
1013 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
1018 unsigned index = 0; (void)index;
1021 for (
auto v : valueGroup0) {
1022 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
1023 return ::mlir::failure();
1027 for (
auto v : valueGroup1) {
1028 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
1029 return ::mlir::failure();
1033 unsigned index = 0; (void)index;
1036 for (
auto v : valueGroup0) {
1037 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
1038 return ::mlir::failure();
1042 return emitOpError(
"failed to verify that rhs type matches with lhs type");
1044 return emitOpError(
"failed to verify that result type matches with lhs type");
1046 return emitOpError(
"failed to verify that result type matches with rhs type");
1047 return ::mlir::success();
1054::mlir::ParseResult
DivFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1055 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
1056 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
1057 (void)lhsOperandsLoc;
1058 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
1059 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
1060 (void)rhsOperandsLoc;
1061 ::mlir::Type lhsRawType{};
1062 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
1063 ::mlir::Type rhsRawType{};
1064 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
1066 lhsOperandsLoc = parser.getCurrentLocation();
1067 if (parser.parseOperand(lhsRawOperand))
1068 return ::mlir::failure();
1069 if (parser.parseComma())
1070 return ::mlir::failure();
1072 rhsOperandsLoc = parser.getCurrentLocation();
1073 if (parser.parseOperand(rhsRawOperand))
1074 return ::mlir::failure();
1076 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
1077 if (odsResult) return ::mlir::failure();
1080 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
1081 if (odsResult) return ::mlir::failure();
1084 auto loc = parser.getCurrentLocation();(void)loc;
1085 if (parser.parseOptionalAttrDict(result.attributes))
1086 return ::mlir::failure();
1088 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
1090 return ::mlir::failure();
1092 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
1093 return ::mlir::failure();
1094 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
1095 return ::mlir::failure();
1097 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
1099 result.location, result.operands,
1100 result.attributes.getDictionary(parser.getContext()),
1101 result.getRawProperties(),
1102 result.regions, inferredReturnTypes)))
1103 return ::mlir::failure();
1104 result.addTypes(inferredReturnTypes);
1105 return ::mlir::success();
1114 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
1115 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
1116 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1117 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1120void DivFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1123 ::llvm::LogicalResult
1125 std::optional<::mlir::Location> location,
1126 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
1127 ::mlir::PropertyRef properties, ::mlir::RegionRange regions,
1128 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
1131 location, adaptor, inferredReturnTypes);
1136 mlir::MLIRContext *context, std::optional<mlir::Location> loc, Adaptor adaptor,
1137 llvm::SmallVectorImpl<mlir::Type> &inferred
1140 auto value = adaptor.getLhs();
1141 inferred[0] = value ? value.getType() :
FeltType::get(context, mlir::StringAttr());
1142 return mlir::success();
1165 return ::llvm::cast<::llzk::felt::FeltConstAttr>(attr);
1174 if (!tblgen_value)
return emitError(loc,
"'felt.const' op requires attribute 'value'");
1176 if (tblgen_value && !((::llvm::isa<::llzk::felt::FeltConstAttr>(tblgen_value))))
1177 return emitError(loc,
"'felt.const' op attribute 'value' failed to satisfy constraint: finite field element");
1178 return ::mlir::success();
1182 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
1184 emitError() <<
"expected DictionaryAttr to set properties";
1185 return ::mlir::failure();
1189 auto &propStorage = prop.
value;
1190 auto attr = dict.get(
"value");
1192 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
1193 if (convertedAttr) {
1194 propStorage = convertedAttr;
1196 emitError() <<
"Invalid attribute `value` in property conversion: " << attr;
1197 return ::mlir::failure();
1201 return ::mlir::success();
1205 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
1206 ::mlir::Builder odsBuilder{ctx};
1209 const auto &propStorage = prop.
value;
1211 attrs.push_back(odsBuilder.getNamedAttr(
"value",
1216 return odsBuilder.getDictionaryAttr(attrs);
1221 using llvm::hash_value;
1222 return llvm::hash_combine(
1223 llvm::hash_value(prop.
value.getAsOpaquePointer()));
1227 if (name ==
"value")
1229 return std::nullopt;
1233 if (name ==
"value") {
1234 prop.
value = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
value)>>(value);
1240 if (prop.
value) attrs.append(
"value", prop.
value);
1246 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(attr,
"value", emitError)))
1247 return ::mlir::failure();
1249 return ::mlir::success();
1253 auto &prop = state.getOrAddProperties<
Properties>(); (void)prop;
1254 if (::mlir::failed(reader.readAttribute(prop.
value)))
1255 return ::mlir::failure();
1256 return ::mlir::success();
1260 auto &prop = getProperties(); (void)prop;
1261 writer.writeAttribute(prop.
value);
1266 return ::llvm::cast<::llzk::felt::FeltConstAttr>(attr);
1269void FeltConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::felt::FeltConstAttr value) {
1270 odsState.getOrAddProperties<
Properties>().value = value;
1271 odsState.addTypes(result);
1276 build(builder, __state__, std::forward<
decltype(result)>(result), std::forward<
decltype(value)>(value));
1277 auto __res__ = ::llvm::dyn_cast<FeltConstantOp>(builder.create(__state__));
1278 assert(__res__ &&
"builder didn't return the right type");
1283 return create(builder, builder.getLoc(), std::forward<
decltype(result)>(result), std::forward<
decltype(value)>(value));
1286void FeltConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::felt::FeltConstAttr value) {
1287 odsState.getOrAddProperties<
Properties>().value = value;
1289 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1291 odsState.location, odsState.operands,
1292 odsState.attributes.getDictionary(odsState.getContext()),
1293 odsState.getRawProperties(),
1294 odsState.regions, inferredReturnTypes)))
1295 odsState.addTypes(inferredReturnTypes);
1297 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1303 build(builder, __state__, std::forward<
decltype(value)>(value));
1304 auto __res__ = ::llvm::dyn_cast<FeltConstantOp>(builder.create(__state__));
1305 assert(__res__ &&
"builder didn't return the right type");
1310 return create(builder, builder.getLoc(), std::forward<
decltype(value)>(value));
1313void FeltConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llzk::felt::FeltConstAttr value) {
1314 odsState.getOrAddProperties<
Properties>().value = value;
1315 assert(resultTypes.size() == 1u &&
"mismatched number of results");
1316 odsState.addTypes(resultTypes);
1321 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(value)>(value));
1322 auto __res__ = ::llvm::dyn_cast<FeltConstantOp>(builder.create(__state__));
1323 assert(__res__ &&
"builder didn't return the right type");
1328 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(value)>(value));
1331void FeltConstantOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1332 assert(operands.size() == 0u &&
"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);
1338 if (!attributes.empty()) {
1340 ::mlir::PropertyRef properties = odsState.getRawProperties();
1341 std::optional<::mlir::RegisteredOperationName> info =
1342 odsState.name.getRegisteredInfo();
1343 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
1344 odsState.attributes.getDictionary(odsState.getContext()),
nullptr)))
1345 ::llvm::report_fatal_error(
"Property conversion failed.");
1349FeltConstantOp FeltConstantOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1351 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
1352 auto __res__ = ::llvm::dyn_cast<FeltConstantOp>(builder.create(__state__));
1353 assert(__res__ &&
"builder didn't return the right type");
1358 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
1361void FeltConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1362 assert(operands.size() == 0u &&
"mismatched number of parameters");
1363 odsState.addOperands(operands);
1364 odsState.addAttributes(attributes);
1366 if (!attributes.empty()) {
1368 ::mlir::PropertyRef properties = odsState.getRawProperties();
1369 std::optional<::mlir::RegisteredOperationName> info =
1370 odsState.name.getRegisteredInfo();
1371 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
1372 odsState.attributes.getDictionary(odsState.getContext()),
nullptr)))
1373 ::llvm::report_fatal_error(
"Property conversion failed.");
1375 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1377 odsState.location, operands,
1378 odsState.attributes.getDictionary(odsState.getContext()),
1379 odsState.getRawProperties(),
1380 odsState.regions, inferredReturnTypes))) {
1381 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
1382 odsState.addTypes(inferredReturnTypes);
1384 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
1390 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
1391 auto __res__ = ::llvm::dyn_cast<FeltConstantOp>(builder.create(__state__));
1392 assert(__res__ &&
"builder didn't return the right type");
1397 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
1400void FeltConstantOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1401 assert(operands.size() == 0u &&
"mismatched number of parameters");
1402 odsState.addOperands(operands);
1403 odsState.useProperties(
const_cast<Properties&
>(properties));
1404 odsState.addAttributes(discardableAttributes);
1405 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
1406 odsState.addTypes(resultTypes);
1409FeltConstantOp FeltConstantOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1411 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
1412 auto __res__ = ::llvm::dyn_cast<FeltConstantOp>(builder.create(__state__));
1413 assert(__res__ &&
"builder didn't return the right type");
1418 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
1421void FeltConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1422 assert(operands.size() == 0u &&
"mismatched number of parameters");
1423 odsState.addOperands(operands);
1424 odsState.useProperties(
const_cast<Properties &
>(properties));
1425 odsState.addAttributes(discardableAttributes);
1427 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1429 odsState.location, operands,
1430 odsState.attributes.getDictionary(odsState.getContext()),
1431 odsState.getRawProperties(),
1432 odsState.regions, inferredReturnTypes))) {
1433 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
1434 odsState.addTypes(inferredReturnTypes);
1436 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
1442 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
1443 auto __res__ = ::llvm::dyn_cast<FeltConstantOp>(builder.create(__state__));
1444 assert(__res__ &&
"builder didn't return the right type");
1449 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
1453 auto tblgen_value = getProperties().value; (void)tblgen_value;
1454 if (!tblgen_value)
return emitOpError(
"requires attribute 'value'");
1456 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(*
this, tblgen_value,
"value")))
1457 return ::mlir::failure();
1459 unsigned index = 0; (void)index;
1462 for (
auto v : valueGroup0) {
1463 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
1464 return ::mlir::failure();
1468 return emitOpError(
"failed to verify that result type matches with value type");
1469 return ::mlir::success();
1481 ::llzk::felt::FeltConstAttr valueAttr;
1483 if (parser.parseCustomAttributeWithFallback(valueAttr, ::mlir::Type{})) {
1484 return ::mlir::failure();
1488 auto loc = parser.getCurrentLocation();(void)loc;
1489 if (parser.parseOptionalAttrDict(result.attributes))
1490 return ::mlir::failure();
1492 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
1494 return ::mlir::failure();
1497 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
1499 result.location, result.operands,
1500 result.attributes.getDictionary(parser.getContext()),
1501 result.getRawProperties(),
1502 result.regions, inferredReturnTypes)))
1503 return ::mlir::failure();
1504 result.addTypes(inferredReturnTypes);
1505 return ::mlir::success();
1511 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1512 elidedAttrs.push_back(
"value");
1513 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1519::llvm::LogicalResult
1521 std::optional<::mlir::Location> location,
1522 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
1523 ::mlir::PropertyRef properties, ::mlir::RegionRange regions,
1524 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
1527 location, adaptor, inferredReturnTypes);
1551 return ::mlir::success();
1555 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
1557 emitError() <<
"expected DictionaryAttr to set properties";
1558 return ::mlir::failure();
1560 return ::mlir::success();
1564 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
1565 ::mlir::Builder odsBuilder{ctx};
1568 return odsBuilder.getDictionaryAttr(attrs);
1573 using llvm::hash_value;
1574 return llvm::hash_combine();
1578 return std::nullopt;
1587::llvm::LogicalResult
InvFeltOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1588 return ::mlir::success();
1591void InvFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value operand) {
1592 odsState.addOperands(operand);
1593 odsState.addTypes(result);
1598 build(builder, __state__, std::forward<
decltype(result)>(result), std::forward<
decltype(operand)>(operand));
1599 auto __res__ = ::llvm::dyn_cast<InvFeltOp>(builder.create(__state__));
1600 assert(__res__ &&
"builder didn't return the right type");
1605 return create(builder, builder.getLoc(), std::forward<
decltype(result)>(result), std::forward<
decltype(operand)>(operand));
1608void InvFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value operand) {
1609 odsState.addOperands(operand);
1611 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1613 odsState.location, odsState.operands,
1614 odsState.attributes.getDictionary(odsState.getContext()),
1615 odsState.getRawProperties(),
1616 odsState.regions, inferredReturnTypes)))
1617 odsState.addTypes(inferredReturnTypes);
1619 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1625 build(builder, __state__, std::forward<
decltype(operand)>(operand));
1626 auto __res__ = ::llvm::dyn_cast<InvFeltOp>(builder.create(__state__));
1627 assert(__res__ &&
"builder didn't return the right type");
1632 return create(builder, builder.getLoc(), std::forward<
decltype(operand)>(operand));
1635void InvFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value operand) {
1636 odsState.addOperands(operand);
1637 assert(resultTypes.size() == 1u &&
"mismatched number of results");
1638 odsState.addTypes(resultTypes);
1643 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operand)>(operand));
1644 auto __res__ = ::llvm::dyn_cast<InvFeltOp>(builder.create(__state__));
1645 assert(__res__ &&
"builder didn't return the right type");
1650 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operand)>(operand));
1653void InvFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1654 assert(operands.size() == 1u &&
"mismatched number of parameters");
1655 odsState.addOperands(operands);
1656 odsState.addAttributes(attributes);
1657 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
1658 odsState.addTypes(resultTypes);
1661InvFeltOp InvFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1663 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
1664 auto __res__ = ::llvm::dyn_cast<InvFeltOp>(builder.create(__state__));
1665 assert(__res__ &&
"builder didn't return the right type");
1669InvFeltOp InvFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1670 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
1673void InvFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1674 assert(operands.size() == 1u &&
"mismatched number of parameters");
1675 odsState.addOperands(operands);
1676 odsState.addAttributes(attributes);
1678 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1680 odsState.location, operands,
1681 odsState.attributes.getDictionary(odsState.getContext()),
1682 odsState.getRawProperties(),
1683 odsState.regions, inferredReturnTypes))) {
1684 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
1685 odsState.addTypes(inferredReturnTypes);
1687 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
1691InvFeltOp InvFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1693 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
1694 auto __res__ = ::llvm::dyn_cast<InvFeltOp>(builder.create(__state__));
1695 assert(__res__ &&
"builder didn't return the right type");
1699InvFeltOp InvFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1700 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
1703void InvFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1704 assert(operands.size() == 1u &&
"mismatched number of parameters");
1705 odsState.addOperands(operands);
1706 odsState.useProperties(
const_cast<Properties&
>(properties));
1707 odsState.addAttributes(discardableAttributes);
1708 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
1709 odsState.addTypes(resultTypes);
1712InvFeltOp InvFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1714 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
1715 auto __res__ = ::llvm::dyn_cast<InvFeltOp>(builder.create(__state__));
1716 assert(__res__ &&
"builder didn't return the right type");
1720InvFeltOp InvFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1721 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
1724void InvFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1725 assert(operands.size() == 1u &&
"mismatched number of parameters");
1726 odsState.addOperands(operands);
1727 odsState.useProperties(
const_cast<Properties &
>(properties));
1728 odsState.addAttributes(discardableAttributes);
1730 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1732 odsState.location, operands,
1733 odsState.attributes.getDictionary(odsState.getContext()),
1734 odsState.getRawProperties(),
1735 odsState.regions, inferredReturnTypes))) {
1736 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
1737 odsState.addTypes(inferredReturnTypes);
1739 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
1743InvFeltOp InvFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1745 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
1746 auto __res__ = ::llvm::dyn_cast<InvFeltOp>(builder.create(__state__));
1747 assert(__res__ &&
"builder didn't return the right type");
1752 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
1757 unsigned index = 0; (void)index;
1760 for (
auto v : valueGroup0) {
1761 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
1762 return ::mlir::failure();
1766 unsigned index = 0; (void)index;
1769 for (
auto v : valueGroup0) {
1770 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
1771 return ::mlir::failure();
1775 return emitOpError(
"failed to verify that result type matches with operand type");
1776 return ::mlir::success();
1783::mlir::ParseResult
InvFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1784 ::mlir::OpAsmParser::UnresolvedOperand operandRawOperand{};
1785 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> operandOperands(&operandRawOperand, 1); ::llvm::SMLoc operandOperandsLoc;
1786 (void)operandOperandsLoc;
1787 ::mlir::Type operandRawType{};
1788 ::llvm::ArrayRef<::mlir::Type> operandTypes(&operandRawType, 1);
1790 operandOperandsLoc = parser.getCurrentLocation();
1791 if (parser.parseOperand(operandRawOperand))
1792 return ::mlir::failure();
1794 auto odsResult = parseInferredOrParsedType(parser, operandRawType,
true);
1795 if (odsResult) return ::mlir::failure();
1798 auto loc = parser.getCurrentLocation();(void)loc;
1799 if (parser.parseOptionalAttrDict(result.attributes))
1800 return ::mlir::failure();
1802 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
1804 return ::mlir::failure();
1806 if (parser.resolveOperands(operandOperands, operandTypes, operandOperandsLoc, result.operands))
1807 return ::mlir::failure();
1809 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
1811 result.location, result.operands,
1812 result.attributes.getDictionary(parser.getContext()),
1813 result.getRawProperties(),
1814 result.regions, inferredReturnTypes)))
1815 return ::mlir::failure();
1816 result.addTypes(inferredReturnTypes);
1817 return ::mlir::success();
1823 printInferredOrParsedType(_odsPrinter, *
this,
getOperand().getType(),
true);
1824 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1825 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1828void InvFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1831 ::llvm::LogicalResult
1833 std::optional<::mlir::Location> location,
1834 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
1835 ::mlir::PropertyRef properties, ::mlir::RegionRange regions,
1836 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
1839 location, adaptor, inferredReturnTypes);
1844 mlir::MLIRContext *context, std::optional<mlir::Location> loc, Adaptor adaptor,
1845 llvm::SmallVectorImpl<mlir::Type> &inferred
1848 auto value = adaptor.getOperand();
1849 inferred[0] = value ? value.getType() :
FeltType::get(context, mlir::StringAttr());
1850 return mlir::success();
1876 return ::mlir::success();
1880 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
1882 emitError() <<
"expected DictionaryAttr to set properties";
1883 return ::mlir::failure();
1885 return ::mlir::success();
1889 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
1890 ::mlir::Builder odsBuilder{ctx};
1893 return odsBuilder.getDictionaryAttr(attrs);
1898 using llvm::hash_value;
1899 return llvm::hash_combine();
1903 return std::nullopt;
1912::llvm::LogicalResult
MulFeltOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1913 return ::mlir::success();
1916void MulFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
1917 odsState.addOperands(lhs);
1918 odsState.addOperands(rhs);
1919 odsState.addTypes(result);
1924 build(builder, __state__, std::forward<
decltype(result)>(result), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
1925 auto __res__ = ::llvm::dyn_cast<MulFeltOp>(builder.create(__state__));
1926 assert(__res__ &&
"builder didn't return the right type");
1931 return create(builder, builder.getLoc(), std::forward<
decltype(result)>(result), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
1934void MulFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
1935 odsState.addOperands(lhs);
1936 odsState.addOperands(rhs);
1938 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1940 odsState.location, odsState.operands,
1941 odsState.attributes.getDictionary(odsState.getContext()),
1942 odsState.getRawProperties(),
1943 odsState.regions, inferredReturnTypes)))
1944 odsState.addTypes(inferredReturnTypes);
1946 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1952 build(builder, __state__, std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
1953 auto __res__ = ::llvm::dyn_cast<MulFeltOp>(builder.create(__state__));
1954 assert(__res__ &&
"builder didn't return the right type");
1959 return create(builder, builder.getLoc(), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
1962void MulFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
1963 odsState.addOperands(lhs);
1964 odsState.addOperands(rhs);
1965 assert(resultTypes.size() == 1u &&
"mismatched number of results");
1966 odsState.addTypes(resultTypes);
1969MulFeltOp MulFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
1971 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
1972 auto __res__ = ::llvm::dyn_cast<MulFeltOp>(builder.create(__state__));
1973 assert(__res__ &&
"builder didn't return the right type");
1978 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
1981void MulFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1982 assert(operands.size() == 2u &&
"mismatched number of parameters");
1983 odsState.addOperands(operands);
1984 odsState.addAttributes(attributes);
1985 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
1986 odsState.addTypes(resultTypes);
1989MulFeltOp MulFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1991 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
1992 auto __res__ = ::llvm::dyn_cast<MulFeltOp>(builder.create(__state__));
1993 assert(__res__ &&
"builder didn't return the right type");
1997MulFeltOp MulFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1998 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
2001void MulFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2002 assert(operands.size() == 2u &&
"mismatched number of parameters");
2003 odsState.addOperands(operands);
2004 odsState.addAttributes(attributes);
2006 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2008 odsState.location, operands,
2009 odsState.attributes.getDictionary(odsState.getContext()),
2010 odsState.getRawProperties(),
2011 odsState.regions, inferredReturnTypes))) {
2012 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
2013 odsState.addTypes(inferredReturnTypes);
2015 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
2019MulFeltOp MulFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2021 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
2022 auto __res__ = ::llvm::dyn_cast<MulFeltOp>(builder.create(__state__));
2023 assert(__res__ &&
"builder didn't return the right type");
2027MulFeltOp MulFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2028 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
2031void MulFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
2032 assert(operands.size() == 2u &&
"mismatched number of parameters");
2033 odsState.addOperands(operands);
2034 odsState.useProperties(
const_cast<Properties&
>(properties));
2035 odsState.addAttributes(discardableAttributes);
2036 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
2037 odsState.addTypes(resultTypes);
2040MulFeltOp MulFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
2042 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
2043 auto __res__ = ::llvm::dyn_cast<MulFeltOp>(builder.create(__state__));
2044 assert(__res__ &&
"builder didn't return the right type");
2048MulFeltOp MulFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
2049 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
2052void MulFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
2053 assert(operands.size() == 2u &&
"mismatched number of parameters");
2054 odsState.addOperands(operands);
2055 odsState.useProperties(
const_cast<Properties &
>(properties));
2056 odsState.addAttributes(discardableAttributes);
2058 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2060 odsState.location, operands,
2061 odsState.attributes.getDictionary(odsState.getContext()),
2062 odsState.getRawProperties(),
2063 odsState.regions, inferredReturnTypes))) {
2064 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
2065 odsState.addTypes(inferredReturnTypes);
2067 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
2071MulFeltOp MulFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
2073 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
2074 auto __res__ = ::llvm::dyn_cast<MulFeltOp>(builder.create(__state__));
2075 assert(__res__ &&
"builder didn't return the right type");
2080 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
2085 unsigned index = 0; (void)index;
2088 for (
auto v : valueGroup0) {
2089 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
2090 return ::mlir::failure();
2094 for (
auto v : valueGroup1) {
2095 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
2096 return ::mlir::failure();
2100 unsigned index = 0; (void)index;
2103 for (
auto v : valueGroup0) {
2104 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
2105 return ::mlir::failure();
2109 return emitOpError(
"failed to verify that rhs type matches with lhs type");
2111 return emitOpError(
"failed to verify that result type matches with lhs type");
2113 return emitOpError(
"failed to verify that result type matches with rhs type");
2114 return ::mlir::success();
2121::mlir::ParseResult
MulFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2122 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
2123 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
2124 (void)lhsOperandsLoc;
2125 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
2126 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
2127 (void)rhsOperandsLoc;
2128 ::mlir::Type lhsRawType{};
2129 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
2130 ::mlir::Type rhsRawType{};
2131 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
2133 lhsOperandsLoc = parser.getCurrentLocation();
2134 if (parser.parseOperand(lhsRawOperand))
2135 return ::mlir::failure();
2136 if (parser.parseComma())
2137 return ::mlir::failure();
2139 rhsOperandsLoc = parser.getCurrentLocation();
2140 if (parser.parseOperand(rhsRawOperand))
2141 return ::mlir::failure();
2143 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
2144 if (odsResult) return ::mlir::failure();
2147 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
2148 if (odsResult) return ::mlir::failure();
2151 auto loc = parser.getCurrentLocation();(void)loc;
2152 if (parser.parseOptionalAttrDict(result.attributes))
2153 return ::mlir::failure();
2155 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
2157 return ::mlir::failure();
2159 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
2160 return ::mlir::failure();
2161 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
2162 return ::mlir::failure();
2164 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
2166 result.location, result.operands,
2167 result.attributes.getDictionary(parser.getContext()),
2168 result.getRawProperties(),
2169 result.regions, inferredReturnTypes)))
2170 return ::mlir::failure();
2171 result.addTypes(inferredReturnTypes);
2172 return ::mlir::success();
2181 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
2182 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
2183 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2184 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2187void MulFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
2190 ::llvm::LogicalResult
2192 std::optional<::mlir::Location> location,
2193 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
2194 ::mlir::PropertyRef properties, ::mlir::RegionRange regions,
2195 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
2198 location, adaptor, inferredReturnTypes);
2203 mlir::MLIRContext *context, std::optional<mlir::Location> loc, Adaptor adaptor,
2204 llvm::SmallVectorImpl<mlir::Type> &inferred
2207 auto value = adaptor.getLhs();
2208 inferred[0] = value ? value.getType() :
FeltType::get(context, mlir::StringAttr());
2209 return mlir::success();
2235 return ::mlir::success();
2239 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
2241 emitError() <<
"expected DictionaryAttr to set properties";
2242 return ::mlir::failure();
2244 return ::mlir::success();
2248 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
2249 ::mlir::Builder odsBuilder{ctx};
2252 return odsBuilder.getDictionaryAttr(attrs);
2257 using llvm::hash_value;
2258 return llvm::hash_combine();
2262 return std::nullopt;
2271::llvm::LogicalResult
NegFeltOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
2272 return ::mlir::success();
2275void NegFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value operand) {
2276 odsState.addOperands(operand);
2277 odsState.addTypes(result);
2282 build(builder, __state__, std::forward<
decltype(result)>(result), std::forward<
decltype(operand)>(operand));
2283 auto __res__ = ::llvm::dyn_cast<NegFeltOp>(builder.create(__state__));
2284 assert(__res__ &&
"builder didn't return the right type");
2289 return create(builder, builder.getLoc(), std::forward<
decltype(result)>(result), std::forward<
decltype(operand)>(operand));
2292void NegFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value operand) {
2293 odsState.addOperands(operand);
2295 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2297 odsState.location, odsState.operands,
2298 odsState.attributes.getDictionary(odsState.getContext()),
2299 odsState.getRawProperties(),
2300 odsState.regions, inferredReturnTypes)))
2301 odsState.addTypes(inferredReturnTypes);
2303 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
2309 build(builder, __state__, std::forward<
decltype(operand)>(operand));
2310 auto __res__ = ::llvm::dyn_cast<NegFeltOp>(builder.create(__state__));
2311 assert(__res__ &&
"builder didn't return the right type");
2316 return create(builder, builder.getLoc(), std::forward<
decltype(operand)>(operand));
2319void NegFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value operand) {
2320 odsState.addOperands(operand);
2321 assert(resultTypes.size() == 1u &&
"mismatched number of results");
2322 odsState.addTypes(resultTypes);
2327 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operand)>(operand));
2328 auto __res__ = ::llvm::dyn_cast<NegFeltOp>(builder.create(__state__));
2329 assert(__res__ &&
"builder didn't return the right type");
2334 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operand)>(operand));
2337void NegFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2338 assert(operands.size() == 1u &&
"mismatched number of parameters");
2339 odsState.addOperands(operands);
2340 odsState.addAttributes(attributes);
2341 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
2342 odsState.addTypes(resultTypes);
2345NegFeltOp NegFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2347 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
2348 auto __res__ = ::llvm::dyn_cast<NegFeltOp>(builder.create(__state__));
2349 assert(__res__ &&
"builder didn't return the right type");
2353NegFeltOp NegFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2354 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
2357void NegFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2358 assert(operands.size() == 1u &&
"mismatched number of parameters");
2359 odsState.addOperands(operands);
2360 odsState.addAttributes(attributes);
2362 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2364 odsState.location, operands,
2365 odsState.attributes.getDictionary(odsState.getContext()),
2366 odsState.getRawProperties(),
2367 odsState.regions, inferredReturnTypes))) {
2368 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
2369 odsState.addTypes(inferredReturnTypes);
2371 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
2375NegFeltOp NegFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2377 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
2378 auto __res__ = ::llvm::dyn_cast<NegFeltOp>(builder.create(__state__));
2379 assert(__res__ &&
"builder didn't return the right type");
2383NegFeltOp NegFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2384 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
2387void NegFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
2388 assert(operands.size() == 1u &&
"mismatched number of parameters");
2389 odsState.addOperands(operands);
2390 odsState.useProperties(
const_cast<Properties&
>(properties));
2391 odsState.addAttributes(discardableAttributes);
2392 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
2393 odsState.addTypes(resultTypes);
2396NegFeltOp NegFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
2398 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
2399 auto __res__ = ::llvm::dyn_cast<NegFeltOp>(builder.create(__state__));
2400 assert(__res__ &&
"builder didn't return the right type");
2404NegFeltOp NegFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
2405 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
2408void NegFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
2409 assert(operands.size() == 1u &&
"mismatched number of parameters");
2410 odsState.addOperands(operands);
2411 odsState.useProperties(
const_cast<Properties &
>(properties));
2412 odsState.addAttributes(discardableAttributes);
2414 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2416 odsState.location, operands,
2417 odsState.attributes.getDictionary(odsState.getContext()),
2418 odsState.getRawProperties(),
2419 odsState.regions, inferredReturnTypes))) {
2420 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
2421 odsState.addTypes(inferredReturnTypes);
2423 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
2427NegFeltOp NegFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
2429 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
2430 auto __res__ = ::llvm::dyn_cast<NegFeltOp>(builder.create(__state__));
2431 assert(__res__ &&
"builder didn't return the right type");
2436 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
2441 unsigned index = 0; (void)index;
2444 for (
auto v : valueGroup0) {
2445 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
2446 return ::mlir::failure();
2450 unsigned index = 0; (void)index;
2453 for (
auto v : valueGroup0) {
2454 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
2455 return ::mlir::failure();
2459 return emitOpError(
"failed to verify that result type matches with operand type");
2460 return ::mlir::success();
2467::mlir::ParseResult
NegFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2468 ::mlir::OpAsmParser::UnresolvedOperand operandRawOperand{};
2469 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> operandOperands(&operandRawOperand, 1); ::llvm::SMLoc operandOperandsLoc;
2470 (void)operandOperandsLoc;
2471 ::mlir::Type operandRawType{};
2472 ::llvm::ArrayRef<::mlir::Type> operandTypes(&operandRawType, 1);
2474 operandOperandsLoc = parser.getCurrentLocation();
2475 if (parser.parseOperand(operandRawOperand))
2476 return ::mlir::failure();
2478 auto odsResult = parseInferredOrParsedType(parser, operandRawType,
true);
2479 if (odsResult) return ::mlir::failure();
2482 auto loc = parser.getCurrentLocation();(void)loc;
2483 if (parser.parseOptionalAttrDict(result.attributes))
2484 return ::mlir::failure();
2486 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
2488 return ::mlir::failure();
2490 if (parser.resolveOperands(operandOperands, operandTypes, operandOperandsLoc, result.operands))
2491 return ::mlir::failure();
2493 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
2495 result.location, result.operands,
2496 result.attributes.getDictionary(parser.getContext()),
2497 result.getRawProperties(),
2498 result.regions, inferredReturnTypes)))
2499 return ::mlir::failure();
2500 result.addTypes(inferredReturnTypes);
2501 return ::mlir::success();
2507 printInferredOrParsedType(_odsPrinter, *
this,
getOperand().getType(),
true);
2508 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2509 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2512void NegFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
2515 ::llvm::LogicalResult
2517 std::optional<::mlir::Location> location,
2518 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
2519 ::mlir::PropertyRef properties, ::mlir::RegionRange regions,
2520 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
2523 location, adaptor, inferredReturnTypes);
2528 mlir::MLIRContext *context, std::optional<mlir::Location> loc, Adaptor adaptor,
2529 llvm::SmallVectorImpl<mlir::Type> &inferred
2532 auto value = adaptor.getOperand();
2533 inferred[0] = value ? value.getType() :
FeltType::get(context, mlir::StringAttr());
2534 return mlir::success();
2560 return ::mlir::success();
2564 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
2566 emitError() <<
"expected DictionaryAttr to set properties";
2567 return ::mlir::failure();
2569 return ::mlir::success();
2573 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
2574 ::mlir::Builder odsBuilder{ctx};
2577 return odsBuilder.getDictionaryAttr(attrs);
2582 using llvm::hash_value;
2583 return llvm::hash_combine();
2587 return std::nullopt;
2596::llvm::LogicalResult
NotFeltOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
2597 return ::mlir::success();
2600void NotFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value operand) {
2601 odsState.addOperands(operand);
2602 odsState.addTypes(result);
2607 build(builder, __state__, std::forward<
decltype(result)>(result), std::forward<
decltype(operand)>(operand));
2608 auto __res__ = ::llvm::dyn_cast<NotFeltOp>(builder.create(__state__));
2609 assert(__res__ &&
"builder didn't return the right type");
2614 return create(builder, builder.getLoc(), std::forward<
decltype(result)>(result), std::forward<
decltype(operand)>(operand));
2617void NotFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value operand) {
2618 odsState.addOperands(operand);
2620 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2622 odsState.location, odsState.operands,
2623 odsState.attributes.getDictionary(odsState.getContext()),
2624 odsState.getRawProperties(),
2625 odsState.regions, inferredReturnTypes)))
2626 odsState.addTypes(inferredReturnTypes);
2628 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
2634 build(builder, __state__, std::forward<
decltype(operand)>(operand));
2635 auto __res__ = ::llvm::dyn_cast<NotFeltOp>(builder.create(__state__));
2636 assert(__res__ &&
"builder didn't return the right type");
2641 return create(builder, builder.getLoc(), std::forward<
decltype(operand)>(operand));
2644void NotFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value operand) {
2645 odsState.addOperands(operand);
2646 assert(resultTypes.size() == 1u &&
"mismatched number of results");
2647 odsState.addTypes(resultTypes);
2652 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operand)>(operand));
2653 auto __res__ = ::llvm::dyn_cast<NotFeltOp>(builder.create(__state__));
2654 assert(__res__ &&
"builder didn't return the right type");
2659 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operand)>(operand));
2662void NotFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2663 assert(operands.size() == 1u &&
"mismatched number of parameters");
2664 odsState.addOperands(operands);
2665 odsState.addAttributes(attributes);
2666 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
2667 odsState.addTypes(resultTypes);
2670NotFeltOp NotFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2672 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
2673 auto __res__ = ::llvm::dyn_cast<NotFeltOp>(builder.create(__state__));
2674 assert(__res__ &&
"builder didn't return the right type");
2678NotFeltOp NotFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2679 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
2682void NotFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2683 assert(operands.size() == 1u &&
"mismatched number of parameters");
2684 odsState.addOperands(operands);
2685 odsState.addAttributes(attributes);
2687 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2689 odsState.location, operands,
2690 odsState.attributes.getDictionary(odsState.getContext()),
2691 odsState.getRawProperties(),
2692 odsState.regions, inferredReturnTypes))) {
2693 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
2694 odsState.addTypes(inferredReturnTypes);
2696 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
2700NotFeltOp NotFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2702 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
2703 auto __res__ = ::llvm::dyn_cast<NotFeltOp>(builder.create(__state__));
2704 assert(__res__ &&
"builder didn't return the right type");
2708NotFeltOp NotFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2709 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
2712void NotFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
2713 assert(operands.size() == 1u &&
"mismatched number of parameters");
2714 odsState.addOperands(operands);
2715 odsState.useProperties(
const_cast<Properties&
>(properties));
2716 odsState.addAttributes(discardableAttributes);
2717 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
2718 odsState.addTypes(resultTypes);
2721NotFeltOp NotFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
2723 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
2724 auto __res__ = ::llvm::dyn_cast<NotFeltOp>(builder.create(__state__));
2725 assert(__res__ &&
"builder didn't return the right type");
2729NotFeltOp NotFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
2730 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
2733void NotFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
2734 assert(operands.size() == 1u &&
"mismatched number of parameters");
2735 odsState.addOperands(operands);
2736 odsState.useProperties(
const_cast<Properties &
>(properties));
2737 odsState.addAttributes(discardableAttributes);
2739 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2741 odsState.location, operands,
2742 odsState.attributes.getDictionary(odsState.getContext()),
2743 odsState.getRawProperties(),
2744 odsState.regions, inferredReturnTypes))) {
2745 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
2746 odsState.addTypes(inferredReturnTypes);
2748 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
2752NotFeltOp NotFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
2754 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
2755 auto __res__ = ::llvm::dyn_cast<NotFeltOp>(builder.create(__state__));
2756 assert(__res__ &&
"builder didn't return the right type");
2761 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
2766 unsigned index = 0; (void)index;
2769 for (
auto v : valueGroup0) {
2770 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
2771 return ::mlir::failure();
2775 unsigned index = 0; (void)index;
2778 for (
auto v : valueGroup0) {
2779 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
2780 return ::mlir::failure();
2784 return emitOpError(
"failed to verify that result type matches with operand type");
2785 return ::mlir::success();
2792::mlir::ParseResult
NotFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2793 ::mlir::OpAsmParser::UnresolvedOperand operandRawOperand{};
2794 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> operandOperands(&operandRawOperand, 1); ::llvm::SMLoc operandOperandsLoc;
2795 (void)operandOperandsLoc;
2796 ::mlir::Type operandRawType{};
2797 ::llvm::ArrayRef<::mlir::Type> operandTypes(&operandRawType, 1);
2799 operandOperandsLoc = parser.getCurrentLocation();
2800 if (parser.parseOperand(operandRawOperand))
2801 return ::mlir::failure();
2803 auto odsResult = parseInferredOrParsedType(parser, operandRawType,
true);
2804 if (odsResult) return ::mlir::failure();
2807 auto loc = parser.getCurrentLocation();(void)loc;
2808 if (parser.parseOptionalAttrDict(result.attributes))
2809 return ::mlir::failure();
2811 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
2813 return ::mlir::failure();
2815 if (parser.resolveOperands(operandOperands, operandTypes, operandOperandsLoc, result.operands))
2816 return ::mlir::failure();
2818 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
2820 result.location, result.operands,
2821 result.attributes.getDictionary(parser.getContext()),
2822 result.getRawProperties(),
2823 result.regions, inferredReturnTypes)))
2824 return ::mlir::failure();
2825 result.addTypes(inferredReturnTypes);
2826 return ::mlir::success();
2832 printInferredOrParsedType(_odsPrinter, *
this,
getOperand().getType(),
true);
2833 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2834 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2837void NotFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
2840 ::llvm::LogicalResult
2842 std::optional<::mlir::Location> location,
2843 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
2844 ::mlir::PropertyRef properties, ::mlir::RegionRange regions,
2845 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
2848 location, adaptor, inferredReturnTypes);
2853 mlir::MLIRContext *context, std::optional<mlir::Location> loc, Adaptor adaptor,
2854 llvm::SmallVectorImpl<mlir::Type> &inferred
2857 auto value = adaptor.getOperand();
2858 inferred[0] = value ? value.getType() :
FeltType::get(context, mlir::StringAttr());
2859 return mlir::success();
2885 return ::mlir::success();
2889 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
2891 emitError() <<
"expected DictionaryAttr to set properties";
2892 return ::mlir::failure();
2894 return ::mlir::success();
2898 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
2899 ::mlir::Builder odsBuilder{ctx};
2902 return odsBuilder.getDictionaryAttr(attrs);
2907 using llvm::hash_value;
2908 return llvm::hash_combine();
2912 return std::nullopt;
2921::llvm::LogicalResult
OrFeltOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
2922 return ::mlir::success();
2925void OrFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
2926 odsState.addOperands(lhs);
2927 odsState.addOperands(rhs);
2928 odsState.addTypes(result);
2931OrFeltOp OrFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
2933 build(builder, __state__, std::forward<
decltype(result)>(result), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
2934 auto __res__ = ::llvm::dyn_cast<OrFeltOp>(builder.create(__state__));
2935 assert(__res__ &&
"builder didn't return the right type");
2940 return create(builder, builder.getLoc(), std::forward<
decltype(result)>(result), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
2943void OrFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
2944 odsState.addOperands(lhs);
2945 odsState.addOperands(rhs);
2947 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2949 odsState.location, odsState.operands,
2950 odsState.attributes.getDictionary(odsState.getContext()),
2951 odsState.getRawProperties(),
2952 odsState.regions, inferredReturnTypes)))
2953 odsState.addTypes(inferredReturnTypes);
2955 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
2961 build(builder, __state__, std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
2962 auto __res__ = ::llvm::dyn_cast<OrFeltOp>(builder.create(__state__));
2963 assert(__res__ &&
"builder didn't return the right type");
2968 return create(builder, builder.getLoc(), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
2971void OrFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
2972 odsState.addOperands(lhs);
2973 odsState.addOperands(rhs);
2974 assert(resultTypes.size() == 1u &&
"mismatched number of results");
2975 odsState.addTypes(resultTypes);
2978OrFeltOp OrFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
2980 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
2981 auto __res__ = ::llvm::dyn_cast<OrFeltOp>(builder.create(__state__));
2982 assert(__res__ &&
"builder didn't return the right type");
2987 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
2990void OrFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2991 assert(operands.size() == 2u &&
"mismatched number of parameters");
2992 odsState.addOperands(operands);
2993 odsState.addAttributes(attributes);
2994 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
2995 odsState.addTypes(resultTypes);
2998OrFeltOp OrFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3000 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
3001 auto __res__ = ::llvm::dyn_cast<OrFeltOp>(builder.create(__state__));
3002 assert(__res__ &&
"builder didn't return the right type");
3006OrFeltOp OrFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3007 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
3010void OrFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3011 assert(operands.size() == 2u &&
"mismatched number of parameters");
3012 odsState.addOperands(operands);
3013 odsState.addAttributes(attributes);
3015 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3017 odsState.location, operands,
3018 odsState.attributes.getDictionary(odsState.getContext()),
3019 odsState.getRawProperties(),
3020 odsState.regions, inferredReturnTypes))) {
3021 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
3022 odsState.addTypes(inferredReturnTypes);
3024 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
3028OrFeltOp OrFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3030 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
3031 auto __res__ = ::llvm::dyn_cast<OrFeltOp>(builder.create(__state__));
3032 assert(__res__ &&
"builder didn't return the right type");
3036OrFeltOp OrFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3037 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
3040void OrFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3041 assert(operands.size() == 2u &&
"mismatched number of parameters");
3042 odsState.addOperands(operands);
3043 odsState.useProperties(
const_cast<Properties&
>(properties));
3044 odsState.addAttributes(discardableAttributes);
3045 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
3046 odsState.addTypes(resultTypes);
3049OrFeltOp OrFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3051 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
3052 auto __res__ = ::llvm::dyn_cast<OrFeltOp>(builder.create(__state__));
3053 assert(__res__ &&
"builder didn't return the right type");
3057OrFeltOp OrFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3058 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
3061void OrFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3062 assert(operands.size() == 2u &&
"mismatched number of parameters");
3063 odsState.addOperands(operands);
3064 odsState.useProperties(
const_cast<Properties &
>(properties));
3065 odsState.addAttributes(discardableAttributes);
3067 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3069 odsState.location, operands,
3070 odsState.attributes.getDictionary(odsState.getContext()),
3071 odsState.getRawProperties(),
3072 odsState.regions, inferredReturnTypes))) {
3073 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
3074 odsState.addTypes(inferredReturnTypes);
3076 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
3080OrFeltOp OrFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3082 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
3083 auto __res__ = ::llvm::dyn_cast<OrFeltOp>(builder.create(__state__));
3084 assert(__res__ &&
"builder didn't return the right type");
3088OrFeltOp OrFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3089 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
3094 unsigned index = 0; (void)index;
3097 for (
auto v : valueGroup0) {
3098 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
3099 return ::mlir::failure();
3103 for (
auto v : valueGroup1) {
3104 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
3105 return ::mlir::failure();
3109 unsigned index = 0; (void)index;
3112 for (
auto v : valueGroup0) {
3113 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
3114 return ::mlir::failure();
3118 return emitOpError(
"failed to verify that rhs type matches with lhs type");
3120 return emitOpError(
"failed to verify that result type matches with lhs type");
3122 return emitOpError(
"failed to verify that result type matches with rhs type");
3123 return ::mlir::success();
3130::mlir::ParseResult
OrFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
3131 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
3132 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
3133 (void)lhsOperandsLoc;
3134 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
3135 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
3136 (void)rhsOperandsLoc;
3137 ::mlir::Type lhsRawType{};
3138 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
3139 ::mlir::Type rhsRawType{};
3140 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
3142 lhsOperandsLoc = parser.getCurrentLocation();
3143 if (parser.parseOperand(lhsRawOperand))
3144 return ::mlir::failure();
3145 if (parser.parseComma())
3146 return ::mlir::failure();
3148 rhsOperandsLoc = parser.getCurrentLocation();
3149 if (parser.parseOperand(rhsRawOperand))
3150 return ::mlir::failure();
3152 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
3153 if (odsResult) return ::mlir::failure();
3156 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
3157 if (odsResult) return ::mlir::failure();
3160 auto loc = parser.getCurrentLocation();(void)loc;
3161 if (parser.parseOptionalAttrDict(result.attributes))
3162 return ::mlir::failure();
3164 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
3166 return ::mlir::failure();
3168 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
3169 return ::mlir::failure();
3170 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
3171 return ::mlir::failure();
3173 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
3175 result.location, result.operands,
3176 result.attributes.getDictionary(parser.getContext()),
3177 result.getRawProperties(),
3178 result.regions, inferredReturnTypes)))
3179 return ::mlir::failure();
3180 result.addTypes(inferredReturnTypes);
3181 return ::mlir::success();
3190 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
3191 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
3192 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
3193 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
3196void OrFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
3199 ::llvm::LogicalResult
3201 std::optional<::mlir::Location> location,
3202 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
3203 ::mlir::PropertyRef properties, ::mlir::RegionRange regions,
3204 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
3207 location, adaptor, inferredReturnTypes);
3212 mlir::MLIRContext *context, std::optional<mlir::Location> loc, Adaptor adaptor,
3213 llvm::SmallVectorImpl<mlir::Type> &inferred
3216 auto value = adaptor.getLhs();
3217 inferred[0] = value ? value.getType() :
FeltType::get(context, mlir::StringAttr());
3218 return mlir::success();
3244 return ::mlir::success();
3248 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
3250 emitError() <<
"expected DictionaryAttr to set properties";
3251 return ::mlir::failure();
3253 return ::mlir::success();
3257 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
3258 ::mlir::Builder odsBuilder{ctx};
3261 return odsBuilder.getDictionaryAttr(attrs);
3266 using llvm::hash_value;
3267 return llvm::hash_combine();
3271 return std::nullopt;
3280::llvm::LogicalResult
PowFeltOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
3281 return ::mlir::success();
3284void PowFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
3285 odsState.addOperands(lhs);
3286 odsState.addOperands(rhs);
3287 odsState.addTypes(result);
3292 build(builder, __state__, std::forward<
decltype(result)>(result), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
3293 auto __res__ = ::llvm::dyn_cast<PowFeltOp>(builder.create(__state__));
3294 assert(__res__ &&
"builder didn't return the right type");
3299 return create(builder, builder.getLoc(), std::forward<
decltype(result)>(result), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
3302void PowFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
3303 odsState.addOperands(lhs);
3304 odsState.addOperands(rhs);
3306 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3308 odsState.location, odsState.operands,
3309 odsState.attributes.getDictionary(odsState.getContext()),
3310 odsState.getRawProperties(),
3311 odsState.regions, inferredReturnTypes)))
3312 odsState.addTypes(inferredReturnTypes);
3314 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
3320 build(builder, __state__, std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
3321 auto __res__ = ::llvm::dyn_cast<PowFeltOp>(builder.create(__state__));
3322 assert(__res__ &&
"builder didn't return the right type");
3327 return create(builder, builder.getLoc(), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
3330void PowFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
3331 odsState.addOperands(lhs);
3332 odsState.addOperands(rhs);
3333 assert(resultTypes.size() == 1u &&
"mismatched number of results");
3334 odsState.addTypes(resultTypes);
3337PowFeltOp PowFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
3339 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
3340 auto __res__ = ::llvm::dyn_cast<PowFeltOp>(builder.create(__state__));
3341 assert(__res__ &&
"builder didn't return the right type");
3346 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
3349void PowFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3350 assert(operands.size() == 2u &&
"mismatched number of parameters");
3351 odsState.addOperands(operands);
3352 odsState.addAttributes(attributes);
3353 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
3354 odsState.addTypes(resultTypes);
3357PowFeltOp PowFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3359 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
3360 auto __res__ = ::llvm::dyn_cast<PowFeltOp>(builder.create(__state__));
3361 assert(__res__ &&
"builder didn't return the right type");
3365PowFeltOp PowFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3366 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
3369void PowFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3370 assert(operands.size() == 2u &&
"mismatched number of parameters");
3371 odsState.addOperands(operands);
3372 odsState.addAttributes(attributes);
3374 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3376 odsState.location, operands,
3377 odsState.attributes.getDictionary(odsState.getContext()),
3378 odsState.getRawProperties(),
3379 odsState.regions, inferredReturnTypes))) {
3380 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
3381 odsState.addTypes(inferredReturnTypes);
3383 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
3387PowFeltOp PowFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3389 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
3390 auto __res__ = ::llvm::dyn_cast<PowFeltOp>(builder.create(__state__));
3391 assert(__res__ &&
"builder didn't return the right type");
3395PowFeltOp PowFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3396 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
3399void PowFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3400 assert(operands.size() == 2u &&
"mismatched number of parameters");
3401 odsState.addOperands(operands);
3402 odsState.useProperties(
const_cast<Properties&
>(properties));
3403 odsState.addAttributes(discardableAttributes);
3404 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
3405 odsState.addTypes(resultTypes);
3408PowFeltOp PowFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3410 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
3411 auto __res__ = ::llvm::dyn_cast<PowFeltOp>(builder.create(__state__));
3412 assert(__res__ &&
"builder didn't return the right type");
3416PowFeltOp PowFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3417 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
3420void PowFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3421 assert(operands.size() == 2u &&
"mismatched number of parameters");
3422 odsState.addOperands(operands);
3423 odsState.useProperties(
const_cast<Properties &
>(properties));
3424 odsState.addAttributes(discardableAttributes);
3426 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3428 odsState.location, operands,
3429 odsState.attributes.getDictionary(odsState.getContext()),
3430 odsState.getRawProperties(),
3431 odsState.regions, inferredReturnTypes))) {
3432 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
3433 odsState.addTypes(inferredReturnTypes);
3435 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
3439PowFeltOp PowFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3441 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
3442 auto __res__ = ::llvm::dyn_cast<PowFeltOp>(builder.create(__state__));
3443 assert(__res__ &&
"builder didn't return the right type");
3448 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
3453 unsigned index = 0; (void)index;
3456 for (
auto v : valueGroup0) {
3457 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
3458 return ::mlir::failure();
3462 for (
auto v : valueGroup1) {
3463 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
3464 return ::mlir::failure();
3468 unsigned index = 0; (void)index;
3471 for (
auto v : valueGroup0) {
3472 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
3473 return ::mlir::failure();
3477 return emitOpError(
"failed to verify that rhs type matches with lhs type");
3479 return emitOpError(
"failed to verify that result type matches with lhs type");
3481 return emitOpError(
"failed to verify that result type matches with rhs type");
3482 return ::mlir::success();
3489::mlir::ParseResult
PowFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
3490 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
3491 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
3492 (void)lhsOperandsLoc;
3493 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
3494 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
3495 (void)rhsOperandsLoc;
3496 ::mlir::Type lhsRawType{};
3497 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
3498 ::mlir::Type rhsRawType{};
3499 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
3501 lhsOperandsLoc = parser.getCurrentLocation();
3502 if (parser.parseOperand(lhsRawOperand))
3503 return ::mlir::failure();
3504 if (parser.parseComma())
3505 return ::mlir::failure();
3507 rhsOperandsLoc = parser.getCurrentLocation();
3508 if (parser.parseOperand(rhsRawOperand))
3509 return ::mlir::failure();
3511 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
3512 if (odsResult) return ::mlir::failure();
3515 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
3516 if (odsResult) return ::mlir::failure();
3519 auto loc = parser.getCurrentLocation();(void)loc;
3520 if (parser.parseOptionalAttrDict(result.attributes))
3521 return ::mlir::failure();
3523 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
3525 return ::mlir::failure();
3527 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
3528 return ::mlir::failure();
3529 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
3530 return ::mlir::failure();
3532 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
3534 result.location, result.operands,
3535 result.attributes.getDictionary(parser.getContext()),
3536 result.getRawProperties(),
3537 result.regions, inferredReturnTypes)))
3538 return ::mlir::failure();
3539 result.addTypes(inferredReturnTypes);
3540 return ::mlir::success();
3549 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
3550 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
3551 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
3552 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
3555void PowFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
3558 ::llvm::LogicalResult
3560 std::optional<::mlir::Location> location,
3561 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
3562 ::mlir::PropertyRef properties, ::mlir::RegionRange regions,
3563 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
3566 location, adaptor, inferredReturnTypes);
3571 mlir::MLIRContext *context, std::optional<mlir::Location> loc, Adaptor adaptor,
3572 llvm::SmallVectorImpl<mlir::Type> &inferred
3575 auto value = adaptor.getLhs();
3576 inferred[0] = value ? value.getType() :
FeltType::get(context, mlir::StringAttr());
3577 return mlir::success();
3603 return ::mlir::success();
3607 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
3609 emitError() <<
"expected DictionaryAttr to set properties";
3610 return ::mlir::failure();
3612 return ::mlir::success();
3616 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
3617 ::mlir::Builder odsBuilder{ctx};
3620 return odsBuilder.getDictionaryAttr(attrs);
3625 using llvm::hash_value;
3626 return llvm::hash_combine();
3630 return std::nullopt;
3639::llvm::LogicalResult
ShlFeltOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
3640 return ::mlir::success();
3643void ShlFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
3644 odsState.addOperands(lhs);
3645 odsState.addOperands(rhs);
3646 odsState.addTypes(result);
3651 build(builder, __state__, std::forward<
decltype(result)>(result), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
3652 auto __res__ = ::llvm::dyn_cast<ShlFeltOp>(builder.create(__state__));
3653 assert(__res__ &&
"builder didn't return the right type");
3658 return create(builder, builder.getLoc(), std::forward<
decltype(result)>(result), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
3661void ShlFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
3662 odsState.addOperands(lhs);
3663 odsState.addOperands(rhs);
3665 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3667 odsState.location, odsState.operands,
3668 odsState.attributes.getDictionary(odsState.getContext()),
3669 odsState.getRawProperties(),
3670 odsState.regions, inferredReturnTypes)))
3671 odsState.addTypes(inferredReturnTypes);
3673 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
3679 build(builder, __state__, std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
3680 auto __res__ = ::llvm::dyn_cast<ShlFeltOp>(builder.create(__state__));
3681 assert(__res__ &&
"builder didn't return the right type");
3686 return create(builder, builder.getLoc(), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
3689void ShlFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
3690 odsState.addOperands(lhs);
3691 odsState.addOperands(rhs);
3692 assert(resultTypes.size() == 1u &&
"mismatched number of results");
3693 odsState.addTypes(resultTypes);
3696ShlFeltOp ShlFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
3698 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
3699 auto __res__ = ::llvm::dyn_cast<ShlFeltOp>(builder.create(__state__));
3700 assert(__res__ &&
"builder didn't return the right type");
3705 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
3708void ShlFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3709 assert(operands.size() == 2u &&
"mismatched number of parameters");
3710 odsState.addOperands(operands);
3711 odsState.addAttributes(attributes);
3712 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
3713 odsState.addTypes(resultTypes);
3716ShlFeltOp ShlFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3718 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
3719 auto __res__ = ::llvm::dyn_cast<ShlFeltOp>(builder.create(__state__));
3720 assert(__res__ &&
"builder didn't return the right type");
3724ShlFeltOp ShlFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3725 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
3728void ShlFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3729 assert(operands.size() == 2u &&
"mismatched number of parameters");
3730 odsState.addOperands(operands);
3731 odsState.addAttributes(attributes);
3733 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3735 odsState.location, operands,
3736 odsState.attributes.getDictionary(odsState.getContext()),
3737 odsState.getRawProperties(),
3738 odsState.regions, inferredReturnTypes))) {
3739 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
3740 odsState.addTypes(inferredReturnTypes);
3742 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
3746ShlFeltOp ShlFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3748 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
3749 auto __res__ = ::llvm::dyn_cast<ShlFeltOp>(builder.create(__state__));
3750 assert(__res__ &&
"builder didn't return the right type");
3754ShlFeltOp ShlFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3755 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
3758void ShlFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3759 assert(operands.size() == 2u &&
"mismatched number of parameters");
3760 odsState.addOperands(operands);
3761 odsState.useProperties(
const_cast<Properties&
>(properties));
3762 odsState.addAttributes(discardableAttributes);
3763 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
3764 odsState.addTypes(resultTypes);
3767ShlFeltOp ShlFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3769 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
3770 auto __res__ = ::llvm::dyn_cast<ShlFeltOp>(builder.create(__state__));
3771 assert(__res__ &&
"builder didn't return the right type");
3775ShlFeltOp ShlFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3776 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
3779void ShlFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3780 assert(operands.size() == 2u &&
"mismatched number of parameters");
3781 odsState.addOperands(operands);
3782 odsState.useProperties(
const_cast<Properties &
>(properties));
3783 odsState.addAttributes(discardableAttributes);
3785 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3787 odsState.location, operands,
3788 odsState.attributes.getDictionary(odsState.getContext()),
3789 odsState.getRawProperties(),
3790 odsState.regions, inferredReturnTypes))) {
3791 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
3792 odsState.addTypes(inferredReturnTypes);
3794 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
3798ShlFeltOp ShlFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3800 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
3801 auto __res__ = ::llvm::dyn_cast<ShlFeltOp>(builder.create(__state__));
3802 assert(__res__ &&
"builder didn't return the right type");
3807 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
3812 unsigned index = 0; (void)index;
3815 for (
auto v : valueGroup0) {
3816 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
3817 return ::mlir::failure();
3821 for (
auto v : valueGroup1) {
3822 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
3823 return ::mlir::failure();
3827 unsigned index = 0; (void)index;
3830 for (
auto v : valueGroup0) {
3831 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
3832 return ::mlir::failure();
3836 return emitOpError(
"failed to verify that rhs type matches with lhs type");
3838 return emitOpError(
"failed to verify that result type matches with lhs type");
3840 return emitOpError(
"failed to verify that result type matches with rhs type");
3841 return ::mlir::success();
3848::mlir::ParseResult
ShlFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
3849 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
3850 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
3851 (void)lhsOperandsLoc;
3852 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
3853 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
3854 (void)rhsOperandsLoc;
3855 ::mlir::Type lhsRawType{};
3856 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
3857 ::mlir::Type rhsRawType{};
3858 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
3860 lhsOperandsLoc = parser.getCurrentLocation();
3861 if (parser.parseOperand(lhsRawOperand))
3862 return ::mlir::failure();
3863 if (parser.parseComma())
3864 return ::mlir::failure();
3866 rhsOperandsLoc = parser.getCurrentLocation();
3867 if (parser.parseOperand(rhsRawOperand))
3868 return ::mlir::failure();
3870 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
3871 if (odsResult) return ::mlir::failure();
3874 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
3875 if (odsResult) return ::mlir::failure();
3878 auto loc = parser.getCurrentLocation();(void)loc;
3879 if (parser.parseOptionalAttrDict(result.attributes))
3880 return ::mlir::failure();
3882 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
3884 return ::mlir::failure();
3886 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
3887 return ::mlir::failure();
3888 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
3889 return ::mlir::failure();
3891 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
3893 result.location, result.operands,
3894 result.attributes.getDictionary(parser.getContext()),
3895 result.getRawProperties(),
3896 result.regions, inferredReturnTypes)))
3897 return ::mlir::failure();
3898 result.addTypes(inferredReturnTypes);
3899 return ::mlir::success();
3908 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
3909 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
3910 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
3911 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
3914void ShlFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
3917 ::llvm::LogicalResult
3919 std::optional<::mlir::Location> location,
3920 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
3921 ::mlir::PropertyRef properties, ::mlir::RegionRange regions,
3922 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
3925 location, adaptor, inferredReturnTypes);
3930 mlir::MLIRContext *context, std::optional<mlir::Location> loc, Adaptor adaptor,
3931 llvm::SmallVectorImpl<mlir::Type> &inferred
3934 auto value = adaptor.getLhs();
3935 inferred[0] = value ? value.getType() :
FeltType::get(context, mlir::StringAttr());
3936 return mlir::success();
3962 return ::mlir::success();
3966 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
3968 emitError() <<
"expected DictionaryAttr to set properties";
3969 return ::mlir::failure();
3971 return ::mlir::success();
3975 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
3976 ::mlir::Builder odsBuilder{ctx};
3979 return odsBuilder.getDictionaryAttr(attrs);
3984 using llvm::hash_value;
3985 return llvm::hash_combine();
3989 return std::nullopt;
3998::llvm::LogicalResult
ShrFeltOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
3999 return ::mlir::success();
4002void ShrFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
4003 odsState.addOperands(lhs);
4004 odsState.addOperands(rhs);
4005 odsState.addTypes(result);
4010 build(builder, __state__, std::forward<
decltype(result)>(result), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
4011 auto __res__ = ::llvm::dyn_cast<ShrFeltOp>(builder.create(__state__));
4012 assert(__res__ &&
"builder didn't return the right type");
4017 return create(builder, builder.getLoc(), std::forward<
decltype(result)>(result), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
4020void ShrFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
4021 odsState.addOperands(lhs);
4022 odsState.addOperands(rhs);
4024 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
4026 odsState.location, odsState.operands,
4027 odsState.attributes.getDictionary(odsState.getContext()),
4028 odsState.getRawProperties(),
4029 odsState.regions, inferredReturnTypes)))
4030 odsState.addTypes(inferredReturnTypes);
4032 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
4038 build(builder, __state__, std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
4039 auto __res__ = ::llvm::dyn_cast<ShrFeltOp>(builder.create(__state__));
4040 assert(__res__ &&
"builder didn't return the right type");
4045 return create(builder, builder.getLoc(), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
4048void ShrFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
4049 odsState.addOperands(lhs);
4050 odsState.addOperands(rhs);
4051 assert(resultTypes.size() == 1u &&
"mismatched number of results");
4052 odsState.addTypes(resultTypes);
4055ShrFeltOp ShrFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
4057 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
4058 auto __res__ = ::llvm::dyn_cast<ShrFeltOp>(builder.create(__state__));
4059 assert(__res__ &&
"builder didn't return the right type");
4064 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
4067void ShrFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4068 assert(operands.size() == 2u &&
"mismatched number of parameters");
4069 odsState.addOperands(operands);
4070 odsState.addAttributes(attributes);
4071 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
4072 odsState.addTypes(resultTypes);
4075ShrFeltOp ShrFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4077 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
4078 auto __res__ = ::llvm::dyn_cast<ShrFeltOp>(builder.create(__state__));
4079 assert(__res__ &&
"builder didn't return the right type");
4083ShrFeltOp ShrFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4084 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
4087void ShrFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4088 assert(operands.size() == 2u &&
"mismatched number of parameters");
4089 odsState.addOperands(operands);
4090 odsState.addAttributes(attributes);
4092 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
4094 odsState.location, operands,
4095 odsState.attributes.getDictionary(odsState.getContext()),
4096 odsState.getRawProperties(),
4097 odsState.regions, inferredReturnTypes))) {
4098 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
4099 odsState.addTypes(inferredReturnTypes);
4101 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
4105ShrFeltOp ShrFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4107 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
4108 auto __res__ = ::llvm::dyn_cast<ShrFeltOp>(builder.create(__state__));
4109 assert(__res__ &&
"builder didn't return the right type");
4113ShrFeltOp ShrFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4114 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
4117void ShrFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4118 assert(operands.size() == 2u &&
"mismatched number of parameters");
4119 odsState.addOperands(operands);
4120 odsState.useProperties(
const_cast<Properties&
>(properties));
4121 odsState.addAttributes(discardableAttributes);
4122 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
4123 odsState.addTypes(resultTypes);
4126ShrFeltOp ShrFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4128 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
4129 auto __res__ = ::llvm::dyn_cast<ShrFeltOp>(builder.create(__state__));
4130 assert(__res__ &&
"builder didn't return the right type");
4134ShrFeltOp ShrFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4135 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
4138void ShrFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4139 assert(operands.size() == 2u &&
"mismatched number of parameters");
4140 odsState.addOperands(operands);
4141 odsState.useProperties(
const_cast<Properties &
>(properties));
4142 odsState.addAttributes(discardableAttributes);
4144 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
4146 odsState.location, operands,
4147 odsState.attributes.getDictionary(odsState.getContext()),
4148 odsState.getRawProperties(),
4149 odsState.regions, inferredReturnTypes))) {
4150 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
4151 odsState.addTypes(inferredReturnTypes);
4153 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
4157ShrFeltOp ShrFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4159 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
4160 auto __res__ = ::llvm::dyn_cast<ShrFeltOp>(builder.create(__state__));
4161 assert(__res__ &&
"builder didn't return the right type");
4166 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
4171 unsigned index = 0; (void)index;
4174 for (
auto v : valueGroup0) {
4175 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
4176 return ::mlir::failure();
4180 for (
auto v : valueGroup1) {
4181 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
4182 return ::mlir::failure();
4186 unsigned index = 0; (void)index;
4189 for (
auto v : valueGroup0) {
4190 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
4191 return ::mlir::failure();
4195 return emitOpError(
"failed to verify that rhs type matches with lhs type");
4197 return emitOpError(
"failed to verify that result type matches with lhs type");
4199 return emitOpError(
"failed to verify that result type matches with rhs type");
4200 return ::mlir::success();
4207::mlir::ParseResult
ShrFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
4208 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
4209 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
4210 (void)lhsOperandsLoc;
4211 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
4212 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
4213 (void)rhsOperandsLoc;
4214 ::mlir::Type lhsRawType{};
4215 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
4216 ::mlir::Type rhsRawType{};
4217 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
4219 lhsOperandsLoc = parser.getCurrentLocation();
4220 if (parser.parseOperand(lhsRawOperand))
4221 return ::mlir::failure();
4222 if (parser.parseComma())
4223 return ::mlir::failure();
4225 rhsOperandsLoc = parser.getCurrentLocation();
4226 if (parser.parseOperand(rhsRawOperand))
4227 return ::mlir::failure();
4229 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
4230 if (odsResult) return ::mlir::failure();
4233 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
4234 if (odsResult) return ::mlir::failure();
4237 auto loc = parser.getCurrentLocation();(void)loc;
4238 if (parser.parseOptionalAttrDict(result.attributes))
4239 return ::mlir::failure();
4241 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
4243 return ::mlir::failure();
4245 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
4246 return ::mlir::failure();
4247 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
4248 return ::mlir::failure();
4250 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
4252 result.location, result.operands,
4253 result.attributes.getDictionary(parser.getContext()),
4254 result.getRawProperties(),
4255 result.regions, inferredReturnTypes)))
4256 return ::mlir::failure();
4257 result.addTypes(inferredReturnTypes);
4258 return ::mlir::success();
4267 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
4268 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
4269 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
4270 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
4273void ShrFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
4276 ::llvm::LogicalResult
4278 std::optional<::mlir::Location> location,
4279 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
4280 ::mlir::PropertyRef properties, ::mlir::RegionRange regions,
4281 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
4284 location, adaptor, inferredReturnTypes);
4289 mlir::MLIRContext *context, std::optional<mlir::Location> loc, Adaptor adaptor,
4290 llvm::SmallVectorImpl<mlir::Type> &inferred
4293 auto value = adaptor.getLhs();
4294 inferred[0] = value ? value.getType() :
FeltType::get(context, mlir::StringAttr());
4295 return mlir::success();
4321 return ::mlir::success();
4325 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
4327 emitError() <<
"expected DictionaryAttr to set properties";
4328 return ::mlir::failure();
4330 return ::mlir::success();
4334 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
4335 ::mlir::Builder odsBuilder{ctx};
4338 return odsBuilder.getDictionaryAttr(attrs);
4343 using llvm::hash_value;
4344 return llvm::hash_combine();
4348 return std::nullopt;
4358 return ::mlir::success();
4361void SignedIntDivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
4362 odsState.addOperands(lhs);
4363 odsState.addOperands(rhs);
4364 odsState.addTypes(result);
4369 build(builder, __state__, std::forward<
decltype(result)>(result), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
4370 auto __res__ = ::llvm::dyn_cast<SignedIntDivFeltOp>(builder.create(__state__));
4371 assert(__res__ &&
"builder didn't return the right type");
4376 return create(builder, builder.getLoc(), std::forward<
decltype(result)>(result), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
4380 odsState.addOperands(lhs);
4381 odsState.addOperands(rhs);
4383 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
4385 odsState.location, odsState.operands,
4386 odsState.attributes.getDictionary(odsState.getContext()),
4387 odsState.getRawProperties(),
4388 odsState.regions, inferredReturnTypes)))
4389 odsState.addTypes(inferredReturnTypes);
4391 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
4397 build(builder, __state__, std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
4398 auto __res__ = ::llvm::dyn_cast<SignedIntDivFeltOp>(builder.create(__state__));
4399 assert(__res__ &&
"builder didn't return the right type");
4404 return create(builder, builder.getLoc(), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
4407void SignedIntDivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
4408 odsState.addOperands(lhs);
4409 odsState.addOperands(rhs);
4410 assert(resultTypes.size() == 1u &&
"mismatched number of results");
4411 odsState.addTypes(resultTypes);
4416 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
4417 auto __res__ = ::llvm::dyn_cast<SignedIntDivFeltOp>(builder.create(__state__));
4418 assert(__res__ &&
"builder didn't return the right type");
4423 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
4426void SignedIntDivFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4427 assert(operands.size() == 2u &&
"mismatched number of parameters");
4428 odsState.addOperands(operands);
4429 odsState.addAttributes(attributes);
4430 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
4431 odsState.addTypes(resultTypes);
4436 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
4437 auto __res__ = ::llvm::dyn_cast<SignedIntDivFeltOp>(builder.create(__state__));
4438 assert(__res__ &&
"builder didn't return the right type");
4443 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
4446void SignedIntDivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4447 assert(operands.size() == 2u &&
"mismatched number of parameters");
4448 odsState.addOperands(operands);
4449 odsState.addAttributes(attributes);
4451 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
4453 odsState.location, operands,
4454 odsState.attributes.getDictionary(odsState.getContext()),
4455 odsState.getRawProperties(),
4456 odsState.regions, inferredReturnTypes))) {
4457 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
4458 odsState.addTypes(inferredReturnTypes);
4460 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
4466 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
4467 auto __res__ = ::llvm::dyn_cast<SignedIntDivFeltOp>(builder.create(__state__));
4468 assert(__res__ &&
"builder didn't return the right type");
4473 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
4476void SignedIntDivFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4477 assert(operands.size() == 2u &&
"mismatched number of parameters");
4478 odsState.addOperands(operands);
4479 odsState.useProperties(
const_cast<Properties&
>(properties));
4480 odsState.addAttributes(discardableAttributes);
4481 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
4482 odsState.addTypes(resultTypes);
4487 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
4488 auto __res__ = ::llvm::dyn_cast<SignedIntDivFeltOp>(builder.create(__state__));
4489 assert(__res__ &&
"builder didn't return the right type");
4494 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
4497void SignedIntDivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4498 assert(operands.size() == 2u &&
"mismatched number of parameters");
4499 odsState.addOperands(operands);
4500 odsState.useProperties(
const_cast<Properties &
>(properties));
4501 odsState.addAttributes(discardableAttributes);
4503 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
4505 odsState.location, operands,
4506 odsState.attributes.getDictionary(odsState.getContext()),
4507 odsState.getRawProperties(),
4508 odsState.regions, inferredReturnTypes))) {
4509 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
4510 odsState.addTypes(inferredReturnTypes);
4512 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
4518 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
4519 auto __res__ = ::llvm::dyn_cast<SignedIntDivFeltOp>(builder.create(__state__));
4520 assert(__res__ &&
"builder didn't return the right type");
4525 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
4530 unsigned index = 0; (void)index;
4533 for (
auto v : valueGroup0) {
4534 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
4535 return ::mlir::failure();
4539 for (
auto v : valueGroup1) {
4540 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
4541 return ::mlir::failure();
4545 unsigned index = 0; (void)index;
4548 for (
auto v : valueGroup0) {
4549 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
4550 return ::mlir::failure();
4554 return emitOpError(
"failed to verify that rhs type matches with lhs type");
4556 return emitOpError(
"failed to verify that result type matches with lhs type");
4558 return emitOpError(
"failed to verify that result type matches with rhs type");
4559 return ::mlir::success();
4567 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
4568 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
4569 (void)lhsOperandsLoc;
4570 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
4571 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
4572 (void)rhsOperandsLoc;
4573 ::mlir::Type lhsRawType{};
4574 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
4575 ::mlir::Type rhsRawType{};
4576 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
4578 lhsOperandsLoc = parser.getCurrentLocation();
4579 if (parser.parseOperand(lhsRawOperand))
4580 return ::mlir::failure();
4581 if (parser.parseComma())
4582 return ::mlir::failure();
4584 rhsOperandsLoc = parser.getCurrentLocation();
4585 if (parser.parseOperand(rhsRawOperand))
4586 return ::mlir::failure();
4588 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
4589 if (odsResult) return ::mlir::failure();
4592 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
4593 if (odsResult) return ::mlir::failure();
4596 auto loc = parser.getCurrentLocation();(void)loc;
4597 if (parser.parseOptionalAttrDict(result.attributes))
4598 return ::mlir::failure();
4600 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
4602 return ::mlir::failure();
4604 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
4605 return ::mlir::failure();
4606 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
4607 return ::mlir::failure();
4609 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
4611 result.location, result.operands,
4612 result.attributes.getDictionary(parser.getContext()),
4613 result.getRawProperties(),
4614 result.regions, inferredReturnTypes)))
4615 return ::mlir::failure();
4616 result.addTypes(inferredReturnTypes);
4617 return ::mlir::success();
4626 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
4627 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
4628 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
4629 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
4635 ::llvm::LogicalResult
4637 std::optional<::mlir::Location> location,
4638 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
4639 ::mlir::PropertyRef properties, ::mlir::RegionRange regions,
4640 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
4643 location, adaptor, inferredReturnTypes);
4648 mlir::MLIRContext *context, std::optional<mlir::Location> loc, Adaptor adaptor,
4649 llvm::SmallVectorImpl<mlir::Type> &inferred
4652 auto value = adaptor.getLhs();
4653 inferred[0] = value ? value.getType() :
FeltType::get(context, mlir::StringAttr());
4654 return mlir::success();
4680 return ::mlir::success();
4684 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
4686 emitError() <<
"expected DictionaryAttr to set properties";
4687 return ::mlir::failure();
4689 return ::mlir::success();
4693 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
4694 ::mlir::Builder odsBuilder{ctx};
4697 return odsBuilder.getDictionaryAttr(attrs);
4702 using llvm::hash_value;
4703 return llvm::hash_combine();
4707 return std::nullopt;
4717 return ::mlir::success();
4720void SignedModFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
4721 odsState.addOperands(lhs);
4722 odsState.addOperands(rhs);
4723 odsState.addTypes(result);
4728 build(builder, __state__, std::forward<
decltype(result)>(result), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
4729 auto __res__ = ::llvm::dyn_cast<SignedModFeltOp>(builder.create(__state__));
4730 assert(__res__ &&
"builder didn't return the right type");
4735 return create(builder, builder.getLoc(), std::forward<
decltype(result)>(result), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
4738void SignedModFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
4739 odsState.addOperands(lhs);
4740 odsState.addOperands(rhs);
4742 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
4744 odsState.location, odsState.operands,
4745 odsState.attributes.getDictionary(odsState.getContext()),
4746 odsState.getRawProperties(),
4747 odsState.regions, inferredReturnTypes)))
4748 odsState.addTypes(inferredReturnTypes);
4750 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
4756 build(builder, __state__, std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
4757 auto __res__ = ::llvm::dyn_cast<SignedModFeltOp>(builder.create(__state__));
4758 assert(__res__ &&
"builder didn't return the right type");
4763 return create(builder, builder.getLoc(), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
4766void SignedModFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
4767 odsState.addOperands(lhs);
4768 odsState.addOperands(rhs);
4769 assert(resultTypes.size() == 1u &&
"mismatched number of results");
4770 odsState.addTypes(resultTypes);
4775 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
4776 auto __res__ = ::llvm::dyn_cast<SignedModFeltOp>(builder.create(__state__));
4777 assert(__res__ &&
"builder didn't return the right type");
4782 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
4785void SignedModFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4786 assert(operands.size() == 2u &&
"mismatched number of parameters");
4787 odsState.addOperands(operands);
4788 odsState.addAttributes(attributes);
4789 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
4790 odsState.addTypes(resultTypes);
4793SignedModFeltOp SignedModFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4795 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
4796 auto __res__ = ::llvm::dyn_cast<SignedModFeltOp>(builder.create(__state__));
4797 assert(__res__ &&
"builder didn't return the right type");
4802 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
4805void SignedModFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4806 assert(operands.size() == 2u &&
"mismatched number of parameters");
4807 odsState.addOperands(operands);
4808 odsState.addAttributes(attributes);
4810 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
4812 odsState.location, operands,
4813 odsState.attributes.getDictionary(odsState.getContext()),
4814 odsState.getRawProperties(),
4815 odsState.regions, inferredReturnTypes))) {
4816 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
4817 odsState.addTypes(inferredReturnTypes);
4819 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
4825 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
4826 auto __res__ = ::llvm::dyn_cast<SignedModFeltOp>(builder.create(__state__));
4827 assert(__res__ &&
"builder didn't return the right type");
4832 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
4835void SignedModFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4836 assert(operands.size() == 2u &&
"mismatched number of parameters");
4837 odsState.addOperands(operands);
4838 odsState.useProperties(
const_cast<Properties&
>(properties));
4839 odsState.addAttributes(discardableAttributes);
4840 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
4841 odsState.addTypes(resultTypes);
4846 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
4847 auto __res__ = ::llvm::dyn_cast<SignedModFeltOp>(builder.create(__state__));
4848 assert(__res__ &&
"builder didn't return the right type");
4853 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
4856void SignedModFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4857 assert(operands.size() == 2u &&
"mismatched number of parameters");
4858 odsState.addOperands(operands);
4859 odsState.useProperties(
const_cast<Properties &
>(properties));
4860 odsState.addAttributes(discardableAttributes);
4862 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
4864 odsState.location, operands,
4865 odsState.attributes.getDictionary(odsState.getContext()),
4866 odsState.getRawProperties(),
4867 odsState.regions, inferredReturnTypes))) {
4868 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
4869 odsState.addTypes(inferredReturnTypes);
4871 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
4877 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
4878 auto __res__ = ::llvm::dyn_cast<SignedModFeltOp>(builder.create(__state__));
4879 assert(__res__ &&
"builder didn't return the right type");
4884 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
4889 unsigned index = 0; (void)index;
4892 for (
auto v : valueGroup0) {
4893 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
4894 return ::mlir::failure();
4898 for (
auto v : valueGroup1) {
4899 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
4900 return ::mlir::failure();
4904 unsigned index = 0; (void)index;
4907 for (
auto v : valueGroup0) {
4908 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
4909 return ::mlir::failure();
4913 return emitOpError(
"failed to verify that rhs type matches with lhs type");
4915 return emitOpError(
"failed to verify that result type matches with lhs type");
4917 return emitOpError(
"failed to verify that result type matches with rhs type");
4918 return ::mlir::success();
4926 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
4927 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
4928 (void)lhsOperandsLoc;
4929 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
4930 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
4931 (void)rhsOperandsLoc;
4932 ::mlir::Type lhsRawType{};
4933 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
4934 ::mlir::Type rhsRawType{};
4935 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
4937 lhsOperandsLoc = parser.getCurrentLocation();
4938 if (parser.parseOperand(lhsRawOperand))
4939 return ::mlir::failure();
4940 if (parser.parseComma())
4941 return ::mlir::failure();
4943 rhsOperandsLoc = parser.getCurrentLocation();
4944 if (parser.parseOperand(rhsRawOperand))
4945 return ::mlir::failure();
4947 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
4948 if (odsResult) return ::mlir::failure();
4951 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
4952 if (odsResult) return ::mlir::failure();
4955 auto loc = parser.getCurrentLocation();(void)loc;
4956 if (parser.parseOptionalAttrDict(result.attributes))
4957 return ::mlir::failure();
4959 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
4961 return ::mlir::failure();
4963 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
4964 return ::mlir::failure();
4965 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
4966 return ::mlir::failure();
4968 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
4970 result.location, result.operands,
4971 result.attributes.getDictionary(parser.getContext()),
4972 result.getRawProperties(),
4973 result.regions, inferredReturnTypes)))
4974 return ::mlir::failure();
4975 result.addTypes(inferredReturnTypes);
4976 return ::mlir::success();
4985 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
4986 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
4987 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
4988 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
4994 ::llvm::LogicalResult
4996 std::optional<::mlir::Location> location,
4997 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
4998 ::mlir::PropertyRef properties, ::mlir::RegionRange regions,
4999 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
5002 location, adaptor, inferredReturnTypes);
5007 mlir::MLIRContext *context, std::optional<mlir::Location> loc, Adaptor adaptor,
5008 llvm::SmallVectorImpl<mlir::Type> &inferred
5011 auto value = adaptor.getLhs();
5012 inferred[0] = value ? value.getType() :
FeltType::get(context, mlir::StringAttr());
5013 return mlir::success();
5039 return ::mlir::success();
5043 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
5045 emitError() <<
"expected DictionaryAttr to set properties";
5046 return ::mlir::failure();
5048 return ::mlir::success();
5052 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
5053 ::mlir::Builder odsBuilder{ctx};
5056 return odsBuilder.getDictionaryAttr(attrs);
5061 using llvm::hash_value;
5062 return llvm::hash_combine();
5066 return std::nullopt;
5075::llvm::LogicalResult
SubFeltOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
5076 return ::mlir::success();
5079void SubFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
5080 odsState.addOperands(lhs);
5081 odsState.addOperands(rhs);
5082 odsState.addTypes(result);
5087 build(builder, __state__, std::forward<
decltype(result)>(result), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
5088 auto __res__ = ::llvm::dyn_cast<SubFeltOp>(builder.create(__state__));
5089 assert(__res__ &&
"builder didn't return the right type");
5094 return create(builder, builder.getLoc(), std::forward<
decltype(result)>(result), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
5097void SubFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
5098 odsState.addOperands(lhs);
5099 odsState.addOperands(rhs);
5101 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
5103 odsState.location, odsState.operands,
5104 odsState.attributes.getDictionary(odsState.getContext()),
5105 odsState.getRawProperties(),
5106 odsState.regions, inferredReturnTypes)))
5107 odsState.addTypes(inferredReturnTypes);
5109 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
5115 build(builder, __state__, std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
5116 auto __res__ = ::llvm::dyn_cast<SubFeltOp>(builder.create(__state__));
5117 assert(__res__ &&
"builder didn't return the right type");
5122 return create(builder, builder.getLoc(), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
5125void SubFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
5126 odsState.addOperands(lhs);
5127 odsState.addOperands(rhs);
5128 assert(resultTypes.size() == 1u &&
"mismatched number of results");
5129 odsState.addTypes(resultTypes);
5132SubFeltOp SubFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
5134 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
5135 auto __res__ = ::llvm::dyn_cast<SubFeltOp>(builder.create(__state__));
5136 assert(__res__ &&
"builder didn't return the right type");
5141 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
5144void SubFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5145 assert(operands.size() == 2u &&
"mismatched number of parameters");
5146 odsState.addOperands(operands);
5147 odsState.addAttributes(attributes);
5148 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
5149 odsState.addTypes(resultTypes);
5152SubFeltOp SubFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5154 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
5155 auto __res__ = ::llvm::dyn_cast<SubFeltOp>(builder.create(__state__));
5156 assert(__res__ &&
"builder didn't return the right type");
5160SubFeltOp SubFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5161 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
5164void SubFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5165 assert(operands.size() == 2u &&
"mismatched number of parameters");
5166 odsState.addOperands(operands);
5167 odsState.addAttributes(attributes);
5169 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
5171 odsState.location, operands,
5172 odsState.attributes.getDictionary(odsState.getContext()),
5173 odsState.getRawProperties(),
5174 odsState.regions, inferredReturnTypes))) {
5175 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
5176 odsState.addTypes(inferredReturnTypes);
5178 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
5182SubFeltOp SubFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5184 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
5185 auto __res__ = ::llvm::dyn_cast<SubFeltOp>(builder.create(__state__));
5186 assert(__res__ &&
"builder didn't return the right type");
5190SubFeltOp SubFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5191 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
5194void SubFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
5195 assert(operands.size() == 2u &&
"mismatched number of parameters");
5196 odsState.addOperands(operands);
5197 odsState.useProperties(
const_cast<Properties&
>(properties));
5198 odsState.addAttributes(discardableAttributes);
5199 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
5200 odsState.addTypes(resultTypes);
5203SubFeltOp SubFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
5205 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
5206 auto __res__ = ::llvm::dyn_cast<SubFeltOp>(builder.create(__state__));
5207 assert(__res__ &&
"builder didn't return the right type");
5211SubFeltOp SubFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
5212 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
5215void SubFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
5216 assert(operands.size() == 2u &&
"mismatched number of parameters");
5217 odsState.addOperands(operands);
5218 odsState.useProperties(
const_cast<Properties &
>(properties));
5219 odsState.addAttributes(discardableAttributes);
5221 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
5223 odsState.location, operands,
5224 odsState.attributes.getDictionary(odsState.getContext()),
5225 odsState.getRawProperties(),
5226 odsState.regions, inferredReturnTypes))) {
5227 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
5228 odsState.addTypes(inferredReturnTypes);
5230 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
5234SubFeltOp SubFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
5236 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
5237 auto __res__ = ::llvm::dyn_cast<SubFeltOp>(builder.create(__state__));
5238 assert(__res__ &&
"builder didn't return the right type");
5243 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
5248 unsigned index = 0; (void)index;
5251 for (
auto v : valueGroup0) {
5252 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
5253 return ::mlir::failure();
5257 for (
auto v : valueGroup1) {
5258 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
5259 return ::mlir::failure();
5263 unsigned index = 0; (void)index;
5266 for (
auto v : valueGroup0) {
5267 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
5268 return ::mlir::failure();
5272 return emitOpError(
"failed to verify that rhs type matches with lhs type");
5274 return emitOpError(
"failed to verify that result type matches with lhs type");
5276 return emitOpError(
"failed to verify that result type matches with rhs type");
5277 return ::mlir::success();
5284::mlir::ParseResult
SubFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
5285 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
5286 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
5287 (void)lhsOperandsLoc;
5288 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
5289 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
5290 (void)rhsOperandsLoc;
5291 ::mlir::Type lhsRawType{};
5292 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
5293 ::mlir::Type rhsRawType{};
5294 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
5296 lhsOperandsLoc = parser.getCurrentLocation();
5297 if (parser.parseOperand(lhsRawOperand))
5298 return ::mlir::failure();
5299 if (parser.parseComma())
5300 return ::mlir::failure();
5302 rhsOperandsLoc = parser.getCurrentLocation();
5303 if (parser.parseOperand(rhsRawOperand))
5304 return ::mlir::failure();
5306 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
5307 if (odsResult) return ::mlir::failure();
5310 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
5311 if (odsResult) return ::mlir::failure();
5314 auto loc = parser.getCurrentLocation();(void)loc;
5315 if (parser.parseOptionalAttrDict(result.attributes))
5316 return ::mlir::failure();
5318 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
5320 return ::mlir::failure();
5322 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
5323 return ::mlir::failure();
5324 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
5325 return ::mlir::failure();
5327 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
5329 result.location, result.operands,
5330 result.attributes.getDictionary(parser.getContext()),
5331 result.getRawProperties(),
5332 result.regions, inferredReturnTypes)))
5333 return ::mlir::failure();
5334 result.addTypes(inferredReturnTypes);
5335 return ::mlir::success();
5344 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
5345 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
5346 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
5347 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
5350void SubFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
5353 ::llvm::LogicalResult
5355 std::optional<::mlir::Location> location,
5356 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
5357 ::mlir::PropertyRef properties, ::mlir::RegionRange regions,
5358 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
5361 location, adaptor, inferredReturnTypes);
5366 mlir::MLIRContext *context, std::optional<mlir::Location> loc, Adaptor adaptor,
5367 llvm::SmallVectorImpl<mlir::Type> &inferred
5370 auto value = adaptor.getLhs();
5371 inferred[0] = value ? value.getType() :
FeltType::get(context, mlir::StringAttr());
5372 return mlir::success();
5398 return ::mlir::success();
5402 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
5404 emitError() <<
"expected DictionaryAttr to set properties";
5405 return ::mlir::failure();
5407 return ::mlir::success();
5411 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
5412 ::mlir::Builder odsBuilder{ctx};
5415 return odsBuilder.getDictionaryAttr(attrs);
5420 using llvm::hash_value;
5421 return llvm::hash_combine();
5425 return std::nullopt;
5435 return ::mlir::success();
5438void UnsignedIntDivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
5439 odsState.addOperands(lhs);
5440 odsState.addOperands(rhs);
5441 odsState.addTypes(result);
5446 build(builder, __state__, std::forward<
decltype(result)>(result), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
5447 auto __res__ = ::llvm::dyn_cast<UnsignedIntDivFeltOp>(builder.create(__state__));
5448 assert(__res__ &&
"builder didn't return the right type");
5453 return create(builder, builder.getLoc(), std::forward<
decltype(result)>(result), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
5457 odsState.addOperands(lhs);
5458 odsState.addOperands(rhs);
5460 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
5462 odsState.location, odsState.operands,
5463 odsState.attributes.getDictionary(odsState.getContext()),
5464 odsState.getRawProperties(),
5465 odsState.regions, inferredReturnTypes)))
5466 odsState.addTypes(inferredReturnTypes);
5468 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
5474 build(builder, __state__, std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
5475 auto __res__ = ::llvm::dyn_cast<UnsignedIntDivFeltOp>(builder.create(__state__));
5476 assert(__res__ &&
"builder didn't return the right type");
5481 return create(builder, builder.getLoc(), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
5484void UnsignedIntDivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
5485 odsState.addOperands(lhs);
5486 odsState.addOperands(rhs);
5487 assert(resultTypes.size() == 1u &&
"mismatched number of results");
5488 odsState.addTypes(resultTypes);
5493 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
5494 auto __res__ = ::llvm::dyn_cast<UnsignedIntDivFeltOp>(builder.create(__state__));
5495 assert(__res__ &&
"builder didn't return the right type");
5500 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
5503void UnsignedIntDivFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5504 assert(operands.size() == 2u &&
"mismatched number of parameters");
5505 odsState.addOperands(operands);
5506 odsState.addAttributes(attributes);
5507 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
5508 odsState.addTypes(resultTypes);
5513 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
5514 auto __res__ = ::llvm::dyn_cast<UnsignedIntDivFeltOp>(builder.create(__state__));
5515 assert(__res__ &&
"builder didn't return the right type");
5520 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
5523void UnsignedIntDivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5524 assert(operands.size() == 2u &&
"mismatched number of parameters");
5525 odsState.addOperands(operands);
5526 odsState.addAttributes(attributes);
5528 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
5530 odsState.location, operands,
5531 odsState.attributes.getDictionary(odsState.getContext()),
5532 odsState.getRawProperties(),
5533 odsState.regions, inferredReturnTypes))) {
5534 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
5535 odsState.addTypes(inferredReturnTypes);
5537 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
5543 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
5544 auto __res__ = ::llvm::dyn_cast<UnsignedIntDivFeltOp>(builder.create(__state__));
5545 assert(__res__ &&
"builder didn't return the right type");
5550 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
5553void UnsignedIntDivFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
5554 assert(operands.size() == 2u &&
"mismatched number of parameters");
5555 odsState.addOperands(operands);
5556 odsState.useProperties(
const_cast<Properties&
>(properties));
5557 odsState.addAttributes(discardableAttributes);
5558 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
5559 odsState.addTypes(resultTypes);
5564 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
5565 auto __res__ = ::llvm::dyn_cast<UnsignedIntDivFeltOp>(builder.create(__state__));
5566 assert(__res__ &&
"builder didn't return the right type");
5571 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
5574void UnsignedIntDivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
5575 assert(operands.size() == 2u &&
"mismatched number of parameters");
5576 odsState.addOperands(operands);
5577 odsState.useProperties(
const_cast<Properties &
>(properties));
5578 odsState.addAttributes(discardableAttributes);
5580 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
5582 odsState.location, operands,
5583 odsState.attributes.getDictionary(odsState.getContext()),
5584 odsState.getRawProperties(),
5585 odsState.regions, inferredReturnTypes))) {
5586 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
5587 odsState.addTypes(inferredReturnTypes);
5589 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
5595 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
5596 auto __res__ = ::llvm::dyn_cast<UnsignedIntDivFeltOp>(builder.create(__state__));
5597 assert(__res__ &&
"builder didn't return the right type");
5602 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
5607 unsigned index = 0; (void)index;
5610 for (
auto v : valueGroup0) {
5611 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
5612 return ::mlir::failure();
5616 for (
auto v : valueGroup1) {
5617 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
5618 return ::mlir::failure();
5622 unsigned index = 0; (void)index;
5625 for (
auto v : valueGroup0) {
5626 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
5627 return ::mlir::failure();
5631 return emitOpError(
"failed to verify that rhs type matches with lhs type");
5633 return emitOpError(
"failed to verify that result type matches with lhs type");
5635 return emitOpError(
"failed to verify that result type matches with rhs type");
5636 return ::mlir::success();
5644 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
5645 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
5646 (void)lhsOperandsLoc;
5647 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
5648 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
5649 (void)rhsOperandsLoc;
5650 ::mlir::Type lhsRawType{};
5651 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
5652 ::mlir::Type rhsRawType{};
5653 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
5655 lhsOperandsLoc = parser.getCurrentLocation();
5656 if (parser.parseOperand(lhsRawOperand))
5657 return ::mlir::failure();
5658 if (parser.parseComma())
5659 return ::mlir::failure();
5661 rhsOperandsLoc = parser.getCurrentLocation();
5662 if (parser.parseOperand(rhsRawOperand))
5663 return ::mlir::failure();
5665 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
5666 if (odsResult) return ::mlir::failure();
5669 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
5670 if (odsResult) return ::mlir::failure();
5673 auto loc = parser.getCurrentLocation();(void)loc;
5674 if (parser.parseOptionalAttrDict(result.attributes))
5675 return ::mlir::failure();
5677 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
5679 return ::mlir::failure();
5681 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
5682 return ::mlir::failure();
5683 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
5684 return ::mlir::failure();
5686 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
5688 result.location, result.operands,
5689 result.attributes.getDictionary(parser.getContext()),
5690 result.getRawProperties(),
5691 result.regions, inferredReturnTypes)))
5692 return ::mlir::failure();
5693 result.addTypes(inferredReturnTypes);
5694 return ::mlir::success();
5703 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
5704 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
5705 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
5706 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
5712 ::llvm::LogicalResult
5714 std::optional<::mlir::Location> location,
5715 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
5716 ::mlir::PropertyRef properties, ::mlir::RegionRange regions,
5717 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
5720 location, adaptor, inferredReturnTypes);
5725 mlir::MLIRContext *context, std::optional<mlir::Location> loc, Adaptor adaptor,
5726 llvm::SmallVectorImpl<mlir::Type> &inferred
5729 auto value = adaptor.getLhs();
5730 inferred[0] = value ? value.getType() :
FeltType::get(context, mlir::StringAttr());
5731 return mlir::success();
5757 return ::mlir::success();
5761 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
5763 emitError() <<
"expected DictionaryAttr to set properties";
5764 return ::mlir::failure();
5766 return ::mlir::success();
5770 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
5771 ::mlir::Builder odsBuilder{ctx};
5774 return odsBuilder.getDictionaryAttr(attrs);
5779 using llvm::hash_value;
5780 return llvm::hash_combine();
5784 return std::nullopt;
5794 return ::mlir::success();
5797void UnsignedModFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
5798 odsState.addOperands(lhs);
5799 odsState.addOperands(rhs);
5800 odsState.addTypes(result);
5805 build(builder, __state__, std::forward<
decltype(result)>(result), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
5806 auto __res__ = ::llvm::dyn_cast<UnsignedModFeltOp>(builder.create(__state__));
5807 assert(__res__ &&
"builder didn't return the right type");
5812 return create(builder, builder.getLoc(), std::forward<
decltype(result)>(result), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
5816 odsState.addOperands(lhs);
5817 odsState.addOperands(rhs);
5819 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
5821 odsState.location, odsState.operands,
5822 odsState.attributes.getDictionary(odsState.getContext()),
5823 odsState.getRawProperties(),
5824 odsState.regions, inferredReturnTypes)))
5825 odsState.addTypes(inferredReturnTypes);
5827 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
5833 build(builder, __state__, std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
5834 auto __res__ = ::llvm::dyn_cast<UnsignedModFeltOp>(builder.create(__state__));
5835 assert(__res__ &&
"builder didn't return the right type");
5840 return create(builder, builder.getLoc(), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
5843void UnsignedModFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
5844 odsState.addOperands(lhs);
5845 odsState.addOperands(rhs);
5846 assert(resultTypes.size() == 1u &&
"mismatched number of results");
5847 odsState.addTypes(resultTypes);
5852 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
5853 auto __res__ = ::llvm::dyn_cast<UnsignedModFeltOp>(builder.create(__state__));
5854 assert(__res__ &&
"builder didn't return the right type");
5859 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
5862void UnsignedModFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5863 assert(operands.size() == 2u &&
"mismatched number of parameters");
5864 odsState.addOperands(operands);
5865 odsState.addAttributes(attributes);
5866 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
5867 odsState.addTypes(resultTypes);
5872 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
5873 auto __res__ = ::llvm::dyn_cast<UnsignedModFeltOp>(builder.create(__state__));
5874 assert(__res__ &&
"builder didn't return the right type");
5879 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
5882void UnsignedModFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5883 assert(operands.size() == 2u &&
"mismatched number of parameters");
5884 odsState.addOperands(operands);
5885 odsState.addAttributes(attributes);
5887 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
5889 odsState.location, operands,
5890 odsState.attributes.getDictionary(odsState.getContext()),
5891 odsState.getRawProperties(),
5892 odsState.regions, inferredReturnTypes))) {
5893 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
5894 odsState.addTypes(inferredReturnTypes);
5896 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
5902 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
5903 auto __res__ = ::llvm::dyn_cast<UnsignedModFeltOp>(builder.create(__state__));
5904 assert(__res__ &&
"builder didn't return the right type");
5909 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
5912void UnsignedModFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
5913 assert(operands.size() == 2u &&
"mismatched number of parameters");
5914 odsState.addOperands(operands);
5915 odsState.useProperties(
const_cast<Properties&
>(properties));
5916 odsState.addAttributes(discardableAttributes);
5917 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
5918 odsState.addTypes(resultTypes);
5923 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
5924 auto __res__ = ::llvm::dyn_cast<UnsignedModFeltOp>(builder.create(__state__));
5925 assert(__res__ &&
"builder didn't return the right type");
5930 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
5933void UnsignedModFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
5934 assert(operands.size() == 2u &&
"mismatched number of parameters");
5935 odsState.addOperands(operands);
5936 odsState.useProperties(
const_cast<Properties &
>(properties));
5937 odsState.addAttributes(discardableAttributes);
5939 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
5941 odsState.location, operands,
5942 odsState.attributes.getDictionary(odsState.getContext()),
5943 odsState.getRawProperties(),
5944 odsState.regions, inferredReturnTypes))) {
5945 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
5946 odsState.addTypes(inferredReturnTypes);
5948 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
5954 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
5955 auto __res__ = ::llvm::dyn_cast<UnsignedModFeltOp>(builder.create(__state__));
5956 assert(__res__ &&
"builder didn't return the right type");
5961 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
5966 unsigned index = 0; (void)index;
5969 for (
auto v : valueGroup0) {
5970 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
5971 return ::mlir::failure();
5975 for (
auto v : valueGroup1) {
5976 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
5977 return ::mlir::failure();
5981 unsigned index = 0; (void)index;
5984 for (
auto v : valueGroup0) {
5985 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
5986 return ::mlir::failure();
5990 return emitOpError(
"failed to verify that rhs type matches with lhs type");
5992 return emitOpError(
"failed to verify that result type matches with lhs type");
5994 return emitOpError(
"failed to verify that result type matches with rhs type");
5995 return ::mlir::success();
6003 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
6004 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
6005 (void)lhsOperandsLoc;
6006 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
6007 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
6008 (void)rhsOperandsLoc;
6009 ::mlir::Type lhsRawType{};
6010 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
6011 ::mlir::Type rhsRawType{};
6012 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
6014 lhsOperandsLoc = parser.getCurrentLocation();
6015 if (parser.parseOperand(lhsRawOperand))
6016 return ::mlir::failure();
6017 if (parser.parseComma())
6018 return ::mlir::failure();
6020 rhsOperandsLoc = parser.getCurrentLocation();
6021 if (parser.parseOperand(rhsRawOperand))
6022 return ::mlir::failure();
6024 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
6025 if (odsResult) return ::mlir::failure();
6028 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
6029 if (odsResult) return ::mlir::failure();
6032 auto loc = parser.getCurrentLocation();(void)loc;
6033 if (parser.parseOptionalAttrDict(result.attributes))
6034 return ::mlir::failure();
6036 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
6038 return ::mlir::failure();
6040 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
6041 return ::mlir::failure();
6042 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
6043 return ::mlir::failure();
6045 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
6047 result.location, result.operands,
6048 result.attributes.getDictionary(parser.getContext()),
6049 result.getRawProperties(),
6050 result.regions, inferredReturnTypes)))
6051 return ::mlir::failure();
6052 result.addTypes(inferredReturnTypes);
6053 return ::mlir::success();
6062 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
6063 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
6064 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
6065 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
6071 ::llvm::LogicalResult
6073 std::optional<::mlir::Location> location,
6074 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
6075 ::mlir::PropertyRef properties, ::mlir::RegionRange regions,
6076 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
6079 location, adaptor, inferredReturnTypes);
6084 mlir::MLIRContext *context, std::optional<mlir::Location> loc, Adaptor adaptor,
6085 llvm::SmallVectorImpl<mlir::Type> &inferred
6088 auto value = adaptor.getLhs();
6089 inferred[0] = value ? value.getType() :
FeltType::get(context, mlir::StringAttr());
6090 return mlir::success();
6116 return ::mlir::success();
6120 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
6122 emitError() <<
"expected DictionaryAttr to set properties";
6123 return ::mlir::failure();
6125 return ::mlir::success();
6129 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
6130 ::mlir::Builder odsBuilder{ctx};
6133 return odsBuilder.getDictionaryAttr(attrs);
6138 using llvm::hash_value;
6139 return llvm::hash_combine();
6143 return std::nullopt;
6152::llvm::LogicalResult
XorFeltOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
6153 return ::mlir::success();
6156void XorFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
6157 odsState.addOperands(lhs);
6158 odsState.addOperands(rhs);
6159 odsState.addTypes(result);
6164 build(builder, __state__, std::forward<
decltype(result)>(result), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
6165 auto __res__ = ::llvm::dyn_cast<XorFeltOp>(builder.create(__state__));
6166 assert(__res__ &&
"builder didn't return the right type");
6171 return create(builder, builder.getLoc(), std::forward<
decltype(result)>(result), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
6174void XorFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
6175 odsState.addOperands(lhs);
6176 odsState.addOperands(rhs);
6178 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
6180 odsState.location, odsState.operands,
6181 odsState.attributes.getDictionary(odsState.getContext()),
6182 odsState.getRawProperties(),
6183 odsState.regions, inferredReturnTypes)))
6184 odsState.addTypes(inferredReturnTypes);
6186 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
6192 build(builder, __state__, std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
6193 auto __res__ = ::llvm::dyn_cast<XorFeltOp>(builder.create(__state__));
6194 assert(__res__ &&
"builder didn't return the right type");
6199 return create(builder, builder.getLoc(), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
6202void XorFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
6203 odsState.addOperands(lhs);
6204 odsState.addOperands(rhs);
6205 assert(resultTypes.size() == 1u &&
"mismatched number of results");
6206 odsState.addTypes(resultTypes);
6209XorFeltOp XorFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
6211 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
6212 auto __res__ = ::llvm::dyn_cast<XorFeltOp>(builder.create(__state__));
6213 assert(__res__ &&
"builder didn't return the right type");
6218 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(lhs)>(lhs), std::forward<
decltype(rhs)>(rhs));
6221void XorFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
6222 assert(operands.size() == 2u &&
"mismatched number of parameters");
6223 odsState.addOperands(operands);
6224 odsState.addAttributes(attributes);
6225 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
6226 odsState.addTypes(resultTypes);
6229XorFeltOp XorFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
6231 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
6232 auto __res__ = ::llvm::dyn_cast<XorFeltOp>(builder.create(__state__));
6233 assert(__res__ &&
"builder didn't return the right type");
6237XorFeltOp XorFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
6238 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
6241void XorFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
6242 assert(operands.size() == 2u &&
"mismatched number of parameters");
6243 odsState.addOperands(operands);
6244 odsState.addAttributes(attributes);
6246 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
6248 odsState.location, operands,
6249 odsState.attributes.getDictionary(odsState.getContext()),
6250 odsState.getRawProperties(),
6251 odsState.regions, inferredReturnTypes))) {
6252 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
6253 odsState.addTypes(inferredReturnTypes);
6255 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
6259XorFeltOp XorFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
6261 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
6262 auto __res__ = ::llvm::dyn_cast<XorFeltOp>(builder.create(__state__));
6263 assert(__res__ &&
"builder didn't return the right type");
6267XorFeltOp XorFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
6268 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
6271void XorFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
6272 assert(operands.size() == 2u &&
"mismatched number of parameters");
6273 odsState.addOperands(operands);
6274 odsState.useProperties(
const_cast<Properties&
>(properties));
6275 odsState.addAttributes(discardableAttributes);
6276 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
6277 odsState.addTypes(resultTypes);
6280XorFeltOp XorFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
6282 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
6283 auto __res__ = ::llvm::dyn_cast<XorFeltOp>(builder.create(__state__));
6284 assert(__res__ &&
"builder didn't return the right type");
6288XorFeltOp XorFeltOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
6289 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
6292void XorFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
6293 assert(operands.size() == 2u &&
"mismatched number of parameters");
6294 odsState.addOperands(operands);
6295 odsState.useProperties(
const_cast<Properties &
>(properties));
6296 odsState.addAttributes(discardableAttributes);
6298 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
6300 odsState.location, operands,
6301 odsState.attributes.getDictionary(odsState.getContext()),
6302 odsState.getRawProperties(),
6303 odsState.regions, inferredReturnTypes))) {
6304 assert(inferredReturnTypes.size() == 1u &&
"mismatched number of return types");
6305 odsState.addTypes(inferredReturnTypes);
6307 ::llvm::report_fatal_error(
"Failed to infer result type(s).");
6311XorFeltOp XorFeltOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
6313 build(builder, __state__, std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
6314 auto __res__ = ::llvm::dyn_cast<XorFeltOp>(builder.create(__state__));
6315 assert(__res__ &&
"builder didn't return the right type");
6320 return create(builder, builder.getLoc(), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
6325 unsigned index = 0; (void)index;
6328 for (
auto v : valueGroup0) {
6329 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
6330 return ::mlir::failure();
6334 for (
auto v : valueGroup1) {
6335 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
6336 return ::mlir::failure();
6340 unsigned index = 0; (void)index;
6343 for (
auto v : valueGroup0) {
6344 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
6345 return ::mlir::failure();
6349 return emitOpError(
"failed to verify that rhs type matches with lhs type");
6351 return emitOpError(
"failed to verify that result type matches with lhs type");
6353 return emitOpError(
"failed to verify that result type matches with rhs type");
6354 return ::mlir::success();
6361::mlir::ParseResult
XorFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
6362 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
6363 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
6364 (void)lhsOperandsLoc;
6365 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
6366 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
6367 (void)rhsOperandsLoc;
6368 ::mlir::Type lhsRawType{};
6369 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
6370 ::mlir::Type rhsRawType{};
6371 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
6373 lhsOperandsLoc = parser.getCurrentLocation();
6374 if (parser.parseOperand(lhsRawOperand))
6375 return ::mlir::failure();
6376 if (parser.parseComma())
6377 return ::mlir::failure();
6379 rhsOperandsLoc = parser.getCurrentLocation();
6380 if (parser.parseOperand(rhsRawOperand))
6381 return ::mlir::failure();
6383 auto odsResult = parseInferredOrParsedType(parser, lhsRawType,
true);
6384 if (odsResult) return ::mlir::failure();
6387 auto odsResult = parseInferredOrParsedType(parser, rhsRawType,
false);
6388 if (odsResult) return ::mlir::failure();
6391 auto loc = parser.getCurrentLocation();(void)loc;
6392 if (parser.parseOptionalAttrDict(result.attributes))
6393 return ::mlir::failure();
6395 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
6397 return ::mlir::failure();
6399 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
6400 return ::mlir::failure();
6401 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
6402 return ::mlir::failure();
6404 ::llvm::SmallVector<::mlir::Type> inferredReturnTypes;
6406 result.location, result.operands,
6407 result.attributes.getDictionary(parser.getContext()),
6408 result.getRawProperties(),
6409 result.regions, inferredReturnTypes)))
6410 return ::mlir::failure();
6411 result.addTypes(inferredReturnTypes);
6412 return ::mlir::success();
6421 printInferredOrParsedType(_odsPrinter, *
this,
getLhs().getType(),
true);
6422 printInferredOrParsedType(_odsPrinter, *
this,
getRhs().getType(),
false);
6423 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
6424 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
6427void XorFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
6430 ::llvm::LogicalResult
6432 std::optional<::mlir::Location> location,
6433 ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
6434 ::mlir::PropertyRef properties, ::mlir::RegionRange regions,
6435 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
6438 location, adaptor, inferredReturnTypes);
6443 mlir::MLIRContext *context, std::optional<mlir::Location> loc, Adaptor adaptor,
6444 llvm::SmallVectorImpl<mlir::Type> &inferred
6447 auto value = adaptor.getLhs();
6448 inferred[0] = value ? value.getType() :
FeltType::get(context, mlir::StringAttr());
6449 return mlir::success();
::llvm::LogicalResult verify(::mlir::Location loc)
AddFeltOpAdaptor(AddFeltOp op)
AddFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::ValueRange getOperands()
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::llvm::LogicalResult verifyInvariants()
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::TypedValue<::mlir::Type > getLhs()
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
static constexpr ::llvm::StringLiteral getOperationName()
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::llvm::LogicalResult verifyInvariantsImpl()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::mlir::Operation::result_range getODSResults(unsigned index)
static llvm::hash_code computePropertiesHash(const Properties &prop)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::mlir::TypedValue<::mlir::Type > getRhs()
FoldAdaptor::Properties Properties
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::Operation::operand_range getODSOperands(unsigned index)
static AddFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
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 Properties &properties, ::mlir::RegionRange regions={})
::mlir::ValueRange getOperands()
static constexpr ::llvm::StringLiteral getOperationName()
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
static llvm::hash_code computePropertiesHash(const Properties &prop)
::llvm::LogicalResult verifyInvariantsImpl()
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
void print(::mlir::OpAsmPrinter &_odsPrinter)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
::llvm::LogicalResult verifyInvariants()
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::TypedValue<::mlir::Type > getRhs()
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::Operation::operand_range getODSOperands(unsigned index)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::mlir::TypedValue<::mlir::Type > getLhs()
static AndFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
::mlir::Operation::result_range getODSResults(unsigned index)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
FoldAdaptor::Properties Properties
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::llvm::LogicalResult verify(::mlir::Location loc)
DivFeltOpAdaptor(DivFeltOp op)
DivFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::ValueRange getOperands()
::mlir::Operation::result_range getODSResults(unsigned index)
static constexpr ::llvm::StringLiteral getOperationName()
::llvm::LogicalResult verifyInvariantsImpl()
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
void print(::mlir::OpAsmPrinter &_odsPrinter)
static llvm::hash_code computePropertiesHash(const Properties &prop)
::mlir::TypedValue<::mlir::Type > getRhs()
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
::mlir::TypedValue<::mlir::Type > getLhs()
static DivFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
FoldAdaptor::Properties Properties
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef 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)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::llvm::LogicalResult verify(::mlir::Location loc)
FeltConstantOpAdaptor(FeltConstantOp op)
FeltConstantOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::ValueRange getOperands()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::felt::FeltConstAttr value)
void writeProperties(::mlir::DialectBytecodeWriter &writer)
FeltConstantOpAdaptor Adaptor
::llvm::LogicalResult canonicalize(FeltConstantOp op, ::mlir::PatternRewriter &rewriter)
Replaces a constant's raw value with its canonical field representative.
FoldAdaptor::Properties Properties
void print(::mlir::OpAsmPrinter &_odsPrinter)
static constexpr ::llvm::StringLiteral getOperationName()
static void getCanonicalizationPatterns(::mlir::RewritePatternSet &results, ::mlir::MLIRContext *context)
::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()
static FeltConstantOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::llzk::felt::FeltConstAttr value)
::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 inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
::llzk::felt::FeltConstAttr getValue()
static FeltType get(::mlir::MLIRContext *context, ::mlir::StringAttr fieldName)
InvFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
InvFeltOpAdaptor(InvFeltOp op)
::mlir::ValueRange getOperands()
static InvFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value operand)
::mlir::TypedValue<::mlir::Type > getOperand()
::mlir::Operation::result_range getODSResults(unsigned index)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::llvm::LogicalResult verifyInvariants()
FoldAdaptor::Properties Properties
static llvm::hash_code computePropertiesHash(const Properties &prop)
static constexpr ::llvm::StringLiteral getOperationName()
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::mlir::Operation::operand_range getODSOperands(unsigned index)
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value operand)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::llvm::LogicalResult verifyInvariantsImpl()
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
MulFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
MulFeltOpAdaptor(MulFeltOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
::mlir::ValueRange getOperands()
void print(::mlir::OpAsmPrinter &_odsPrinter)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::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::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::mlir::TypedValue<::mlir::Type > getRhs()
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
static llvm::hash_code computePropertiesHash(const Properties &prop)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
FoldAdaptor::Properties Properties
static MulFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
static constexpr ::llvm::StringLiteral getOperationName()
::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()
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
::mlir::Operation::operand_range getODSOperands(unsigned index)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
NegFeltOpAdaptor(NegFeltOp op)
NegFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::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)
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
FoldAdaptor::Properties Properties
::llvm::LogicalResult verifyInvariants()
static llvm::hash_code computePropertiesHash(const Properties &prop)
::mlir::TypedValue<::mlir::Type > getOperand()
static NegFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value operand)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
::mlir::Operation::result_range getODSResults(unsigned index)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
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)
::mlir::Operation::operand_range getODSOperands(unsigned index)
static constexpr ::llvm::StringLiteral getOperationName()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
NotFeltOpAdaptor(NotFeltOp op)
NotFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
::mlir::ValueRange getOperands()
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::llvm::LogicalResult verifyInvariantsImpl()
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static llvm::hash_code computePropertiesHash(const Properties &prop)
::mlir::Operation::result_range getODSResults(unsigned index)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::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()
static constexpr ::llvm::StringLiteral getOperationName()
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
FoldAdaptor::Properties Properties
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static NotFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value operand)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
OrFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
OrFeltOpAdaptor(OrFeltOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
::mlir::ValueRange getOperands()
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static llvm::hash_code computePropertiesHash(const Properties &prop)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::Operation::result_range getODSResults(unsigned index)
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
void print(::mlir::OpAsmPrinter &_odsPrinter)
static constexpr ::llvm::StringLiteral getOperationName()
FoldAdaptor::Properties Properties
static OrFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
::mlir::Operation::operand_range getODSOperands(unsigned index)
::llvm::LogicalResult verifyInvariants()
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::mlir::TypedValue<::mlir::Type > getRhs()
::llvm::LogicalResult verifyInvariantsImpl()
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::mlir::TypedValue<::mlir::Type > getLhs()
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::llvm::LogicalResult verify(::mlir::Location loc)
PowFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
PowFeltOpAdaptor(PowFeltOp op)
::mlir::ValueRange getOperands()
static constexpr ::llvm::StringLiteral getOperationName()
::mlir::TypedValue<::mlir::Type > getLhs()
::mlir::Operation::operand_range getODSOperands(unsigned index)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::mlir::Operation::result_range getODSResults(unsigned index)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::TypedValue<::mlir::Type > getRhs()
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
static PowFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
::llvm::LogicalResult verifyInvariantsImpl()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
FoldAdaptor::Properties Properties
::llvm::LogicalResult verifyInvariants()
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
static llvm::hash_code computePropertiesHash(const Properties &prop)
::llvm::LogicalResult verify(::mlir::Location loc)
ShlFeltOpAdaptor(ShlFeltOp op)
ShlFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::ValueRange getOperands()
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
static constexpr ::llvm::StringLiteral getOperationName()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
::mlir::TypedValue<::mlir::Type > getLhs()
static ShlFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
::mlir::TypedValue<::mlir::Type > getRhs()
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::llvm::LogicalResult verifyInvariantsImpl()
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::mlir::Operation::operand_range getODSOperands(unsigned index)
static llvm::hash_code computePropertiesHash(const Properties &prop)
::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::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
::llvm::LogicalResult verifyInvariants()
FoldAdaptor::Properties Properties
ShrFeltOpAdaptor(ShrFeltOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
ShrFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::ValueRange getOperands()
::llvm::LogicalResult verifyInvariants()
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::Operation::operand_range getODSOperands(unsigned index)
::mlir::TypedValue<::mlir::Type > getRhs()
FoldAdaptor::Properties Properties
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
static ShrFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
::mlir::Operation::result_range getODSResults(unsigned index)
::llvm::LogicalResult verifyInvariantsImpl()
static constexpr ::llvm::StringLiteral getOperationName()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
::mlir::TypedValue<::mlir::Type > getLhs()
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
static llvm::hash_code computePropertiesHash(const Properties &prop)
::llvm::LogicalResult verify(::mlir::Location loc)
SignedIntDivFeltOpAdaptor(SignedIntDivFeltOp op)
SignedIntDivFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::ValueRange getOperands()
static constexpr ::llvm::StringLiteral getOperationName()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
::llvm::LogicalResult verifyInvariantsImpl()
::mlir::Operation::operand_range getODSOperands(unsigned index)
FoldAdaptor::Properties Properties
::mlir::Operation::result_range getODSResults(unsigned index)
::mlir::TypedValue<::mlir::Type > getRhs()
::mlir::TypedValue<::mlir::Type > getLhs()
static llvm::hash_code computePropertiesHash(const Properties &prop)
static SignedIntDivFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::llvm::LogicalResult verifyInvariants()
SignedIntDivFeltOpAdaptor Adaptor
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
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 setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
SignedModFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
SignedModFeltOpAdaptor(SignedModFeltOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
::mlir::ValueRange getOperands()
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
FoldAdaptor::Properties Properties
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
SignedModFeltOpAdaptor Adaptor
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::TypedValue<::mlir::Type > getRhs()
static llvm::hash_code computePropertiesHash(const Properties &prop)
static SignedModFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
void print(::mlir::OpAsmPrinter &_odsPrinter)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
static constexpr ::llvm::StringLiteral getOperationName()
::mlir::TypedValue<::mlir::Type > getLhs()
::mlir::Operation::result_range getODSResults(unsigned index)
::mlir::Operation::operand_range getODSOperands(unsigned index)
::llvm::LogicalResult verifyInvariantsImpl()
::llvm::LogicalResult verifyInvariants()
SubFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &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)
static SubFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
::llvm::LogicalResult verifyInvariantsImpl()
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::mlir::TypedValue<::mlir::Type > getRhs()
void print(::mlir::OpAsmPrinter &_odsPrinter)
static constexpr ::llvm::StringLiteral getOperationName()
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
FoldAdaptor::Properties Properties
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
static llvm::hash_code computePropertiesHash(const Properties &prop)
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::llvm::LogicalResult verifyInvariants()
::mlir::TypedValue<::mlir::Type > getLhs()
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
::mlir::Operation::operand_range getODSOperands(unsigned index)
UnsignedIntDivFeltOpAdaptor(UnsignedIntDivFeltOp op)
UnsignedIntDivFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
::mlir::ValueRange getOperands()
void print(::mlir::OpAsmPrinter &_odsPrinter)
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
static UnsignedIntDivFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
static llvm::hash_code computePropertiesHash(const Properties &prop)
::mlir::TypedValue<::mlir::Type > getRhs()
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static constexpr ::llvm::StringLiteral getOperationName()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
UnsignedIntDivFeltOpAdaptor Adaptor
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
FoldAdaptor::Properties Properties
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
::llvm::LogicalResult verifyInvariantsImpl()
::mlir::TypedValue<::mlir::Type > getLhs()
::mlir::Operation::result_range getODSResults(unsigned index)
::llvm::LogicalResult verifyInvariants()
::mlir::Operation::operand_range getODSOperands(unsigned index)
::llvm::LogicalResult verify(::mlir::Location loc)
UnsignedModFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
UnsignedModFeltOpAdaptor(UnsignedModFeltOp op)
::mlir::ValueRange getOperands()
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
static UnsignedModFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::mlir::TypedValue<::mlir::Type > getRhs()
::mlir::Operation::operand_range getODSOperands(unsigned index)
FoldAdaptor::Properties Properties
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
::llvm::LogicalResult verifyInvariants()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::Operation::result_range getODSResults(unsigned index)
UnsignedModFeltOpAdaptor Adaptor
::llvm::LogicalResult verifyInvariantsImpl()
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::mlir::TypedValue<::mlir::Type > getLhs()
void print(::mlir::OpAsmPrinter &_odsPrinter)
static llvm::hash_code computePropertiesHash(const Properties &prop)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
static constexpr ::llvm::StringLiteral getOperationName()
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
XorFeltOpAdaptor(XorFeltOp op)
XorFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
::mlir::ValueRange getOperands()
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static constexpr ::llvm::StringLiteral getOperationName()
static llvm::hash_code computePropertiesHash(const Properties &prop)
::mlir::Operation::result_range getODSResults(unsigned index)
::llvm::LogicalResult verifyInvariantsImpl()
static XorFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::TypedValue<::mlir::Type > getLhs()
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
::llvm::LogicalResult verifyInvariants()
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
FoldAdaptor::Properties Properties
::mlir::Operation::operand_range getODSOperands(unsigned index)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::TypedValue<::mlir::Type > getRhs()
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
const Properties & getProperties()
::mlir::RegionRange odsRegions
::mlir::DictionaryAttr odsAttrs
::std::optional<::mlir::OperationName > odsOpName
AddFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::DictionaryAttr odsAttrs
AndFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::RegionRange odsRegions
const Properties & getProperties()
::std::optional<::mlir::OperationName > odsOpName
DivFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::RegionRange odsRegions
::std::optional<::mlir::OperationName > odsOpName
::mlir::DictionaryAttr odsAttrs
const Properties & getProperties()
::mlir::RegionRange odsRegions
::llzk::felt::FeltConstAttr getValueAttr()
::std::optional<::mlir::OperationName > odsOpName
FeltConstantOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::DictionaryAttr odsAttrs
::llzk::felt::FeltConstAttr getValue()
const Properties & getProperties()
const Properties & getProperties()
InvFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::std::optional<::mlir::OperationName > odsOpName
::mlir::DictionaryAttr odsAttrs
::mlir::RegionRange odsRegions
MulFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
const Properties & getProperties()
::mlir::DictionaryAttr odsAttrs
::std::optional<::mlir::OperationName > odsOpName
::mlir::RegionRange odsRegions
::std::optional<::mlir::OperationName > odsOpName
const Properties & getProperties()
::mlir::RegionRange odsRegions
::mlir::DictionaryAttr odsAttrs
NegFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::RegionRange odsRegions
const Properties & getProperties()
::mlir::DictionaryAttr odsAttrs
NotFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::std::optional<::mlir::OperationName > odsOpName
const Properties & getProperties()
::mlir::DictionaryAttr odsAttrs
::mlir::RegionRange odsRegions
::std::optional<::mlir::OperationName > odsOpName
OrFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
const Properties & getProperties()
PowFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::RegionRange odsRegions
::std::optional<::mlir::OperationName > odsOpName
::mlir::DictionaryAttr odsAttrs
::std::optional<::mlir::OperationName > odsOpName
::mlir::RegionRange odsRegions
::mlir::DictionaryAttr odsAttrs
const Properties & getProperties()
ShlFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
ShrFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::DictionaryAttr odsAttrs
const Properties & getProperties()
::std::optional<::mlir::OperationName > odsOpName
::mlir::RegionRange odsRegions
SignedIntDivFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::std::optional<::mlir::OperationName > odsOpName
::mlir::RegionRange odsRegions
::mlir::DictionaryAttr odsAttrs
const Properties & getProperties()
::std::optional<::mlir::OperationName > odsOpName
::mlir::RegionRange odsRegions
const Properties & getProperties()
::mlir::DictionaryAttr odsAttrs
SignedModFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::DictionaryAttr odsAttrs
SubFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::std::optional<::mlir::OperationName > odsOpName
const Properties & getProperties()
::mlir::RegionRange odsRegions
::mlir::RegionRange odsRegions
UnsignedIntDivFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::DictionaryAttr odsAttrs
const Properties & getProperties()
::std::optional<::mlir::OperationName > odsOpName
::mlir::RegionRange odsRegions
const Properties & getProperties()
::std::optional<::mlir::OperationName > odsOpName
::mlir::DictionaryAttr odsAttrs
UnsignedModFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::DictionaryAttr odsAttrs
::std::optional<::mlir::OperationName > odsOpName
::mlir::RegionRange odsRegions
XorFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
const Properties & getProperties()
Common interface for binary arithmetic operations on felts.
Common interface for constant parameter-like symbol operations that can be defined within a TemplateO...
bool isValidType(Type type)
bool typesUnify(Type lhs, Type rhs, ArrayRef< StringRef > rhsReversePrefix, UnificationMap *unifications)