LLZK 0.1.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
Ops.cpp.inc
Go to the documentation of this file.
1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* Op Definitions *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* From: Ops.td *|
7|* *|
8\*===----------------------------------------------------------------------===*/
9
10#ifdef GET_OP_LIST
11#undef GET_OP_LIST
12
31#endif // GET_OP_LIST
32
33#ifdef GET_OP_CLASSES
34#undef GET_OP_CLASSES
35
36
37//===----------------------------------------------------------------------===//
38// Local Utility Method Definitions
39//===----------------------------------------------------------------------===//
40
41namespace llzk {
42namespace felt {
43
44static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops1(
45 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
46 unsigned valueIndex) {
47 if (!((::llvm::isa<llzk::polymorphic::TypeVarType,::llzk::felt::FeltType>(type)))) {
48 return op->emitOpError(valueKind) << " #" << valueIndex
49 << " must be finite field element or type variable, but got " << type;
50 }
51 return ::mlir::success();
52}
53
54static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops2(
55 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
56 unsigned valueIndex) {
57 if (!((::llvm::isa<::llzk::felt::FeltType>(type)))) {
58 return op->emitOpError(valueKind) << " #" << valueIndex
59 << " must be finite field element, but got " << type;
60 }
61 return ::mlir::success();
62}
63
64static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops1(
65 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
66 if (attr && !((::llvm::isa<::llzk::felt::FeltConstAttr>(attr))))
67 return emitError() << "attribute '" << attrName
68 << "' failed to satisfy constraint: finite field element";
69 return ::mlir::success();
70}
71static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops1(
72 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
73 return __mlir_ods_local_attr_constraint_Ops1(attr, attrName, [op]() {
74 return op->emitOpError();
75 });
76}
77} // namespace felt
78} // namespace llzk
79namespace llzk {
80namespace felt {
81
82//===----------------------------------------------------------------------===//
83// ::llzk::felt::AddFeltOp definitions
84//===----------------------------------------------------------------------===//
85
86namespace detail {
87} // namespace detail
89
90::llvm::LogicalResult AddFeltOpAdaptor::verify(::mlir::Location loc) {
91 return ::mlir::success();
92}
93
94void AddFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
95 odsState.addOperands(lhs);
96 odsState.addOperands(rhs);
97 odsState.addTypes(result);
98}
99
100void AddFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
101 odsState.addOperands(lhs);
102 odsState.addOperands(rhs);
103
104 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
105 if (::mlir::succeeded(AddFeltOp::inferReturnTypes(odsBuilder.getContext(),
106 odsState.location, odsState.operands,
107 odsState.attributes.getDictionary(odsState.getContext()),
108 odsState.getRawProperties(),
109 odsState.regions, inferredReturnTypes)))
110 odsState.addTypes(inferredReturnTypes);
111 else
112 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
113
114}
115
116void AddFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
117 odsState.addOperands(lhs);
118 odsState.addOperands(rhs);
119 assert(resultTypes.size() == 1u && "mismatched number of results");
120 odsState.addTypes(resultTypes);
121}
122
123void AddFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
124 assert(operands.size() == 2u && "mismatched number of parameters");
125 odsState.addOperands(operands);
126 odsState.addAttributes(attributes);
127 assert(resultTypes.size() == 1u && "mismatched number of return types");
128 odsState.addTypes(resultTypes);
129}
130
131void AddFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
132 assert(operands.size() == 2u && "mismatched number of parameters");
133 odsState.addOperands(operands);
134 odsState.addAttributes(attributes);
135
136 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
137 if (::mlir::succeeded(AddFeltOp::inferReturnTypes(odsBuilder.getContext(),
138 odsState.location, operands,
139 odsState.attributes.getDictionary(odsState.getContext()),
140 odsState.getRawProperties(),
141 odsState.regions, inferredReturnTypes))) {
142 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
143 odsState.addTypes(inferredReturnTypes);
144 } else {
145 ::llvm::report_fatal_error("Failed to infer result type(s).");
146 }
147}
148
149::llvm::LogicalResult AddFeltOp::verifyInvariantsImpl() {
150 {
151 unsigned index = 0; (void)index;
152 auto valueGroup0 = getODSOperands(0);
153
154 for (auto v : valueGroup0) {
155 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
156 return ::mlir::failure();
157 }
158 auto valueGroup1 = getODSOperands(1);
159
160 for (auto v : valueGroup1) {
161 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
162 return ::mlir::failure();
163 }
164 }
165 {
166 unsigned index = 0; (void)index;
167 auto valueGroup0 = getODSResults(0);
168
169 for (auto v : valueGroup0) {
170 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "result", index++)))
171 return ::mlir::failure();
172 }
173 }
174 if (!((::llzk::typesUnify((*this->getODSOperands(0).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
175 return emitOpError("failed to verify that result type matches with lhs type");
176 if (!((::llzk::typesUnify((*this->getODSOperands(1).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
177 return emitOpError("failed to verify that result type matches with rhs type");
178 return ::mlir::success();
179}
180
181::llvm::LogicalResult AddFeltOp::verifyInvariants() {
182 return verifyInvariantsImpl();
183}
184
185::llvm::LogicalResult AddFeltOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
186 inferredReturnTypes.resize(1);
187 ::mlir::Builder odsBuilder(context);
188 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::felt::FeltType>();
189 inferredReturnTypes[0] = odsInferredType0;
190 return ::mlir::success();
191}
192
193::mlir::ParseResult AddFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
194 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
195 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
196 (void)lhsOperandsLoc;
197 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
198 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
199 (void)rhsOperandsLoc;
200 ::mlir::Type lhsRawType{};
201 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
202 ::mlir::Type rhsRawType{};
203 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
204
205 lhsOperandsLoc = parser.getCurrentLocation();
206 if (parser.parseOperand(lhsRawOperand))
207 return ::mlir::failure();
208 if (parser.parseComma())
209 return ::mlir::failure();
210
211 rhsOperandsLoc = parser.getCurrentLocation();
212 if (parser.parseOperand(rhsRawOperand))
213 return ::mlir::failure();
214 {
215 auto odsResult = parseInferredOrParsedType(parser, lhsRawType, true);
216 if (odsResult) return ::mlir::failure();
217 }
218 {
219 auto odsResult = parseInferredOrParsedType(parser, rhsRawType, false);
220 if (odsResult) return ::mlir::failure();
221 }
222 {
223 auto loc = parser.getCurrentLocation();(void)loc;
224 if (parser.parseOptionalAttrDict(result.attributes))
225 return ::mlir::failure();
226 }
227 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::felt::FeltType>();
228 result.addTypes(odsBuildableType0);
229 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
230 return ::mlir::failure();
231 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
232 return ::mlir::failure();
233 return ::mlir::success();
234}
235
236void AddFeltOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
237 _odsPrinter << ' ';
238 _odsPrinter << getLhs();
239 _odsPrinter << ",";
240 _odsPrinter << ' ';
241 _odsPrinter << getRhs();
242 printInferredOrParsedType(_odsPrinter, *this, getLhs().getType(), true);
243 printInferredOrParsedType(_odsPrinter, *this, getRhs().getType(), false);
244 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
245 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
246}
247
248void AddFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
249}
250
251} // namespace felt
252} // namespace llzk
253MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::felt::AddFeltOp)
254
255namespace llzk {
256namespace felt {
257
258//===----------------------------------------------------------------------===//
259// ::llzk::felt::AndFeltOp definitions
260//===----------------------------------------------------------------------===//
261
262namespace detail {
263} // namespace detail
265
266::llvm::LogicalResult AndFeltOpAdaptor::verify(::mlir::Location loc) {
267 return ::mlir::success();
268}
269
270void AndFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
271 odsState.addOperands(lhs);
272 odsState.addOperands(rhs);
273 odsState.addTypes(result);
274}
275
276void AndFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
277 odsState.addOperands(lhs);
278 odsState.addOperands(rhs);
279
280 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
281 if (::mlir::succeeded(AndFeltOp::inferReturnTypes(odsBuilder.getContext(),
282 odsState.location, odsState.operands,
283 odsState.attributes.getDictionary(odsState.getContext()),
284 odsState.getRawProperties(),
285 odsState.regions, inferredReturnTypes)))
286 odsState.addTypes(inferredReturnTypes);
287 else
288 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
289
290}
291
292void AndFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
293 odsState.addOperands(lhs);
294 odsState.addOperands(rhs);
295 assert(resultTypes.size() == 1u && "mismatched number of results");
296 odsState.addTypes(resultTypes);
297}
298
299void AndFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
300 assert(operands.size() == 2u && "mismatched number of parameters");
301 odsState.addOperands(operands);
302 odsState.addAttributes(attributes);
303 assert(resultTypes.size() == 1u && "mismatched number of return types");
304 odsState.addTypes(resultTypes);
305}
306
307void AndFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
308 assert(operands.size() == 2u && "mismatched number of parameters");
309 odsState.addOperands(operands);
310 odsState.addAttributes(attributes);
311
312 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
313 if (::mlir::succeeded(AndFeltOp::inferReturnTypes(odsBuilder.getContext(),
314 odsState.location, operands,
315 odsState.attributes.getDictionary(odsState.getContext()),
316 odsState.getRawProperties(),
317 odsState.regions, inferredReturnTypes))) {
318 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
319 odsState.addTypes(inferredReturnTypes);
320 } else {
321 ::llvm::report_fatal_error("Failed to infer result type(s).");
322 }
323}
324
325::llvm::LogicalResult AndFeltOp::verifyInvariantsImpl() {
326 {
327 unsigned index = 0; (void)index;
328 auto valueGroup0 = getODSOperands(0);
329
330 for (auto v : valueGroup0) {
331 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
332 return ::mlir::failure();
333 }
334 auto valueGroup1 = getODSOperands(1);
335
336 for (auto v : valueGroup1) {
337 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
338 return ::mlir::failure();
339 }
340 }
341 {
342 unsigned index = 0; (void)index;
343 auto valueGroup0 = getODSResults(0);
344
345 for (auto v : valueGroup0) {
346 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "result", index++)))
347 return ::mlir::failure();
348 }
349 }
350 if (!((::llzk::typesUnify((*this->getODSOperands(0).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
351 return emitOpError("failed to verify that result type matches with lhs type");
352 if (!((::llzk::typesUnify((*this->getODSOperands(1).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
353 return emitOpError("failed to verify that result type matches with rhs type");
354 return ::mlir::success();
355}
356
357::llvm::LogicalResult AndFeltOp::verifyInvariants() {
358 return verifyInvariantsImpl();
359}
360
361::llvm::LogicalResult AndFeltOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
362 inferredReturnTypes.resize(1);
363 ::mlir::Builder odsBuilder(context);
364 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::felt::FeltType>();
365 inferredReturnTypes[0] = odsInferredType0;
366 return ::mlir::success();
367}
368
369::mlir::ParseResult AndFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
370 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
371 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
372 (void)lhsOperandsLoc;
373 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
374 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
375 (void)rhsOperandsLoc;
376 ::mlir::Type lhsRawType{};
377 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
378 ::mlir::Type rhsRawType{};
379 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
380
381 lhsOperandsLoc = parser.getCurrentLocation();
382 if (parser.parseOperand(lhsRawOperand))
383 return ::mlir::failure();
384 if (parser.parseComma())
385 return ::mlir::failure();
386
387 rhsOperandsLoc = parser.getCurrentLocation();
388 if (parser.parseOperand(rhsRawOperand))
389 return ::mlir::failure();
390 {
391 auto odsResult = parseInferredOrParsedType(parser, lhsRawType, true);
392 if (odsResult) return ::mlir::failure();
393 }
394 {
395 auto odsResult = parseInferredOrParsedType(parser, rhsRawType, false);
396 if (odsResult) return ::mlir::failure();
397 }
398 {
399 auto loc = parser.getCurrentLocation();(void)loc;
400 if (parser.parseOptionalAttrDict(result.attributes))
401 return ::mlir::failure();
402 }
403 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::felt::FeltType>();
404 result.addTypes(odsBuildableType0);
405 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
406 return ::mlir::failure();
407 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
408 return ::mlir::failure();
409 return ::mlir::success();
410}
411
412void AndFeltOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
413 _odsPrinter << ' ';
414 _odsPrinter << getLhs();
415 _odsPrinter << ",";
416 _odsPrinter << ' ';
417 _odsPrinter << getRhs();
418 printInferredOrParsedType(_odsPrinter, *this, getLhs().getType(), true);
419 printInferredOrParsedType(_odsPrinter, *this, getRhs().getType(), false);
420 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
421 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
422}
423
424void AndFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
425}
426
427} // namespace felt
428} // namespace llzk
429MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::felt::AndFeltOp)
430
431namespace llzk {
432namespace felt {
433
434//===----------------------------------------------------------------------===//
435// ::llzk::felt::DivFeltOp definitions
436//===----------------------------------------------------------------------===//
437
438namespace detail {
439} // namespace detail
441
442::llvm::LogicalResult DivFeltOpAdaptor::verify(::mlir::Location loc) {
443 return ::mlir::success();
444}
445
446void DivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
447 odsState.addOperands(lhs);
448 odsState.addOperands(rhs);
449 odsState.addTypes(result);
450}
451
452void DivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
453 odsState.addOperands(lhs);
454 odsState.addOperands(rhs);
455
456 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
457 if (::mlir::succeeded(DivFeltOp::inferReturnTypes(odsBuilder.getContext(),
458 odsState.location, odsState.operands,
459 odsState.attributes.getDictionary(odsState.getContext()),
460 odsState.getRawProperties(),
461 odsState.regions, inferredReturnTypes)))
462 odsState.addTypes(inferredReturnTypes);
463 else
464 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
465
466}
467
468void DivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
469 odsState.addOperands(lhs);
470 odsState.addOperands(rhs);
471 assert(resultTypes.size() == 1u && "mismatched number of results");
472 odsState.addTypes(resultTypes);
473}
474
475void DivFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
476 assert(operands.size() == 2u && "mismatched number of parameters");
477 odsState.addOperands(operands);
478 odsState.addAttributes(attributes);
479 assert(resultTypes.size() == 1u && "mismatched number of return types");
480 odsState.addTypes(resultTypes);
481}
482
483void DivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
484 assert(operands.size() == 2u && "mismatched number of parameters");
485 odsState.addOperands(operands);
486 odsState.addAttributes(attributes);
487
488 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
489 if (::mlir::succeeded(DivFeltOp::inferReturnTypes(odsBuilder.getContext(),
490 odsState.location, operands,
491 odsState.attributes.getDictionary(odsState.getContext()),
492 odsState.getRawProperties(),
493 odsState.regions, inferredReturnTypes))) {
494 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
495 odsState.addTypes(inferredReturnTypes);
496 } else {
497 ::llvm::report_fatal_error("Failed to infer result type(s).");
498 }
499}
500
501::llvm::LogicalResult DivFeltOp::verifyInvariantsImpl() {
502 {
503 unsigned index = 0; (void)index;
504 auto valueGroup0 = getODSOperands(0);
505
506 for (auto v : valueGroup0) {
507 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
508 return ::mlir::failure();
509 }
510 auto valueGroup1 = getODSOperands(1);
511
512 for (auto v : valueGroup1) {
513 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
514 return ::mlir::failure();
515 }
516 }
517 {
518 unsigned index = 0; (void)index;
519 auto valueGroup0 = getODSResults(0);
520
521 for (auto v : valueGroup0) {
522 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "result", index++)))
523 return ::mlir::failure();
524 }
525 }
526 if (!((::llzk::typesUnify((*this->getODSOperands(0).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
527 return emitOpError("failed to verify that result type matches with lhs type");
528 if (!((::llzk::typesUnify((*this->getODSOperands(1).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
529 return emitOpError("failed to verify that result type matches with rhs type");
530 return ::mlir::success();
531}
532
533::llvm::LogicalResult DivFeltOp::verifyInvariants() {
534 return verifyInvariantsImpl();
535}
536
537::llvm::LogicalResult DivFeltOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
538 inferredReturnTypes.resize(1);
539 ::mlir::Builder odsBuilder(context);
540 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::felt::FeltType>();
541 inferredReturnTypes[0] = odsInferredType0;
542 return ::mlir::success();
543}
544
545::mlir::ParseResult DivFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
546 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
547 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
548 (void)lhsOperandsLoc;
549 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
550 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
551 (void)rhsOperandsLoc;
552 ::mlir::Type lhsRawType{};
553 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
554 ::mlir::Type rhsRawType{};
555 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
556
557 lhsOperandsLoc = parser.getCurrentLocation();
558 if (parser.parseOperand(lhsRawOperand))
559 return ::mlir::failure();
560 if (parser.parseComma())
561 return ::mlir::failure();
562
563 rhsOperandsLoc = parser.getCurrentLocation();
564 if (parser.parseOperand(rhsRawOperand))
565 return ::mlir::failure();
566 {
567 auto odsResult = parseInferredOrParsedType(parser, lhsRawType, true);
568 if (odsResult) return ::mlir::failure();
569 }
570 {
571 auto odsResult = parseInferredOrParsedType(parser, rhsRawType, false);
572 if (odsResult) return ::mlir::failure();
573 }
574 {
575 auto loc = parser.getCurrentLocation();(void)loc;
576 if (parser.parseOptionalAttrDict(result.attributes))
577 return ::mlir::failure();
578 }
579 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::felt::FeltType>();
580 result.addTypes(odsBuildableType0);
581 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
582 return ::mlir::failure();
583 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
584 return ::mlir::failure();
585 return ::mlir::success();
586}
587
588void DivFeltOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
589 _odsPrinter << ' ';
590 _odsPrinter << getLhs();
591 _odsPrinter << ",";
592 _odsPrinter << ' ';
593 _odsPrinter << getRhs();
594 printInferredOrParsedType(_odsPrinter, *this, getLhs().getType(), true);
595 printInferredOrParsedType(_odsPrinter, *this, getRhs().getType(), false);
596 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
597 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
598}
599
600void DivFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
601}
602
603} // namespace felt
604} // namespace llzk
605MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::felt::DivFeltOp)
606
607namespace llzk {
608namespace felt {
609
610//===----------------------------------------------------------------------===//
611// ::llzk::felt::FeltConstantOp definitions
612//===----------------------------------------------------------------------===//
613
614namespace detail {
616
618 auto attr = getValueAttr();
619 return attr.getValue();
620}
621
622} // namespace detail
624
625::llvm::LogicalResult FeltConstantOpAdaptor::verify(::mlir::Location loc) {
626 auto tblgen_value = getProperties().value; (void)tblgen_value;
627 if (!tblgen_value) return emitError(loc, "'felt.const' op ""requires attribute 'value'");
628
629 if (tblgen_value && !((::llvm::isa<::llzk::felt::FeltConstAttr>(tblgen_value))))
630 return emitError(loc, "'felt.const' op ""attribute 'value' failed to satisfy constraint: finite field element");
631 return ::mlir::success();
632}
633
634::llvm::LogicalResult FeltConstantOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
635 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
636 if (!dict) {
637 emitError() << "expected DictionaryAttr to set properties";
638 return ::mlir::failure();
639 }
640
641 {
642 auto &propStorage = prop.value;
643 auto attr = dict.get("value");
644 if (attr) {
645 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
646 if (convertedAttr) {
647 propStorage = convertedAttr;
648 } else {
649 emitError() << "Invalid attribute `value` in property conversion: " << attr;
650 return ::mlir::failure();
651 }
652 }
653 }
654 return ::mlir::success();
655}
656
657::mlir::Attribute FeltConstantOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
658 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
659 ::mlir::Builder odsBuilder{ctx};
660
661 {
662 const auto &propStorage = prop.value;
663 if (propStorage)
664 attrs.push_back(odsBuilder.getNamedAttr("value",
665 propStorage));
666 }
667
668 if (!attrs.empty())
669 return odsBuilder.getDictionaryAttr(attrs);
670 return {};
671}
672
674 return llvm::hash_combine(
675 llvm::hash_value(prop.value.getAsOpaquePointer()));
676}
677
678std::optional<mlir::Attribute> FeltConstantOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
679 if (name == "value")
680 return prop.value;
681 return std::nullopt;
682}
683
684void FeltConstantOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
685 if (name == "value") {
686 prop.value = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.value)>>(value);
687 return;
688 }
689}
690
691void FeltConstantOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
692 if (prop.value) attrs.append("value", prop.value);
693}
694
695::llvm::LogicalResult FeltConstantOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
696 {
697 ::mlir::Attribute attr = attrs.get(getValueAttrName(opName));
698 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(attr, "value", emitError)))
699 return ::mlir::failure();
700 }
701 return ::mlir::success();
702}
703
704::llvm::LogicalResult FeltConstantOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
705 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
706 if (::mlir::failed(reader.readAttribute(prop.value)))
707 return ::mlir::failure();
708 return ::mlir::success();
709}
710
711void FeltConstantOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
712 auto &prop = getProperties(); (void)prop;
713 writer.writeAttribute(prop.value);
714}
715
717 auto attr = getValueAttr();
718 return attr.getValue();
719}
720
721void FeltConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::felt::FeltConstAttr value) {
722 odsState.getOrAddProperties<Properties>().value = value;
723 odsState.addTypes(result);
724}
725
726void FeltConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::felt::FeltConstAttr value) {
727 odsState.getOrAddProperties<Properties>().value = value;
728
729 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
730 if (::mlir::succeeded(FeltConstantOp::inferReturnTypes(odsBuilder.getContext(),
731 odsState.location, odsState.operands,
732 odsState.attributes.getDictionary(odsState.getContext()),
733 odsState.getRawProperties(),
734 odsState.regions, inferredReturnTypes)))
735 odsState.addTypes(inferredReturnTypes);
736 else
737 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
738
739}
740
741void FeltConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llzk::felt::FeltConstAttr value) {
742 odsState.getOrAddProperties<Properties>().value = value;
743 assert(resultTypes.size() == 1u && "mismatched number of results");
744 odsState.addTypes(resultTypes);
745}
746
747void FeltConstantOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
748 assert(operands.size() == 0u && "mismatched number of parameters");
749 odsState.addOperands(operands);
750 odsState.addAttributes(attributes);
751 assert(resultTypes.size() == 1u && "mismatched number of return types");
752 odsState.addTypes(resultTypes);
753
754 if (!attributes.empty()) {
755 ::mlir::OpaqueProperties properties =
756 &odsState.getOrAddProperties<FeltConstantOp::Properties>();
757 std::optional<::mlir::RegisteredOperationName> info =
758 odsState.name.getRegisteredInfo();
759 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
760 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
761 ::llvm::report_fatal_error("Property conversion failed.");
762 }
763}
764
765void FeltConstantOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
766 assert(operands.size() == 0u && "mismatched number of parameters");
767 odsState.addOperands(operands);
768 odsState.addAttributes(attributes);
769
770 if (!attributes.empty()) {
771 ::mlir::OpaqueProperties properties =
772 &odsState.getOrAddProperties<FeltConstantOp::Properties>();
773 std::optional<::mlir::RegisteredOperationName> info =
774 odsState.name.getRegisteredInfo();
775 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
776 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
777 ::llvm::report_fatal_error("Property conversion failed.");
778 }
779 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
780 if (::mlir::succeeded(FeltConstantOp::inferReturnTypes(odsBuilder.getContext(),
781 odsState.location, operands,
782 odsState.attributes.getDictionary(odsState.getContext()),
783 odsState.getRawProperties(),
784 odsState.regions, inferredReturnTypes))) {
785 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
786 odsState.addTypes(inferredReturnTypes);
787 } else {
788 ::llvm::report_fatal_error("Failed to infer result type(s).");
789 }
790}
791
793 auto tblgen_value = getProperties().value; (void)tblgen_value;
794 if (!tblgen_value) return emitOpError("requires attribute 'value'");
795
796 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(*this, tblgen_value, "value")))
797 return ::mlir::failure();
798 {
799 unsigned index = 0; (void)index;
800 auto valueGroup0 = getODSResults(0);
801
802 for (auto v : valueGroup0) {
803 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "result", index++)))
804 return ::mlir::failure();
805 }
806 }
807 return ::mlir::success();
808}
809
810::llvm::LogicalResult FeltConstantOp::verifyInvariants() {
811 return verifyInvariantsImpl();
812}
813
814::llvm::LogicalResult FeltConstantOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
815 inferredReturnTypes.resize(1);
816 ::mlir::Builder odsBuilder(context);
817 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::felt::FeltType>();
818 inferredReturnTypes[0] = odsInferredType0;
819 return ::mlir::success();
820}
821
822::mlir::ParseResult FeltConstantOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
823 ::llzk::felt::FeltConstAttr valueAttr;
824
825 if (parser.parseCustomAttributeWithFallback(valueAttr, ::mlir::Type{})) {
826 return ::mlir::failure();
827 }
828 if (valueAttr) result.getOrAddProperties<FeltConstantOp::Properties>().value = valueAttr;
829 {
830 auto loc = parser.getCurrentLocation();(void)loc;
831 if (parser.parseOptionalAttrDict(result.attributes))
832 return ::mlir::failure();
833 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
834 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
835 })))
836 return ::mlir::failure();
837 }
838 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::felt::FeltType>();
839 result.addTypes(odsBuildableType0);
840 return ::mlir::success();
841}
842
843void FeltConstantOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
844 _odsPrinter << ' ';
845_odsPrinter.printStrippedAttrOrType(getValueAttr());
846 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
847 elidedAttrs.push_back("value");
848 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
849}
850
851void FeltConstantOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
852}
853
854} // namespace felt
855} // namespace llzk
856MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::felt::FeltConstantOp)
857
858namespace llzk {
859namespace felt {
860
861//===----------------------------------------------------------------------===//
862// ::llzk::felt::InvFeltOp definitions
863//===----------------------------------------------------------------------===//
864
865namespace detail {
866} // namespace detail
868
869::llvm::LogicalResult InvFeltOpAdaptor::verify(::mlir::Location loc) {
870 return ::mlir::success();
871}
872
873void InvFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value operand) {
874 odsState.addOperands(operand);
875 odsState.addTypes(result);
876}
877
878void InvFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value operand) {
879 odsState.addOperands(operand);
880
881 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
882 if (::mlir::succeeded(InvFeltOp::inferReturnTypes(odsBuilder.getContext(),
883 odsState.location, odsState.operands,
884 odsState.attributes.getDictionary(odsState.getContext()),
885 odsState.getRawProperties(),
886 odsState.regions, inferredReturnTypes)))
887 odsState.addTypes(inferredReturnTypes);
888 else
889 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
890
891}
892
893void InvFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value operand) {
894 odsState.addOperands(operand);
895 assert(resultTypes.size() == 1u && "mismatched number of results");
896 odsState.addTypes(resultTypes);
897}
898
899void InvFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
900 assert(operands.size() == 1u && "mismatched number of parameters");
901 odsState.addOperands(operands);
902 odsState.addAttributes(attributes);
903 assert(resultTypes.size() == 1u && "mismatched number of return types");
904 odsState.addTypes(resultTypes);
905}
906
907void InvFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
908 assert(operands.size() == 1u && "mismatched number of parameters");
909 odsState.addOperands(operands);
910 odsState.addAttributes(attributes);
911
912 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
913 if (::mlir::succeeded(InvFeltOp::inferReturnTypes(odsBuilder.getContext(),
914 odsState.location, operands,
915 odsState.attributes.getDictionary(odsState.getContext()),
916 odsState.getRawProperties(),
917 odsState.regions, inferredReturnTypes))) {
918 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
919 odsState.addTypes(inferredReturnTypes);
920 } else {
921 ::llvm::report_fatal_error("Failed to infer result type(s).");
922 }
923}
924
925::llvm::LogicalResult InvFeltOp::verifyInvariantsImpl() {
926 {
927 unsigned index = 0; (void)index;
928 auto valueGroup0 = getODSOperands(0);
929
930 for (auto v : valueGroup0) {
931 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
932 return ::mlir::failure();
933 }
934 }
935 {
936 unsigned index = 0; (void)index;
937 auto valueGroup0 = getODSResults(0);
938
939 for (auto v : valueGroup0) {
940 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "result", index++)))
941 return ::mlir::failure();
942 }
943 }
944 if (!((::llzk::typesUnify((*this->getODSOperands(0).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
945 return emitOpError("failed to verify that result type matches with operand type");
946 return ::mlir::success();
947}
948
949::llvm::LogicalResult InvFeltOp::verifyInvariants() {
950 return verifyInvariantsImpl();
951}
952
953::llvm::LogicalResult InvFeltOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
954 inferredReturnTypes.resize(1);
955 ::mlir::Builder odsBuilder(context);
956 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::felt::FeltType>();
957 inferredReturnTypes[0] = odsInferredType0;
958 return ::mlir::success();
959}
960
961::mlir::ParseResult InvFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
962 ::mlir::OpAsmParser::UnresolvedOperand operandRawOperand{};
963 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> operandOperands(&operandRawOperand, 1); ::llvm::SMLoc operandOperandsLoc;
964 (void)operandOperandsLoc;
965 ::mlir::Type operandRawType{};
966 ::llvm::ArrayRef<::mlir::Type> operandTypes(&operandRawType, 1);
967
968 operandOperandsLoc = parser.getCurrentLocation();
969 if (parser.parseOperand(operandRawOperand))
970 return ::mlir::failure();
971 {
972 auto odsResult = parseInferredOrParsedType(parser, operandRawType, true);
973 if (odsResult) return ::mlir::failure();
974 }
975 {
976 auto loc = parser.getCurrentLocation();(void)loc;
977 if (parser.parseOptionalAttrDict(result.attributes))
978 return ::mlir::failure();
979 }
980 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::felt::FeltType>();
981 result.addTypes(odsBuildableType0);
982 if (parser.resolveOperands(operandOperands, operandTypes, operandOperandsLoc, result.operands))
983 return ::mlir::failure();
984 return ::mlir::success();
985}
986
987void InvFeltOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
988 _odsPrinter << ' ';
989 _odsPrinter << getOperand();
990 printInferredOrParsedType(_odsPrinter, *this, getOperand().getType(), true);
991 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
992 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
993}
994
995void InvFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
996}
997
998} // namespace felt
999} // namespace llzk
1000MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::felt::InvFeltOp)
1001
1002namespace llzk {
1003namespace felt {
1004
1005//===----------------------------------------------------------------------===//
1006// ::llzk::felt::MulFeltOp definitions
1007//===----------------------------------------------------------------------===//
1008
1009namespace detail {
1010} // namespace detail
1012
1013::llvm::LogicalResult MulFeltOpAdaptor::verify(::mlir::Location loc) {
1014 return ::mlir::success();
1015}
1016
1017void MulFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
1018 odsState.addOperands(lhs);
1019 odsState.addOperands(rhs);
1020 odsState.addTypes(result);
1021}
1022
1023void MulFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
1024 odsState.addOperands(lhs);
1025 odsState.addOperands(rhs);
1026
1027 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1028 if (::mlir::succeeded(MulFeltOp::inferReturnTypes(odsBuilder.getContext(),
1029 odsState.location, odsState.operands,
1030 odsState.attributes.getDictionary(odsState.getContext()),
1031 odsState.getRawProperties(),
1032 odsState.regions, inferredReturnTypes)))
1033 odsState.addTypes(inferredReturnTypes);
1034 else
1035 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1036
1037}
1038
1039void MulFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
1040 odsState.addOperands(lhs);
1041 odsState.addOperands(rhs);
1042 assert(resultTypes.size() == 1u && "mismatched number of results");
1043 odsState.addTypes(resultTypes);
1044}
1045
1046void MulFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1047 assert(operands.size() == 2u && "mismatched number of parameters");
1048 odsState.addOperands(operands);
1049 odsState.addAttributes(attributes);
1050 assert(resultTypes.size() == 1u && "mismatched number of return types");
1051 odsState.addTypes(resultTypes);
1052}
1053
1054void MulFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1055 assert(operands.size() == 2u && "mismatched number of parameters");
1056 odsState.addOperands(operands);
1057 odsState.addAttributes(attributes);
1058
1059 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1060 if (::mlir::succeeded(MulFeltOp::inferReturnTypes(odsBuilder.getContext(),
1061 odsState.location, operands,
1062 odsState.attributes.getDictionary(odsState.getContext()),
1063 odsState.getRawProperties(),
1064 odsState.regions, inferredReturnTypes))) {
1065 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
1066 odsState.addTypes(inferredReturnTypes);
1067 } else {
1068 ::llvm::report_fatal_error("Failed to infer result type(s).");
1069 }
1070}
1071
1072::llvm::LogicalResult MulFeltOp::verifyInvariantsImpl() {
1073 {
1074 unsigned index = 0; (void)index;
1075 auto valueGroup0 = getODSOperands(0);
1076
1077 for (auto v : valueGroup0) {
1078 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
1079 return ::mlir::failure();
1080 }
1081 auto valueGroup1 = getODSOperands(1);
1082
1083 for (auto v : valueGroup1) {
1084 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
1085 return ::mlir::failure();
1086 }
1087 }
1088 {
1089 unsigned index = 0; (void)index;
1090 auto valueGroup0 = getODSResults(0);
1091
1092 for (auto v : valueGroup0) {
1093 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "result", index++)))
1094 return ::mlir::failure();
1095 }
1096 }
1097 if (!((::llzk::typesUnify((*this->getODSOperands(0).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
1098 return emitOpError("failed to verify that result type matches with lhs type");
1099 if (!((::llzk::typesUnify((*this->getODSOperands(1).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
1100 return emitOpError("failed to verify that result type matches with rhs type");
1101 return ::mlir::success();
1102}
1103
1104::llvm::LogicalResult MulFeltOp::verifyInvariants() {
1105 return verifyInvariantsImpl();
1106}
1107
1108::llvm::LogicalResult MulFeltOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
1109 inferredReturnTypes.resize(1);
1110 ::mlir::Builder odsBuilder(context);
1111 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::felt::FeltType>();
1112 inferredReturnTypes[0] = odsInferredType0;
1113 return ::mlir::success();
1114}
1115
1116::mlir::ParseResult MulFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1117 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
1118 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
1119 (void)lhsOperandsLoc;
1120 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
1121 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
1122 (void)rhsOperandsLoc;
1123 ::mlir::Type lhsRawType{};
1124 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
1125 ::mlir::Type rhsRawType{};
1126 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
1127
1128 lhsOperandsLoc = parser.getCurrentLocation();
1129 if (parser.parseOperand(lhsRawOperand))
1130 return ::mlir::failure();
1131 if (parser.parseComma())
1132 return ::mlir::failure();
1133
1134 rhsOperandsLoc = parser.getCurrentLocation();
1135 if (parser.parseOperand(rhsRawOperand))
1136 return ::mlir::failure();
1137 {
1138 auto odsResult = parseInferredOrParsedType(parser, lhsRawType, true);
1139 if (odsResult) return ::mlir::failure();
1140 }
1141 {
1142 auto odsResult = parseInferredOrParsedType(parser, rhsRawType, false);
1143 if (odsResult) return ::mlir::failure();
1144 }
1145 {
1146 auto loc = parser.getCurrentLocation();(void)loc;
1147 if (parser.parseOptionalAttrDict(result.attributes))
1148 return ::mlir::failure();
1149 }
1150 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::felt::FeltType>();
1151 result.addTypes(odsBuildableType0);
1152 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
1153 return ::mlir::failure();
1154 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
1155 return ::mlir::failure();
1156 return ::mlir::success();
1157}
1158
1159void MulFeltOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
1160 _odsPrinter << ' ';
1161 _odsPrinter << getLhs();
1162 _odsPrinter << ",";
1163 _odsPrinter << ' ';
1164 _odsPrinter << getRhs();
1165 printInferredOrParsedType(_odsPrinter, *this, getLhs().getType(), true);
1166 printInferredOrParsedType(_odsPrinter, *this, getRhs().getType(), false);
1167 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1168 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1169}
1170
1171void MulFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1172}
1173
1174} // namespace felt
1175} // namespace llzk
1176MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::felt::MulFeltOp)
1177
1178namespace llzk {
1179namespace felt {
1180
1181//===----------------------------------------------------------------------===//
1182// ::llzk::felt::NegFeltOp definitions
1183//===----------------------------------------------------------------------===//
1184
1185namespace detail {
1186} // namespace detail
1188
1189::llvm::LogicalResult NegFeltOpAdaptor::verify(::mlir::Location loc) {
1190 return ::mlir::success();
1191}
1192
1193void NegFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value operand) {
1194 odsState.addOperands(operand);
1195 odsState.addTypes(result);
1196}
1197
1198void NegFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value operand) {
1199 odsState.addOperands(operand);
1200
1201 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1202 if (::mlir::succeeded(NegFeltOp::inferReturnTypes(odsBuilder.getContext(),
1203 odsState.location, odsState.operands,
1204 odsState.attributes.getDictionary(odsState.getContext()),
1205 odsState.getRawProperties(),
1206 odsState.regions, inferredReturnTypes)))
1207 odsState.addTypes(inferredReturnTypes);
1208 else
1209 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1210
1211}
1212
1213void NegFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value operand) {
1214 odsState.addOperands(operand);
1215 assert(resultTypes.size() == 1u && "mismatched number of results");
1216 odsState.addTypes(resultTypes);
1217}
1218
1219void NegFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1220 assert(operands.size() == 1u && "mismatched number of parameters");
1221 odsState.addOperands(operands);
1222 odsState.addAttributes(attributes);
1223 assert(resultTypes.size() == 1u && "mismatched number of return types");
1224 odsState.addTypes(resultTypes);
1225}
1226
1227void NegFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1228 assert(operands.size() == 1u && "mismatched number of parameters");
1229 odsState.addOperands(operands);
1230 odsState.addAttributes(attributes);
1231
1232 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1233 if (::mlir::succeeded(NegFeltOp::inferReturnTypes(odsBuilder.getContext(),
1234 odsState.location, operands,
1235 odsState.attributes.getDictionary(odsState.getContext()),
1236 odsState.getRawProperties(),
1237 odsState.regions, inferredReturnTypes))) {
1238 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
1239 odsState.addTypes(inferredReturnTypes);
1240 } else {
1241 ::llvm::report_fatal_error("Failed to infer result type(s).");
1242 }
1243}
1244
1245::llvm::LogicalResult NegFeltOp::verifyInvariantsImpl() {
1246 {
1247 unsigned index = 0; (void)index;
1248 auto valueGroup0 = getODSOperands(0);
1249
1250 for (auto v : valueGroup0) {
1251 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
1252 return ::mlir::failure();
1253 }
1254 }
1255 {
1256 unsigned index = 0; (void)index;
1257 auto valueGroup0 = getODSResults(0);
1258
1259 for (auto v : valueGroup0) {
1260 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "result", index++)))
1261 return ::mlir::failure();
1262 }
1263 }
1264 if (!((::llzk::typesUnify((*this->getODSOperands(0).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
1265 return emitOpError("failed to verify that result type matches with operand type");
1266 return ::mlir::success();
1267}
1268
1269::llvm::LogicalResult NegFeltOp::verifyInvariants() {
1270 return verifyInvariantsImpl();
1271}
1272
1273::llvm::LogicalResult NegFeltOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
1274 inferredReturnTypes.resize(1);
1275 ::mlir::Builder odsBuilder(context);
1276 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::felt::FeltType>();
1277 inferredReturnTypes[0] = odsInferredType0;
1278 return ::mlir::success();
1279}
1280
1281::mlir::ParseResult NegFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1282 ::mlir::OpAsmParser::UnresolvedOperand operandRawOperand{};
1283 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> operandOperands(&operandRawOperand, 1); ::llvm::SMLoc operandOperandsLoc;
1284 (void)operandOperandsLoc;
1285 ::mlir::Type operandRawType{};
1286 ::llvm::ArrayRef<::mlir::Type> operandTypes(&operandRawType, 1);
1287
1288 operandOperandsLoc = parser.getCurrentLocation();
1289 if (parser.parseOperand(operandRawOperand))
1290 return ::mlir::failure();
1291 {
1292 auto odsResult = parseInferredOrParsedType(parser, operandRawType, true);
1293 if (odsResult) return ::mlir::failure();
1294 }
1295 {
1296 auto loc = parser.getCurrentLocation();(void)loc;
1297 if (parser.parseOptionalAttrDict(result.attributes))
1298 return ::mlir::failure();
1299 }
1300 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::felt::FeltType>();
1301 result.addTypes(odsBuildableType0);
1302 if (parser.resolveOperands(operandOperands, operandTypes, operandOperandsLoc, result.operands))
1303 return ::mlir::failure();
1304 return ::mlir::success();
1305}
1306
1307void NegFeltOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
1308 _odsPrinter << ' ';
1309 _odsPrinter << getOperand();
1310 printInferredOrParsedType(_odsPrinter, *this, getOperand().getType(), true);
1311 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1312 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1313}
1314
1315void NegFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1316}
1317
1318} // namespace felt
1319} // namespace llzk
1320MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::felt::NegFeltOp)
1321
1322namespace llzk {
1323namespace felt {
1324
1325//===----------------------------------------------------------------------===//
1326// ::llzk::felt::NotFeltOp definitions
1327//===----------------------------------------------------------------------===//
1328
1329namespace detail {
1330} // namespace detail
1332
1333::llvm::LogicalResult NotFeltOpAdaptor::verify(::mlir::Location loc) {
1334 return ::mlir::success();
1335}
1336
1337void NotFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value operand) {
1338 odsState.addOperands(operand);
1339 odsState.addTypes(result);
1340}
1341
1342void NotFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value operand) {
1343 odsState.addOperands(operand);
1344
1345 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1346 if (::mlir::succeeded(NotFeltOp::inferReturnTypes(odsBuilder.getContext(),
1347 odsState.location, odsState.operands,
1348 odsState.attributes.getDictionary(odsState.getContext()),
1349 odsState.getRawProperties(),
1350 odsState.regions, inferredReturnTypes)))
1351 odsState.addTypes(inferredReturnTypes);
1352 else
1353 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1354
1355}
1356
1357void NotFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value operand) {
1358 odsState.addOperands(operand);
1359 assert(resultTypes.size() == 1u && "mismatched number of results");
1360 odsState.addTypes(resultTypes);
1361}
1362
1363void NotFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1364 assert(operands.size() == 1u && "mismatched number of parameters");
1365 odsState.addOperands(operands);
1366 odsState.addAttributes(attributes);
1367 assert(resultTypes.size() == 1u && "mismatched number of return types");
1368 odsState.addTypes(resultTypes);
1369}
1370
1371void NotFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1372 assert(operands.size() == 1u && "mismatched number of parameters");
1373 odsState.addOperands(operands);
1374 odsState.addAttributes(attributes);
1375
1376 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1377 if (::mlir::succeeded(NotFeltOp::inferReturnTypes(odsBuilder.getContext(),
1378 odsState.location, operands,
1379 odsState.attributes.getDictionary(odsState.getContext()),
1380 odsState.getRawProperties(),
1381 odsState.regions, inferredReturnTypes))) {
1382 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
1383 odsState.addTypes(inferredReturnTypes);
1384 } else {
1385 ::llvm::report_fatal_error("Failed to infer result type(s).");
1386 }
1387}
1388
1389::llvm::LogicalResult NotFeltOp::verifyInvariantsImpl() {
1390 {
1391 unsigned index = 0; (void)index;
1392 auto valueGroup0 = getODSOperands(0);
1393
1394 for (auto v : valueGroup0) {
1395 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
1396 return ::mlir::failure();
1397 }
1398 }
1399 {
1400 unsigned index = 0; (void)index;
1401 auto valueGroup0 = getODSResults(0);
1402
1403 for (auto v : valueGroup0) {
1404 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "result", index++)))
1405 return ::mlir::failure();
1406 }
1407 }
1408 if (!((::llzk::typesUnify((*this->getODSOperands(0).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
1409 return emitOpError("failed to verify that result type matches with operand type");
1410 return ::mlir::success();
1411}
1412
1413::llvm::LogicalResult NotFeltOp::verifyInvariants() {
1414 return verifyInvariantsImpl();
1415}
1416
1417::llvm::LogicalResult NotFeltOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
1418 inferredReturnTypes.resize(1);
1419 ::mlir::Builder odsBuilder(context);
1420 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::felt::FeltType>();
1421 inferredReturnTypes[0] = odsInferredType0;
1422 return ::mlir::success();
1423}
1424
1425::mlir::ParseResult NotFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1426 ::mlir::OpAsmParser::UnresolvedOperand operandRawOperand{};
1427 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> operandOperands(&operandRawOperand, 1); ::llvm::SMLoc operandOperandsLoc;
1428 (void)operandOperandsLoc;
1429 ::mlir::Type operandRawType{};
1430 ::llvm::ArrayRef<::mlir::Type> operandTypes(&operandRawType, 1);
1431
1432 operandOperandsLoc = parser.getCurrentLocation();
1433 if (parser.parseOperand(operandRawOperand))
1434 return ::mlir::failure();
1435 {
1436 auto odsResult = parseInferredOrParsedType(parser, operandRawType, true);
1437 if (odsResult) return ::mlir::failure();
1438 }
1439 {
1440 auto loc = parser.getCurrentLocation();(void)loc;
1441 if (parser.parseOptionalAttrDict(result.attributes))
1442 return ::mlir::failure();
1443 }
1444 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::felt::FeltType>();
1445 result.addTypes(odsBuildableType0);
1446 if (parser.resolveOperands(operandOperands, operandTypes, operandOperandsLoc, result.operands))
1447 return ::mlir::failure();
1448 return ::mlir::success();
1449}
1450
1451void NotFeltOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
1452 _odsPrinter << ' ';
1453 _odsPrinter << getOperand();
1454 printInferredOrParsedType(_odsPrinter, *this, getOperand().getType(), true);
1455 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1456 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1457}
1458
1459void NotFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1460}
1461
1462} // namespace felt
1463} // namespace llzk
1464MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::felt::NotFeltOp)
1465
1466namespace llzk {
1467namespace felt {
1468
1469//===----------------------------------------------------------------------===//
1470// ::llzk::felt::OrFeltOp definitions
1471//===----------------------------------------------------------------------===//
1472
1473namespace detail {
1474} // namespace detail
1476
1477::llvm::LogicalResult OrFeltOpAdaptor::verify(::mlir::Location loc) {
1478 return ::mlir::success();
1479}
1480
1481void OrFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
1482 odsState.addOperands(lhs);
1483 odsState.addOperands(rhs);
1484 odsState.addTypes(result);
1485}
1486
1487void OrFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
1488 odsState.addOperands(lhs);
1489 odsState.addOperands(rhs);
1490
1491 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1492 if (::mlir::succeeded(OrFeltOp::inferReturnTypes(odsBuilder.getContext(),
1493 odsState.location, odsState.operands,
1494 odsState.attributes.getDictionary(odsState.getContext()),
1495 odsState.getRawProperties(),
1496 odsState.regions, inferredReturnTypes)))
1497 odsState.addTypes(inferredReturnTypes);
1498 else
1499 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1500
1501}
1502
1503void OrFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
1504 odsState.addOperands(lhs);
1505 odsState.addOperands(rhs);
1506 assert(resultTypes.size() == 1u && "mismatched number of results");
1507 odsState.addTypes(resultTypes);
1508}
1509
1510void OrFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1511 assert(operands.size() == 2u && "mismatched number of parameters");
1512 odsState.addOperands(operands);
1513 odsState.addAttributes(attributes);
1514 assert(resultTypes.size() == 1u && "mismatched number of return types");
1515 odsState.addTypes(resultTypes);
1516}
1517
1518void OrFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1519 assert(operands.size() == 2u && "mismatched number of parameters");
1520 odsState.addOperands(operands);
1521 odsState.addAttributes(attributes);
1522
1523 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1524 if (::mlir::succeeded(OrFeltOp::inferReturnTypes(odsBuilder.getContext(),
1525 odsState.location, operands,
1526 odsState.attributes.getDictionary(odsState.getContext()),
1527 odsState.getRawProperties(),
1528 odsState.regions, inferredReturnTypes))) {
1529 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
1530 odsState.addTypes(inferredReturnTypes);
1531 } else {
1532 ::llvm::report_fatal_error("Failed to infer result type(s).");
1533 }
1534}
1535
1536::llvm::LogicalResult OrFeltOp::verifyInvariantsImpl() {
1537 {
1538 unsigned index = 0; (void)index;
1539 auto valueGroup0 = getODSOperands(0);
1540
1541 for (auto v : valueGroup0) {
1542 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
1543 return ::mlir::failure();
1544 }
1545 auto valueGroup1 = getODSOperands(1);
1546
1547 for (auto v : valueGroup1) {
1548 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
1549 return ::mlir::failure();
1550 }
1551 }
1552 {
1553 unsigned index = 0; (void)index;
1554 auto valueGroup0 = getODSResults(0);
1555
1556 for (auto v : valueGroup0) {
1557 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "result", index++)))
1558 return ::mlir::failure();
1559 }
1560 }
1561 if (!((::llzk::typesUnify((*this->getODSOperands(0).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
1562 return emitOpError("failed to verify that result type matches with lhs type");
1563 if (!((::llzk::typesUnify((*this->getODSOperands(1).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
1564 return emitOpError("failed to verify that result type matches with rhs type");
1565 return ::mlir::success();
1566}
1567
1568::llvm::LogicalResult OrFeltOp::verifyInvariants() {
1569 return verifyInvariantsImpl();
1570}
1571
1572::llvm::LogicalResult OrFeltOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
1573 inferredReturnTypes.resize(1);
1574 ::mlir::Builder odsBuilder(context);
1575 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::felt::FeltType>();
1576 inferredReturnTypes[0] = odsInferredType0;
1577 return ::mlir::success();
1578}
1579
1580::mlir::ParseResult OrFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1581 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
1582 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
1583 (void)lhsOperandsLoc;
1584 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
1585 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
1586 (void)rhsOperandsLoc;
1587 ::mlir::Type lhsRawType{};
1588 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
1589 ::mlir::Type rhsRawType{};
1590 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
1591
1592 lhsOperandsLoc = parser.getCurrentLocation();
1593 if (parser.parseOperand(lhsRawOperand))
1594 return ::mlir::failure();
1595 if (parser.parseComma())
1596 return ::mlir::failure();
1597
1598 rhsOperandsLoc = parser.getCurrentLocation();
1599 if (parser.parseOperand(rhsRawOperand))
1600 return ::mlir::failure();
1601 {
1602 auto odsResult = parseInferredOrParsedType(parser, lhsRawType, true);
1603 if (odsResult) return ::mlir::failure();
1604 }
1605 {
1606 auto odsResult = parseInferredOrParsedType(parser, rhsRawType, false);
1607 if (odsResult) return ::mlir::failure();
1608 }
1609 {
1610 auto loc = parser.getCurrentLocation();(void)loc;
1611 if (parser.parseOptionalAttrDict(result.attributes))
1612 return ::mlir::failure();
1613 }
1614 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::felt::FeltType>();
1615 result.addTypes(odsBuildableType0);
1616 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
1617 return ::mlir::failure();
1618 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
1619 return ::mlir::failure();
1620 return ::mlir::success();
1621}
1622
1623void OrFeltOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
1624 _odsPrinter << ' ';
1625 _odsPrinter << getLhs();
1626 _odsPrinter << ",";
1627 _odsPrinter << ' ';
1628 _odsPrinter << getRhs();
1629 printInferredOrParsedType(_odsPrinter, *this, getLhs().getType(), true);
1630 printInferredOrParsedType(_odsPrinter, *this, getRhs().getType(), false);
1631 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1632 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1633}
1634
1635void OrFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1636}
1637
1638} // namespace felt
1639} // namespace llzk
1640MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::felt::OrFeltOp)
1641
1642namespace llzk {
1643namespace felt {
1644
1645//===----------------------------------------------------------------------===//
1646// ::llzk::felt::PowFeltOp definitions
1647//===----------------------------------------------------------------------===//
1648
1649namespace detail {
1650} // namespace detail
1652
1653::llvm::LogicalResult PowFeltOpAdaptor::verify(::mlir::Location loc) {
1654 return ::mlir::success();
1655}
1656
1657void PowFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
1658 odsState.addOperands(lhs);
1659 odsState.addOperands(rhs);
1660 odsState.addTypes(result);
1661}
1662
1663void PowFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
1664 odsState.addOperands(lhs);
1665 odsState.addOperands(rhs);
1666
1667 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1668 if (::mlir::succeeded(PowFeltOp::inferReturnTypes(odsBuilder.getContext(),
1669 odsState.location, odsState.operands,
1670 odsState.attributes.getDictionary(odsState.getContext()),
1671 odsState.getRawProperties(),
1672 odsState.regions, inferredReturnTypes)))
1673 odsState.addTypes(inferredReturnTypes);
1674 else
1675 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1676
1677}
1678
1679void PowFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
1680 odsState.addOperands(lhs);
1681 odsState.addOperands(rhs);
1682 assert(resultTypes.size() == 1u && "mismatched number of results");
1683 odsState.addTypes(resultTypes);
1684}
1685
1686void PowFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1687 assert(operands.size() == 2u && "mismatched number of parameters");
1688 odsState.addOperands(operands);
1689 odsState.addAttributes(attributes);
1690 assert(resultTypes.size() == 1u && "mismatched number of return types");
1691 odsState.addTypes(resultTypes);
1692}
1693
1694void PowFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1695 assert(operands.size() == 2u && "mismatched number of parameters");
1696 odsState.addOperands(operands);
1697 odsState.addAttributes(attributes);
1698
1699 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1700 if (::mlir::succeeded(PowFeltOp::inferReturnTypes(odsBuilder.getContext(),
1701 odsState.location, operands,
1702 odsState.attributes.getDictionary(odsState.getContext()),
1703 odsState.getRawProperties(),
1704 odsState.regions, inferredReturnTypes))) {
1705 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
1706 odsState.addTypes(inferredReturnTypes);
1707 } else {
1708 ::llvm::report_fatal_error("Failed to infer result type(s).");
1709 }
1710}
1711
1712::llvm::LogicalResult PowFeltOp::verifyInvariantsImpl() {
1713 {
1714 unsigned index = 0; (void)index;
1715 auto valueGroup0 = getODSOperands(0);
1716
1717 for (auto v : valueGroup0) {
1718 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
1719 return ::mlir::failure();
1720 }
1721 auto valueGroup1 = getODSOperands(1);
1722
1723 for (auto v : valueGroup1) {
1724 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
1725 return ::mlir::failure();
1726 }
1727 }
1728 {
1729 unsigned index = 0; (void)index;
1730 auto valueGroup0 = getODSResults(0);
1731
1732 for (auto v : valueGroup0) {
1733 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "result", index++)))
1734 return ::mlir::failure();
1735 }
1736 }
1737 if (!((::llzk::typesUnify((*this->getODSOperands(0).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
1738 return emitOpError("failed to verify that result type matches with lhs type");
1739 if (!((::llzk::typesUnify((*this->getODSOperands(1).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
1740 return emitOpError("failed to verify that result type matches with rhs type");
1741 return ::mlir::success();
1742}
1743
1744::llvm::LogicalResult PowFeltOp::verifyInvariants() {
1745 return verifyInvariantsImpl();
1746}
1747
1748::llvm::LogicalResult PowFeltOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
1749 inferredReturnTypes.resize(1);
1750 ::mlir::Builder odsBuilder(context);
1751 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::felt::FeltType>();
1752 inferredReturnTypes[0] = odsInferredType0;
1753 return ::mlir::success();
1754}
1755
1756::mlir::ParseResult PowFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1757 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
1758 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
1759 (void)lhsOperandsLoc;
1760 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
1761 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
1762 (void)rhsOperandsLoc;
1763 ::mlir::Type lhsRawType{};
1764 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
1765 ::mlir::Type rhsRawType{};
1766 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
1767
1768 lhsOperandsLoc = parser.getCurrentLocation();
1769 if (parser.parseOperand(lhsRawOperand))
1770 return ::mlir::failure();
1771 if (parser.parseComma())
1772 return ::mlir::failure();
1773
1774 rhsOperandsLoc = parser.getCurrentLocation();
1775 if (parser.parseOperand(rhsRawOperand))
1776 return ::mlir::failure();
1777 {
1778 auto odsResult = parseInferredOrParsedType(parser, lhsRawType, true);
1779 if (odsResult) return ::mlir::failure();
1780 }
1781 {
1782 auto odsResult = parseInferredOrParsedType(parser, rhsRawType, false);
1783 if (odsResult) return ::mlir::failure();
1784 }
1785 {
1786 auto loc = parser.getCurrentLocation();(void)loc;
1787 if (parser.parseOptionalAttrDict(result.attributes))
1788 return ::mlir::failure();
1789 }
1790 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::felt::FeltType>();
1791 result.addTypes(odsBuildableType0);
1792 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
1793 return ::mlir::failure();
1794 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
1795 return ::mlir::failure();
1796 return ::mlir::success();
1797}
1798
1799void PowFeltOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
1800 _odsPrinter << ' ';
1801 _odsPrinter << getLhs();
1802 _odsPrinter << ",";
1803 _odsPrinter << ' ';
1804 _odsPrinter << getRhs();
1805 printInferredOrParsedType(_odsPrinter, *this, getLhs().getType(), true);
1806 printInferredOrParsedType(_odsPrinter, *this, getRhs().getType(), false);
1807 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1808 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1809}
1810
1811void PowFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1812}
1813
1814} // namespace felt
1815} // namespace llzk
1816MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::felt::PowFeltOp)
1817
1818namespace llzk {
1819namespace felt {
1820
1821//===----------------------------------------------------------------------===//
1822// ::llzk::felt::ShlFeltOp definitions
1823//===----------------------------------------------------------------------===//
1824
1825namespace detail {
1826} // namespace detail
1828
1829::llvm::LogicalResult ShlFeltOpAdaptor::verify(::mlir::Location loc) {
1830 return ::mlir::success();
1831}
1832
1833void ShlFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
1834 odsState.addOperands(lhs);
1835 odsState.addOperands(rhs);
1836 odsState.addTypes(result);
1837}
1838
1839void ShlFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
1840 odsState.addOperands(lhs);
1841 odsState.addOperands(rhs);
1842
1843 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1844 if (::mlir::succeeded(ShlFeltOp::inferReturnTypes(odsBuilder.getContext(),
1845 odsState.location, odsState.operands,
1846 odsState.attributes.getDictionary(odsState.getContext()),
1847 odsState.getRawProperties(),
1848 odsState.regions, inferredReturnTypes)))
1849 odsState.addTypes(inferredReturnTypes);
1850 else
1851 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1852
1853}
1854
1855void ShlFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
1856 odsState.addOperands(lhs);
1857 odsState.addOperands(rhs);
1858 assert(resultTypes.size() == 1u && "mismatched number of results");
1859 odsState.addTypes(resultTypes);
1860}
1861
1862void ShlFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1863 assert(operands.size() == 2u && "mismatched number of parameters");
1864 odsState.addOperands(operands);
1865 odsState.addAttributes(attributes);
1866 assert(resultTypes.size() == 1u && "mismatched number of return types");
1867 odsState.addTypes(resultTypes);
1868}
1869
1870void ShlFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1871 assert(operands.size() == 2u && "mismatched number of parameters");
1872 odsState.addOperands(operands);
1873 odsState.addAttributes(attributes);
1874
1875 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1876 if (::mlir::succeeded(ShlFeltOp::inferReturnTypes(odsBuilder.getContext(),
1877 odsState.location, operands,
1878 odsState.attributes.getDictionary(odsState.getContext()),
1879 odsState.getRawProperties(),
1880 odsState.regions, inferredReturnTypes))) {
1881 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
1882 odsState.addTypes(inferredReturnTypes);
1883 } else {
1884 ::llvm::report_fatal_error("Failed to infer result type(s).");
1885 }
1886}
1887
1888::llvm::LogicalResult ShlFeltOp::verifyInvariantsImpl() {
1889 {
1890 unsigned index = 0; (void)index;
1891 auto valueGroup0 = getODSOperands(0);
1892
1893 for (auto v : valueGroup0) {
1894 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
1895 return ::mlir::failure();
1896 }
1897 auto valueGroup1 = getODSOperands(1);
1898
1899 for (auto v : valueGroup1) {
1900 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
1901 return ::mlir::failure();
1902 }
1903 }
1904 {
1905 unsigned index = 0; (void)index;
1906 auto valueGroup0 = getODSResults(0);
1907
1908 for (auto v : valueGroup0) {
1909 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "result", index++)))
1910 return ::mlir::failure();
1911 }
1912 }
1913 if (!((::llzk::typesUnify((*this->getODSOperands(0).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
1914 return emitOpError("failed to verify that result type matches with lhs type");
1915 if (!((::llzk::typesUnify((*this->getODSOperands(1).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
1916 return emitOpError("failed to verify that result type matches with rhs type");
1917 return ::mlir::success();
1918}
1919
1920::llvm::LogicalResult ShlFeltOp::verifyInvariants() {
1921 return verifyInvariantsImpl();
1922}
1923
1924::llvm::LogicalResult ShlFeltOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
1925 inferredReturnTypes.resize(1);
1926 ::mlir::Builder odsBuilder(context);
1927 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::felt::FeltType>();
1928 inferredReturnTypes[0] = odsInferredType0;
1929 return ::mlir::success();
1930}
1931
1932::mlir::ParseResult ShlFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1933 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
1934 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
1935 (void)lhsOperandsLoc;
1936 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
1937 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
1938 (void)rhsOperandsLoc;
1939 ::mlir::Type lhsRawType{};
1940 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
1941 ::mlir::Type rhsRawType{};
1942 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
1943
1944 lhsOperandsLoc = parser.getCurrentLocation();
1945 if (parser.parseOperand(lhsRawOperand))
1946 return ::mlir::failure();
1947 if (parser.parseComma())
1948 return ::mlir::failure();
1949
1950 rhsOperandsLoc = parser.getCurrentLocation();
1951 if (parser.parseOperand(rhsRawOperand))
1952 return ::mlir::failure();
1953 {
1954 auto odsResult = parseInferredOrParsedType(parser, lhsRawType, true);
1955 if (odsResult) return ::mlir::failure();
1956 }
1957 {
1958 auto odsResult = parseInferredOrParsedType(parser, rhsRawType, false);
1959 if (odsResult) return ::mlir::failure();
1960 }
1961 {
1962 auto loc = parser.getCurrentLocation();(void)loc;
1963 if (parser.parseOptionalAttrDict(result.attributes))
1964 return ::mlir::failure();
1965 }
1966 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::felt::FeltType>();
1967 result.addTypes(odsBuildableType0);
1968 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
1969 return ::mlir::failure();
1970 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
1971 return ::mlir::failure();
1972 return ::mlir::success();
1973}
1974
1975void ShlFeltOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
1976 _odsPrinter << ' ';
1977 _odsPrinter << getLhs();
1978 _odsPrinter << ",";
1979 _odsPrinter << ' ';
1980 _odsPrinter << getRhs();
1981 printInferredOrParsedType(_odsPrinter, *this, getLhs().getType(), true);
1982 printInferredOrParsedType(_odsPrinter, *this, getRhs().getType(), false);
1983 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1984 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1985}
1986
1987void ShlFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1988}
1989
1990} // namespace felt
1991} // namespace llzk
1992MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::felt::ShlFeltOp)
1993
1994namespace llzk {
1995namespace felt {
1996
1997//===----------------------------------------------------------------------===//
1998// ::llzk::felt::ShrFeltOp definitions
1999//===----------------------------------------------------------------------===//
2000
2001namespace detail {
2002} // namespace detail
2004
2005::llvm::LogicalResult ShrFeltOpAdaptor::verify(::mlir::Location loc) {
2006 return ::mlir::success();
2007}
2008
2009void ShrFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
2010 odsState.addOperands(lhs);
2011 odsState.addOperands(rhs);
2012 odsState.addTypes(result);
2013}
2014
2015void ShrFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
2016 odsState.addOperands(lhs);
2017 odsState.addOperands(rhs);
2018
2019 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2020 if (::mlir::succeeded(ShrFeltOp::inferReturnTypes(odsBuilder.getContext(),
2021 odsState.location, odsState.operands,
2022 odsState.attributes.getDictionary(odsState.getContext()),
2023 odsState.getRawProperties(),
2024 odsState.regions, inferredReturnTypes)))
2025 odsState.addTypes(inferredReturnTypes);
2026 else
2027 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
2028
2029}
2030
2031void ShrFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
2032 odsState.addOperands(lhs);
2033 odsState.addOperands(rhs);
2034 assert(resultTypes.size() == 1u && "mismatched number of results");
2035 odsState.addTypes(resultTypes);
2036}
2037
2038void ShrFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2039 assert(operands.size() == 2u && "mismatched number of parameters");
2040 odsState.addOperands(operands);
2041 odsState.addAttributes(attributes);
2042 assert(resultTypes.size() == 1u && "mismatched number of return types");
2043 odsState.addTypes(resultTypes);
2044}
2045
2046void ShrFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2047 assert(operands.size() == 2u && "mismatched number of parameters");
2048 odsState.addOperands(operands);
2049 odsState.addAttributes(attributes);
2050
2051 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2052 if (::mlir::succeeded(ShrFeltOp::inferReturnTypes(odsBuilder.getContext(),
2053 odsState.location, operands,
2054 odsState.attributes.getDictionary(odsState.getContext()),
2055 odsState.getRawProperties(),
2056 odsState.regions, inferredReturnTypes))) {
2057 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
2058 odsState.addTypes(inferredReturnTypes);
2059 } else {
2060 ::llvm::report_fatal_error("Failed to infer result type(s).");
2061 }
2062}
2063
2064::llvm::LogicalResult ShrFeltOp::verifyInvariantsImpl() {
2065 {
2066 unsigned index = 0; (void)index;
2067 auto valueGroup0 = getODSOperands(0);
2068
2069 for (auto v : valueGroup0) {
2070 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
2071 return ::mlir::failure();
2072 }
2073 auto valueGroup1 = getODSOperands(1);
2074
2075 for (auto v : valueGroup1) {
2076 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
2077 return ::mlir::failure();
2078 }
2079 }
2080 {
2081 unsigned index = 0; (void)index;
2082 auto valueGroup0 = getODSResults(0);
2083
2084 for (auto v : valueGroup0) {
2085 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "result", index++)))
2086 return ::mlir::failure();
2087 }
2088 }
2089 if (!((::llzk::typesUnify((*this->getODSOperands(0).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
2090 return emitOpError("failed to verify that result type matches with lhs type");
2091 if (!((::llzk::typesUnify((*this->getODSOperands(1).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
2092 return emitOpError("failed to verify that result type matches with rhs type");
2093 return ::mlir::success();
2094}
2095
2096::llvm::LogicalResult ShrFeltOp::verifyInvariants() {
2097 return verifyInvariantsImpl();
2098}
2099
2100::llvm::LogicalResult ShrFeltOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
2101 inferredReturnTypes.resize(1);
2102 ::mlir::Builder odsBuilder(context);
2103 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::felt::FeltType>();
2104 inferredReturnTypes[0] = odsInferredType0;
2105 return ::mlir::success();
2106}
2107
2108::mlir::ParseResult ShrFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2109 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
2110 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
2111 (void)lhsOperandsLoc;
2112 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
2113 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
2114 (void)rhsOperandsLoc;
2115 ::mlir::Type lhsRawType{};
2116 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
2117 ::mlir::Type rhsRawType{};
2118 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
2119
2120 lhsOperandsLoc = parser.getCurrentLocation();
2121 if (parser.parseOperand(lhsRawOperand))
2122 return ::mlir::failure();
2123 if (parser.parseComma())
2124 return ::mlir::failure();
2125
2126 rhsOperandsLoc = parser.getCurrentLocation();
2127 if (parser.parseOperand(rhsRawOperand))
2128 return ::mlir::failure();
2129 {
2130 auto odsResult = parseInferredOrParsedType(parser, lhsRawType, true);
2131 if (odsResult) return ::mlir::failure();
2132 }
2133 {
2134 auto odsResult = parseInferredOrParsedType(parser, rhsRawType, false);
2135 if (odsResult) return ::mlir::failure();
2136 }
2137 {
2138 auto loc = parser.getCurrentLocation();(void)loc;
2139 if (parser.parseOptionalAttrDict(result.attributes))
2140 return ::mlir::failure();
2141 }
2142 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::felt::FeltType>();
2143 result.addTypes(odsBuildableType0);
2144 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
2145 return ::mlir::failure();
2146 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
2147 return ::mlir::failure();
2148 return ::mlir::success();
2149}
2150
2151void ShrFeltOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
2152 _odsPrinter << ' ';
2153 _odsPrinter << getLhs();
2154 _odsPrinter << ",";
2155 _odsPrinter << ' ';
2156 _odsPrinter << getRhs();
2157 printInferredOrParsedType(_odsPrinter, *this, getLhs().getType(), true);
2158 printInferredOrParsedType(_odsPrinter, *this, getRhs().getType(), false);
2159 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2160 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2161}
2162
2163void ShrFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
2164}
2165
2166} // namespace felt
2167} // namespace llzk
2168MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::felt::ShrFeltOp)
2169
2170namespace llzk {
2171namespace felt {
2172
2173//===----------------------------------------------------------------------===//
2174// ::llzk::felt::SignedIntDivFeltOp definitions
2175//===----------------------------------------------------------------------===//
2176
2177namespace detail {
2178} // namespace detail
2180
2181::llvm::LogicalResult SignedIntDivFeltOpAdaptor::verify(::mlir::Location loc) {
2182 return ::mlir::success();
2183}
2184
2185void SignedIntDivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
2186 odsState.addOperands(lhs);
2187 odsState.addOperands(rhs);
2188 odsState.addTypes(result);
2189}
2190
2191void SignedIntDivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
2192 odsState.addOperands(lhs);
2193 odsState.addOperands(rhs);
2194
2195 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2196 if (::mlir::succeeded(SignedIntDivFeltOp::inferReturnTypes(odsBuilder.getContext(),
2197 odsState.location, odsState.operands,
2198 odsState.attributes.getDictionary(odsState.getContext()),
2199 odsState.getRawProperties(),
2200 odsState.regions, inferredReturnTypes)))
2201 odsState.addTypes(inferredReturnTypes);
2202 else
2203 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
2204
2205}
2206
2207void SignedIntDivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
2208 odsState.addOperands(lhs);
2209 odsState.addOperands(rhs);
2210 assert(resultTypes.size() == 1u && "mismatched number of results");
2211 odsState.addTypes(resultTypes);
2212}
2213
2214void SignedIntDivFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2215 assert(operands.size() == 2u && "mismatched number of parameters");
2216 odsState.addOperands(operands);
2217 odsState.addAttributes(attributes);
2218 assert(resultTypes.size() == 1u && "mismatched number of return types");
2219 odsState.addTypes(resultTypes);
2220}
2221
2222void SignedIntDivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2223 assert(operands.size() == 2u && "mismatched number of parameters");
2224 odsState.addOperands(operands);
2225 odsState.addAttributes(attributes);
2226
2227 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2228 if (::mlir::succeeded(SignedIntDivFeltOp::inferReturnTypes(odsBuilder.getContext(),
2229 odsState.location, operands,
2230 odsState.attributes.getDictionary(odsState.getContext()),
2231 odsState.getRawProperties(),
2232 odsState.regions, inferredReturnTypes))) {
2233 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
2234 odsState.addTypes(inferredReturnTypes);
2235 } else {
2236 ::llvm::report_fatal_error("Failed to infer result type(s).");
2237 }
2238}
2239
2241 {
2242 unsigned index = 0; (void)index;
2243 auto valueGroup0 = getODSOperands(0);
2244
2245 for (auto v : valueGroup0) {
2246 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
2247 return ::mlir::failure();
2248 }
2249 auto valueGroup1 = getODSOperands(1);
2250
2251 for (auto v : valueGroup1) {
2252 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
2253 return ::mlir::failure();
2254 }
2255 }
2256 {
2257 unsigned index = 0; (void)index;
2258 auto valueGroup0 = getODSResults(0);
2259
2260 for (auto v : valueGroup0) {
2261 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "result", index++)))
2262 return ::mlir::failure();
2263 }
2264 }
2265 if (!((::llzk::typesUnify((*this->getODSOperands(0).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
2266 return emitOpError("failed to verify that result type matches with lhs type");
2267 if (!((::llzk::typesUnify((*this->getODSOperands(1).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
2268 return emitOpError("failed to verify that result type matches with rhs type");
2269 return ::mlir::success();
2270}
2271
2273 return verifyInvariantsImpl();
2274}
2275
2276::llvm::LogicalResult SignedIntDivFeltOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
2277 inferredReturnTypes.resize(1);
2278 ::mlir::Builder odsBuilder(context);
2279 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::felt::FeltType>();
2280 inferredReturnTypes[0] = odsInferredType0;
2281 return ::mlir::success();
2282}
2283
2284::mlir::ParseResult SignedIntDivFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2285 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
2286 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
2287 (void)lhsOperandsLoc;
2288 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
2289 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
2290 (void)rhsOperandsLoc;
2291 ::mlir::Type lhsRawType{};
2292 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
2293 ::mlir::Type rhsRawType{};
2294 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
2295
2296 lhsOperandsLoc = parser.getCurrentLocation();
2297 if (parser.parseOperand(lhsRawOperand))
2298 return ::mlir::failure();
2299 if (parser.parseComma())
2300 return ::mlir::failure();
2301
2302 rhsOperandsLoc = parser.getCurrentLocation();
2303 if (parser.parseOperand(rhsRawOperand))
2304 return ::mlir::failure();
2305 {
2306 auto odsResult = parseInferredOrParsedType(parser, lhsRawType, true);
2307 if (odsResult) return ::mlir::failure();
2308 }
2309 {
2310 auto odsResult = parseInferredOrParsedType(parser, rhsRawType, false);
2311 if (odsResult) return ::mlir::failure();
2312 }
2313 {
2314 auto loc = parser.getCurrentLocation();(void)loc;
2315 if (parser.parseOptionalAttrDict(result.attributes))
2316 return ::mlir::failure();
2317 }
2318 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::felt::FeltType>();
2319 result.addTypes(odsBuildableType0);
2320 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
2321 return ::mlir::failure();
2322 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
2323 return ::mlir::failure();
2324 return ::mlir::success();
2325}
2326
2327void SignedIntDivFeltOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
2328 _odsPrinter << ' ';
2329 _odsPrinter << getLhs();
2330 _odsPrinter << ",";
2331 _odsPrinter << ' ';
2332 _odsPrinter << getRhs();
2333 printInferredOrParsedType(_odsPrinter, *this, getLhs().getType(), true);
2334 printInferredOrParsedType(_odsPrinter, *this, getRhs().getType(), false);
2335 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2336 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2337}
2338
2339void SignedIntDivFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
2340}
2341
2342} // namespace felt
2343} // namespace llzk
2344MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::felt::SignedIntDivFeltOp)
2345
2346namespace llzk {
2347namespace felt {
2348
2349//===----------------------------------------------------------------------===//
2350// ::llzk::felt::SignedModFeltOp definitions
2351//===----------------------------------------------------------------------===//
2352
2353namespace detail {
2354} // namespace detail
2356
2357::llvm::LogicalResult SignedModFeltOpAdaptor::verify(::mlir::Location loc) {
2358 return ::mlir::success();
2359}
2360
2361void SignedModFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
2362 odsState.addOperands(lhs);
2363 odsState.addOperands(rhs);
2364 odsState.addTypes(result);
2365}
2366
2367void SignedModFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
2368 odsState.addOperands(lhs);
2369 odsState.addOperands(rhs);
2370
2371 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2372 if (::mlir::succeeded(SignedModFeltOp::inferReturnTypes(odsBuilder.getContext(),
2373 odsState.location, odsState.operands,
2374 odsState.attributes.getDictionary(odsState.getContext()),
2375 odsState.getRawProperties(),
2376 odsState.regions, inferredReturnTypes)))
2377 odsState.addTypes(inferredReturnTypes);
2378 else
2379 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
2380
2381}
2382
2383void SignedModFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
2384 odsState.addOperands(lhs);
2385 odsState.addOperands(rhs);
2386 assert(resultTypes.size() == 1u && "mismatched number of results");
2387 odsState.addTypes(resultTypes);
2388}
2389
2390void SignedModFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2391 assert(operands.size() == 2u && "mismatched number of parameters");
2392 odsState.addOperands(operands);
2393 odsState.addAttributes(attributes);
2394 assert(resultTypes.size() == 1u && "mismatched number of return types");
2395 odsState.addTypes(resultTypes);
2396}
2397
2398void SignedModFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2399 assert(operands.size() == 2u && "mismatched number of parameters");
2400 odsState.addOperands(operands);
2401 odsState.addAttributes(attributes);
2402
2403 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2404 if (::mlir::succeeded(SignedModFeltOp::inferReturnTypes(odsBuilder.getContext(),
2405 odsState.location, operands,
2406 odsState.attributes.getDictionary(odsState.getContext()),
2407 odsState.getRawProperties(),
2408 odsState.regions, inferredReturnTypes))) {
2409 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
2410 odsState.addTypes(inferredReturnTypes);
2411 } else {
2412 ::llvm::report_fatal_error("Failed to infer result type(s).");
2413 }
2414}
2415
2417 {
2418 unsigned index = 0; (void)index;
2419 auto valueGroup0 = getODSOperands(0);
2420
2421 for (auto v : valueGroup0) {
2422 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
2423 return ::mlir::failure();
2424 }
2425 auto valueGroup1 = getODSOperands(1);
2426
2427 for (auto v : valueGroup1) {
2428 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
2429 return ::mlir::failure();
2430 }
2431 }
2432 {
2433 unsigned index = 0; (void)index;
2434 auto valueGroup0 = getODSResults(0);
2435
2436 for (auto v : valueGroup0) {
2437 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "result", index++)))
2438 return ::mlir::failure();
2439 }
2440 }
2441 if (!((::llzk::typesUnify((*this->getODSOperands(0).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
2442 return emitOpError("failed to verify that result type matches with lhs type");
2443 if (!((::llzk::typesUnify((*this->getODSOperands(1).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
2444 return emitOpError("failed to verify that result type matches with rhs type");
2445 return ::mlir::success();
2446}
2447
2448::llvm::LogicalResult SignedModFeltOp::verifyInvariants() {
2449 return verifyInvariantsImpl();
2450}
2451
2452::llvm::LogicalResult SignedModFeltOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
2453 inferredReturnTypes.resize(1);
2454 ::mlir::Builder odsBuilder(context);
2455 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::felt::FeltType>();
2456 inferredReturnTypes[0] = odsInferredType0;
2457 return ::mlir::success();
2458}
2459
2460::mlir::ParseResult SignedModFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2461 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
2462 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
2463 (void)lhsOperandsLoc;
2464 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
2465 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
2466 (void)rhsOperandsLoc;
2467 ::mlir::Type lhsRawType{};
2468 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
2469 ::mlir::Type rhsRawType{};
2470 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
2471
2472 lhsOperandsLoc = parser.getCurrentLocation();
2473 if (parser.parseOperand(lhsRawOperand))
2474 return ::mlir::failure();
2475 if (parser.parseComma())
2476 return ::mlir::failure();
2477
2478 rhsOperandsLoc = parser.getCurrentLocation();
2479 if (parser.parseOperand(rhsRawOperand))
2480 return ::mlir::failure();
2481 {
2482 auto odsResult = parseInferredOrParsedType(parser, lhsRawType, true);
2483 if (odsResult) return ::mlir::failure();
2484 }
2485 {
2486 auto odsResult = parseInferredOrParsedType(parser, rhsRawType, false);
2487 if (odsResult) return ::mlir::failure();
2488 }
2489 {
2490 auto loc = parser.getCurrentLocation();(void)loc;
2491 if (parser.parseOptionalAttrDict(result.attributes))
2492 return ::mlir::failure();
2493 }
2494 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::felt::FeltType>();
2495 result.addTypes(odsBuildableType0);
2496 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
2497 return ::mlir::failure();
2498 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
2499 return ::mlir::failure();
2500 return ::mlir::success();
2501}
2502
2503void SignedModFeltOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
2504 _odsPrinter << ' ';
2505 _odsPrinter << getLhs();
2506 _odsPrinter << ",";
2507 _odsPrinter << ' ';
2508 _odsPrinter << getRhs();
2509 printInferredOrParsedType(_odsPrinter, *this, getLhs().getType(), true);
2510 printInferredOrParsedType(_odsPrinter, *this, getRhs().getType(), false);
2511 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2512 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2513}
2514
2515void SignedModFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
2516}
2517
2518} // namespace felt
2519} // namespace llzk
2520MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::felt::SignedModFeltOp)
2521
2522namespace llzk {
2523namespace felt {
2524
2525//===----------------------------------------------------------------------===//
2526// ::llzk::felt::SubFeltOp definitions
2527//===----------------------------------------------------------------------===//
2528
2529namespace detail {
2530} // namespace detail
2532
2533::llvm::LogicalResult SubFeltOpAdaptor::verify(::mlir::Location loc) {
2534 return ::mlir::success();
2535}
2536
2537void SubFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
2538 odsState.addOperands(lhs);
2539 odsState.addOperands(rhs);
2540 odsState.addTypes(result);
2541}
2542
2543void SubFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
2544 odsState.addOperands(lhs);
2545 odsState.addOperands(rhs);
2546
2547 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2548 if (::mlir::succeeded(SubFeltOp::inferReturnTypes(odsBuilder.getContext(),
2549 odsState.location, odsState.operands,
2550 odsState.attributes.getDictionary(odsState.getContext()),
2551 odsState.getRawProperties(),
2552 odsState.regions, inferredReturnTypes)))
2553 odsState.addTypes(inferredReturnTypes);
2554 else
2555 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
2556
2557}
2558
2559void SubFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
2560 odsState.addOperands(lhs);
2561 odsState.addOperands(rhs);
2562 assert(resultTypes.size() == 1u && "mismatched number of results");
2563 odsState.addTypes(resultTypes);
2564}
2565
2566void SubFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2567 assert(operands.size() == 2u && "mismatched number of parameters");
2568 odsState.addOperands(operands);
2569 odsState.addAttributes(attributes);
2570 assert(resultTypes.size() == 1u && "mismatched number of return types");
2571 odsState.addTypes(resultTypes);
2572}
2573
2574void SubFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2575 assert(operands.size() == 2u && "mismatched number of parameters");
2576 odsState.addOperands(operands);
2577 odsState.addAttributes(attributes);
2578
2579 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2580 if (::mlir::succeeded(SubFeltOp::inferReturnTypes(odsBuilder.getContext(),
2581 odsState.location, operands,
2582 odsState.attributes.getDictionary(odsState.getContext()),
2583 odsState.getRawProperties(),
2584 odsState.regions, inferredReturnTypes))) {
2585 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
2586 odsState.addTypes(inferredReturnTypes);
2587 } else {
2588 ::llvm::report_fatal_error("Failed to infer result type(s).");
2589 }
2590}
2591
2592::llvm::LogicalResult SubFeltOp::verifyInvariantsImpl() {
2593 {
2594 unsigned index = 0; (void)index;
2595 auto valueGroup0 = getODSOperands(0);
2596
2597 for (auto v : valueGroup0) {
2598 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
2599 return ::mlir::failure();
2600 }
2601 auto valueGroup1 = getODSOperands(1);
2602
2603 for (auto v : valueGroup1) {
2604 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
2605 return ::mlir::failure();
2606 }
2607 }
2608 {
2609 unsigned index = 0; (void)index;
2610 auto valueGroup0 = getODSResults(0);
2611
2612 for (auto v : valueGroup0) {
2613 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "result", index++)))
2614 return ::mlir::failure();
2615 }
2616 }
2617 if (!((::llzk::typesUnify((*this->getODSOperands(0).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
2618 return emitOpError("failed to verify that result type matches with lhs type");
2619 if (!((::llzk::typesUnify((*this->getODSOperands(1).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
2620 return emitOpError("failed to verify that result type matches with rhs type");
2621 return ::mlir::success();
2622}
2623
2624::llvm::LogicalResult SubFeltOp::verifyInvariants() {
2625 return verifyInvariantsImpl();
2626}
2627
2628::llvm::LogicalResult SubFeltOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
2629 inferredReturnTypes.resize(1);
2630 ::mlir::Builder odsBuilder(context);
2631 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::felt::FeltType>();
2632 inferredReturnTypes[0] = odsInferredType0;
2633 return ::mlir::success();
2634}
2635
2636::mlir::ParseResult SubFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2637 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
2638 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
2639 (void)lhsOperandsLoc;
2640 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
2641 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
2642 (void)rhsOperandsLoc;
2643 ::mlir::Type lhsRawType{};
2644 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
2645 ::mlir::Type rhsRawType{};
2646 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
2647
2648 lhsOperandsLoc = parser.getCurrentLocation();
2649 if (parser.parseOperand(lhsRawOperand))
2650 return ::mlir::failure();
2651 if (parser.parseComma())
2652 return ::mlir::failure();
2653
2654 rhsOperandsLoc = parser.getCurrentLocation();
2655 if (parser.parseOperand(rhsRawOperand))
2656 return ::mlir::failure();
2657 {
2658 auto odsResult = parseInferredOrParsedType(parser, lhsRawType, true);
2659 if (odsResult) return ::mlir::failure();
2660 }
2661 {
2662 auto odsResult = parseInferredOrParsedType(parser, rhsRawType, false);
2663 if (odsResult) return ::mlir::failure();
2664 }
2665 {
2666 auto loc = parser.getCurrentLocation();(void)loc;
2667 if (parser.parseOptionalAttrDict(result.attributes))
2668 return ::mlir::failure();
2669 }
2670 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::felt::FeltType>();
2671 result.addTypes(odsBuildableType0);
2672 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
2673 return ::mlir::failure();
2674 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
2675 return ::mlir::failure();
2676 return ::mlir::success();
2677}
2678
2679void SubFeltOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
2680 _odsPrinter << ' ';
2681 _odsPrinter << getLhs();
2682 _odsPrinter << ",";
2683 _odsPrinter << ' ';
2684 _odsPrinter << getRhs();
2685 printInferredOrParsedType(_odsPrinter, *this, getLhs().getType(), true);
2686 printInferredOrParsedType(_odsPrinter, *this, getRhs().getType(), false);
2687 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2688 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2689}
2690
2691void SubFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
2692}
2693
2694} // namespace felt
2695} // namespace llzk
2696MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::felt::SubFeltOp)
2697
2698namespace llzk {
2699namespace felt {
2700
2701//===----------------------------------------------------------------------===//
2702// ::llzk::felt::UnsignedIntDivFeltOp definitions
2703//===----------------------------------------------------------------------===//
2704
2705namespace detail {
2706} // namespace detail
2708
2709::llvm::LogicalResult UnsignedIntDivFeltOpAdaptor::verify(::mlir::Location loc) {
2710 return ::mlir::success();
2711}
2712
2713void UnsignedIntDivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
2714 odsState.addOperands(lhs);
2715 odsState.addOperands(rhs);
2716 odsState.addTypes(result);
2717}
2718
2719void UnsignedIntDivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
2720 odsState.addOperands(lhs);
2721 odsState.addOperands(rhs);
2722
2723 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2724 if (::mlir::succeeded(UnsignedIntDivFeltOp::inferReturnTypes(odsBuilder.getContext(),
2725 odsState.location, odsState.operands,
2726 odsState.attributes.getDictionary(odsState.getContext()),
2727 odsState.getRawProperties(),
2728 odsState.regions, inferredReturnTypes)))
2729 odsState.addTypes(inferredReturnTypes);
2730 else
2731 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
2732
2733}
2734
2735void UnsignedIntDivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
2736 odsState.addOperands(lhs);
2737 odsState.addOperands(rhs);
2738 assert(resultTypes.size() == 1u && "mismatched number of results");
2739 odsState.addTypes(resultTypes);
2740}
2741
2742void UnsignedIntDivFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2743 assert(operands.size() == 2u && "mismatched number of parameters");
2744 odsState.addOperands(operands);
2745 odsState.addAttributes(attributes);
2746 assert(resultTypes.size() == 1u && "mismatched number of return types");
2747 odsState.addTypes(resultTypes);
2748}
2749
2750void UnsignedIntDivFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2751 assert(operands.size() == 2u && "mismatched number of parameters");
2752 odsState.addOperands(operands);
2753 odsState.addAttributes(attributes);
2754
2755 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2756 if (::mlir::succeeded(UnsignedIntDivFeltOp::inferReturnTypes(odsBuilder.getContext(),
2757 odsState.location, operands,
2758 odsState.attributes.getDictionary(odsState.getContext()),
2759 odsState.getRawProperties(),
2760 odsState.regions, inferredReturnTypes))) {
2761 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
2762 odsState.addTypes(inferredReturnTypes);
2763 } else {
2764 ::llvm::report_fatal_error("Failed to infer result type(s).");
2765 }
2766}
2767
2769 {
2770 unsigned index = 0; (void)index;
2771 auto valueGroup0 = getODSOperands(0);
2772
2773 for (auto v : valueGroup0) {
2774 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
2775 return ::mlir::failure();
2776 }
2777 auto valueGroup1 = getODSOperands(1);
2778
2779 for (auto v : valueGroup1) {
2780 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
2781 return ::mlir::failure();
2782 }
2783 }
2784 {
2785 unsigned index = 0; (void)index;
2786 auto valueGroup0 = getODSResults(0);
2787
2788 for (auto v : valueGroup0) {
2789 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "result", index++)))
2790 return ::mlir::failure();
2791 }
2792 }
2793 if (!((::llzk::typesUnify((*this->getODSOperands(0).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
2794 return emitOpError("failed to verify that result type matches with lhs type");
2795 if (!((::llzk::typesUnify((*this->getODSOperands(1).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
2796 return emitOpError("failed to verify that result type matches with rhs type");
2797 return ::mlir::success();
2798}
2799
2801 return verifyInvariantsImpl();
2802}
2803
2804::llvm::LogicalResult UnsignedIntDivFeltOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
2805 inferredReturnTypes.resize(1);
2806 ::mlir::Builder odsBuilder(context);
2807 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::felt::FeltType>();
2808 inferredReturnTypes[0] = odsInferredType0;
2809 return ::mlir::success();
2810}
2811
2812::mlir::ParseResult UnsignedIntDivFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2813 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
2814 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
2815 (void)lhsOperandsLoc;
2816 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
2817 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
2818 (void)rhsOperandsLoc;
2819 ::mlir::Type lhsRawType{};
2820 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
2821 ::mlir::Type rhsRawType{};
2822 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
2823
2824 lhsOperandsLoc = parser.getCurrentLocation();
2825 if (parser.parseOperand(lhsRawOperand))
2826 return ::mlir::failure();
2827 if (parser.parseComma())
2828 return ::mlir::failure();
2829
2830 rhsOperandsLoc = parser.getCurrentLocation();
2831 if (parser.parseOperand(rhsRawOperand))
2832 return ::mlir::failure();
2833 {
2834 auto odsResult = parseInferredOrParsedType(parser, lhsRawType, true);
2835 if (odsResult) return ::mlir::failure();
2836 }
2837 {
2838 auto odsResult = parseInferredOrParsedType(parser, rhsRawType, false);
2839 if (odsResult) return ::mlir::failure();
2840 }
2841 {
2842 auto loc = parser.getCurrentLocation();(void)loc;
2843 if (parser.parseOptionalAttrDict(result.attributes))
2844 return ::mlir::failure();
2845 }
2846 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::felt::FeltType>();
2847 result.addTypes(odsBuildableType0);
2848 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
2849 return ::mlir::failure();
2850 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
2851 return ::mlir::failure();
2852 return ::mlir::success();
2853}
2854
2855void UnsignedIntDivFeltOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
2856 _odsPrinter << ' ';
2857 _odsPrinter << getLhs();
2858 _odsPrinter << ",";
2859 _odsPrinter << ' ';
2860 _odsPrinter << getRhs();
2861 printInferredOrParsedType(_odsPrinter, *this, getLhs().getType(), true);
2862 printInferredOrParsedType(_odsPrinter, *this, getRhs().getType(), false);
2863 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2864 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2865}
2866
2867void UnsignedIntDivFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
2868}
2869
2870} // namespace felt
2871} // namespace llzk
2872MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::felt::UnsignedIntDivFeltOp)
2873
2874namespace llzk {
2875namespace felt {
2876
2877//===----------------------------------------------------------------------===//
2878// ::llzk::felt::UnsignedModFeltOp definitions
2879//===----------------------------------------------------------------------===//
2880
2881namespace detail {
2882} // namespace detail
2884
2885::llvm::LogicalResult UnsignedModFeltOpAdaptor::verify(::mlir::Location loc) {
2886 return ::mlir::success();
2887}
2888
2889void UnsignedModFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
2890 odsState.addOperands(lhs);
2891 odsState.addOperands(rhs);
2892 odsState.addTypes(result);
2893}
2894
2895void UnsignedModFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
2896 odsState.addOperands(lhs);
2897 odsState.addOperands(rhs);
2898
2899 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2900 if (::mlir::succeeded(UnsignedModFeltOp::inferReturnTypes(odsBuilder.getContext(),
2901 odsState.location, odsState.operands,
2902 odsState.attributes.getDictionary(odsState.getContext()),
2903 odsState.getRawProperties(),
2904 odsState.regions, inferredReturnTypes)))
2905 odsState.addTypes(inferredReturnTypes);
2906 else
2907 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
2908
2909}
2910
2911void UnsignedModFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
2912 odsState.addOperands(lhs);
2913 odsState.addOperands(rhs);
2914 assert(resultTypes.size() == 1u && "mismatched number of results");
2915 odsState.addTypes(resultTypes);
2916}
2917
2918void UnsignedModFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2919 assert(operands.size() == 2u && "mismatched number of parameters");
2920 odsState.addOperands(operands);
2921 odsState.addAttributes(attributes);
2922 assert(resultTypes.size() == 1u && "mismatched number of return types");
2923 odsState.addTypes(resultTypes);
2924}
2925
2926void UnsignedModFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2927 assert(operands.size() == 2u && "mismatched number of parameters");
2928 odsState.addOperands(operands);
2929 odsState.addAttributes(attributes);
2930
2931 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
2932 if (::mlir::succeeded(UnsignedModFeltOp::inferReturnTypes(odsBuilder.getContext(),
2933 odsState.location, operands,
2934 odsState.attributes.getDictionary(odsState.getContext()),
2935 odsState.getRawProperties(),
2936 odsState.regions, inferredReturnTypes))) {
2937 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
2938 odsState.addTypes(inferredReturnTypes);
2939 } else {
2940 ::llvm::report_fatal_error("Failed to infer result type(s).");
2941 }
2942}
2943
2945 {
2946 unsigned index = 0; (void)index;
2947 auto valueGroup0 = getODSOperands(0);
2948
2949 for (auto v : valueGroup0) {
2950 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
2951 return ::mlir::failure();
2952 }
2953 auto valueGroup1 = getODSOperands(1);
2954
2955 for (auto v : valueGroup1) {
2956 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
2957 return ::mlir::failure();
2958 }
2959 }
2960 {
2961 unsigned index = 0; (void)index;
2962 auto valueGroup0 = getODSResults(0);
2963
2964 for (auto v : valueGroup0) {
2965 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "result", index++)))
2966 return ::mlir::failure();
2967 }
2968 }
2969 if (!((::llzk::typesUnify((*this->getODSOperands(0).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
2970 return emitOpError("failed to verify that result type matches with lhs type");
2971 if (!((::llzk::typesUnify((*this->getODSOperands(1).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
2972 return emitOpError("failed to verify that result type matches with rhs type");
2973 return ::mlir::success();
2974}
2975
2977 return verifyInvariantsImpl();
2978}
2979
2980::llvm::LogicalResult UnsignedModFeltOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
2981 inferredReturnTypes.resize(1);
2982 ::mlir::Builder odsBuilder(context);
2983 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::felt::FeltType>();
2984 inferredReturnTypes[0] = odsInferredType0;
2985 return ::mlir::success();
2986}
2987
2988::mlir::ParseResult UnsignedModFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2989 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
2990 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
2991 (void)lhsOperandsLoc;
2992 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
2993 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
2994 (void)rhsOperandsLoc;
2995 ::mlir::Type lhsRawType{};
2996 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
2997 ::mlir::Type rhsRawType{};
2998 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
2999
3000 lhsOperandsLoc = parser.getCurrentLocation();
3001 if (parser.parseOperand(lhsRawOperand))
3002 return ::mlir::failure();
3003 if (parser.parseComma())
3004 return ::mlir::failure();
3005
3006 rhsOperandsLoc = parser.getCurrentLocation();
3007 if (parser.parseOperand(rhsRawOperand))
3008 return ::mlir::failure();
3009 {
3010 auto odsResult = parseInferredOrParsedType(parser, lhsRawType, true);
3011 if (odsResult) return ::mlir::failure();
3012 }
3013 {
3014 auto odsResult = parseInferredOrParsedType(parser, rhsRawType, false);
3015 if (odsResult) return ::mlir::failure();
3016 }
3017 {
3018 auto loc = parser.getCurrentLocation();(void)loc;
3019 if (parser.parseOptionalAttrDict(result.attributes))
3020 return ::mlir::failure();
3021 }
3022 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::felt::FeltType>();
3023 result.addTypes(odsBuildableType0);
3024 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
3025 return ::mlir::failure();
3026 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
3027 return ::mlir::failure();
3028 return ::mlir::success();
3029}
3030
3031void UnsignedModFeltOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
3032 _odsPrinter << ' ';
3033 _odsPrinter << getLhs();
3034 _odsPrinter << ",";
3035 _odsPrinter << ' ';
3036 _odsPrinter << getRhs();
3037 printInferredOrParsedType(_odsPrinter, *this, getLhs().getType(), true);
3038 printInferredOrParsedType(_odsPrinter, *this, getRhs().getType(), false);
3039 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
3040 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
3041}
3042
3043void UnsignedModFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
3044}
3045
3046} // namespace felt
3047} // namespace llzk
3048MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::felt::UnsignedModFeltOp)
3049
3050namespace llzk {
3051namespace felt {
3052
3053//===----------------------------------------------------------------------===//
3054// ::llzk::felt::XorFeltOp definitions
3055//===----------------------------------------------------------------------===//
3056
3057namespace detail {
3058} // namespace detail
3060
3061::llvm::LogicalResult XorFeltOpAdaptor::verify(::mlir::Location loc) {
3062 return ::mlir::success();
3063}
3064
3065void XorFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
3066 odsState.addOperands(lhs);
3067 odsState.addOperands(rhs);
3068 odsState.addTypes(result);
3069}
3070
3071void XorFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
3072 odsState.addOperands(lhs);
3073 odsState.addOperands(rhs);
3074
3075 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3076 if (::mlir::succeeded(XorFeltOp::inferReturnTypes(odsBuilder.getContext(),
3077 odsState.location, odsState.operands,
3078 odsState.attributes.getDictionary(odsState.getContext()),
3079 odsState.getRawProperties(),
3080 odsState.regions, inferredReturnTypes)))
3081 odsState.addTypes(inferredReturnTypes);
3082 else
3083 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
3084
3085}
3086
3087void XorFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
3088 odsState.addOperands(lhs);
3089 odsState.addOperands(rhs);
3090 assert(resultTypes.size() == 1u && "mismatched number of results");
3091 odsState.addTypes(resultTypes);
3092}
3093
3094void XorFeltOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3095 assert(operands.size() == 2u && "mismatched number of parameters");
3096 odsState.addOperands(operands);
3097 odsState.addAttributes(attributes);
3098 assert(resultTypes.size() == 1u && "mismatched number of return types");
3099 odsState.addTypes(resultTypes);
3100}
3101
3102void XorFeltOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3103 assert(operands.size() == 2u && "mismatched number of parameters");
3104 odsState.addOperands(operands);
3105 odsState.addAttributes(attributes);
3106
3107 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
3108 if (::mlir::succeeded(XorFeltOp::inferReturnTypes(odsBuilder.getContext(),
3109 odsState.location, operands,
3110 odsState.attributes.getDictionary(odsState.getContext()),
3111 odsState.getRawProperties(),
3112 odsState.regions, inferredReturnTypes))) {
3113 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
3114 odsState.addTypes(inferredReturnTypes);
3115 } else {
3116 ::llvm::report_fatal_error("Failed to infer result type(s).");
3117 }
3118}
3119
3120::llvm::LogicalResult XorFeltOp::verifyInvariantsImpl() {
3121 {
3122 unsigned index = 0; (void)index;
3123 auto valueGroup0 = getODSOperands(0);
3124
3125 for (auto v : valueGroup0) {
3126 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
3127 return ::mlir::failure();
3128 }
3129 auto valueGroup1 = getODSOperands(1);
3130
3131 for (auto v : valueGroup1) {
3132 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
3133 return ::mlir::failure();
3134 }
3135 }
3136 {
3137 unsigned index = 0; (void)index;
3138 auto valueGroup0 = getODSResults(0);
3139
3140 for (auto v : valueGroup0) {
3141 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "result", index++)))
3142 return ::mlir::failure();
3143 }
3144 }
3145 if (!((::llzk::typesUnify((*this->getODSOperands(0).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
3146 return emitOpError("failed to verify that result type matches with lhs type");
3147 if (!((::llzk::typesUnify((*this->getODSOperands(1).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
3148 return emitOpError("failed to verify that result type matches with rhs type");
3149 return ::mlir::success();
3150}
3151
3152::llvm::LogicalResult XorFeltOp::verifyInvariants() {
3153 return verifyInvariantsImpl();
3154}
3155
3156::llvm::LogicalResult XorFeltOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
3157 inferredReturnTypes.resize(1);
3158 ::mlir::Builder odsBuilder(context);
3159 ::mlir::Type odsInferredType0 = odsBuilder.getType<::llzk::felt::FeltType>();
3160 inferredReturnTypes[0] = odsInferredType0;
3161 return ::mlir::success();
3162}
3163
3164::mlir::ParseResult XorFeltOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
3165 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
3166 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
3167 (void)lhsOperandsLoc;
3168 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
3169 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
3170 (void)rhsOperandsLoc;
3171 ::mlir::Type lhsRawType{};
3172 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
3173 ::mlir::Type rhsRawType{};
3174 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
3175
3176 lhsOperandsLoc = parser.getCurrentLocation();
3177 if (parser.parseOperand(lhsRawOperand))
3178 return ::mlir::failure();
3179 if (parser.parseComma())
3180 return ::mlir::failure();
3181
3182 rhsOperandsLoc = parser.getCurrentLocation();
3183 if (parser.parseOperand(rhsRawOperand))
3184 return ::mlir::failure();
3185 {
3186 auto odsResult = parseInferredOrParsedType(parser, lhsRawType, true);
3187 if (odsResult) return ::mlir::failure();
3188 }
3189 {
3190 auto odsResult = parseInferredOrParsedType(parser, rhsRawType, false);
3191 if (odsResult) return ::mlir::failure();
3192 }
3193 {
3194 auto loc = parser.getCurrentLocation();(void)loc;
3195 if (parser.parseOptionalAttrDict(result.attributes))
3196 return ::mlir::failure();
3197 }
3198 ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::llzk::felt::FeltType>();
3199 result.addTypes(odsBuildableType0);
3200 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
3201 return ::mlir::failure();
3202 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
3203 return ::mlir::failure();
3204 return ::mlir::success();
3205}
3206
3207void XorFeltOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
3208 _odsPrinter << ' ';
3209 _odsPrinter << getLhs();
3210 _odsPrinter << ",";
3211 _odsPrinter << ' ';
3212 _odsPrinter << getRhs();
3213 printInferredOrParsedType(_odsPrinter, *this, getLhs().getType(), true);
3214 printInferredOrParsedType(_odsPrinter, *this, getRhs().getType(), false);
3215 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
3216 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
3217}
3218
3219void XorFeltOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
3220}
3221
3222} // namespace felt
3223} // namespace llzk
3224MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::felt::XorFeltOp)
3225
3226
3227#endif // GET_OP_CLASSES
3228
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:90
AddFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:139
AddFeltOpAdaptor(AddFeltOp op)
Definition Ops.cpp.inc:88
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:181
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:206
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:149
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:193
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:236
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:228
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:210
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:248
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:185
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:200
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:94
AndFeltOpAdaptor(AndFeltOp op)
Definition Ops.cpp.inc:264
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:266
AndFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:316
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:325
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:412
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:361
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:270
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:357
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:387
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:369
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:377
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:383
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:405
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:424
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:442
DivFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:493
DivFeltOpAdaptor(DivFeltOp op)
Definition Ops.cpp.inc:440
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:582
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:501
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:588
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:564
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:560
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:537
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:545
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:600
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:533
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:554
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:446
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:625
FeltConstantOpAdaptor(FeltConstantOp op)
Definition Ops.cpp.inc:623
FeltConstantOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:701
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::felt::FeltConstAttr value)
Definition Ops.cpp.inc:721
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:711
FoldAdaptor::Properties Properties
Definition Ops.h.inc:744
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:843
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:814
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:704
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:678
::llvm::APInt getValue()
Definition Ops.cpp.inc:716
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:691
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:634
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:792
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:851
::llzk::felt::FeltConstAttr getValueAttr()
Definition Ops.h.inc:795
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:776
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:684
::mlir::StringAttr getValueAttrName()
Definition Ops.h.inc:750
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:673
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:822
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:695
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:657
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:810
InvFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:872
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:869
InvFeltOpAdaptor(InvFeltOp op)
Definition Ops.cpp.inc:867
::mlir::TypedValue<::mlir::Type > getOperand()
Definition Ops.h.inc:935
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:948
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:987
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:949
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:929
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value operand)
Definition Ops.cpp.inc:873
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:961
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:995
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:925
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:953
MulFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1036
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1013
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1159
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:1103
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1072
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:1107
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:1108
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:1017
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1116
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:1171
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:1125
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1104
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1097
NegFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1213
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1189
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1245
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value operand)
Definition Ops.cpp.inc:1193
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:1315
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1269
::mlir::TypedValue<::mlir::Type > getOperand()
Definition Ops.h.inc:1276
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:1289
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:1273
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1307
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1270
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1281
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1333
NotFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1377
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1389
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:1453
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1434
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value operand)
Definition Ops.cpp.inc:1337
::mlir::TypedValue<::mlir::Type > getOperand()
Definition Ops.h.inc:1440
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1413
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1425
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:1459
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:1417
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1451
OrFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1541
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1477
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1580
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:1630
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:1481
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1623
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:1572
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1602
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1568
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:1612
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1536
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:1635
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:1608
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1653
PowFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1718
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:1785
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1779
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:1748
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:1811
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:1807
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1799
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:1789
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1756
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1712
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:1657
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1744
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1829
ShlFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1895
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:1987
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:1833
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:1962
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:1966
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1932
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1975
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:1924
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1888
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1956
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:1984
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1920
ShrFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2072
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:2005
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:2096
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:2151
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:2133
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:2143
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:2163
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:2100
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:2161
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:2064
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:2009
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:2139
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:2108
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:2181
SignedIntDivFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2249
SignedIntDivFeltOpAdaptor(SignedIntDivFeltOp op)
Definition Ops.cpp.inc:2179
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:2284
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:2240
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:2310
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:2338
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:2320
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:2316
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:2272
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:2276
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:2185
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:2327
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:2339
SignedModFeltOpAdaptor(SignedModFeltOp op)
Definition Ops.cpp.inc:2355
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:2357
SignedModFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2426
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:2452
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:2460
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:2497
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:2515
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:2503
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:2361
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:2493
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:2515
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:2487
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:2416
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:2448
SubFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2603
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:2533
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:2636
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:2692
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:2537
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:2592
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:2691
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:2674
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:2679
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:2628
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:2624
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:2670
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:2664
UnsignedIntDivFeltOpAdaptor(UnsignedIntDivFeltOp op)
Definition Ops.cpp.inc:2707
UnsignedIntDivFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2780
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:2709
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:2855
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:2851
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:2812
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:2867
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:2804
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:2713
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:2768
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:2847
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:2869
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:2800
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:2841
UnsignedModFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2957
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:2885
UnsignedModFeltOpAdaptor(UnsignedModFeltOp op)
Definition Ops.cpp.inc:2883
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:3043
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:3028
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:3018
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:2976
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:2988
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:3046
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:2944
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:3024
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:3031
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:2889
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:2980
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:3061
XorFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:3134
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:3223
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:3120
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:3164
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:3201
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:3152
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:3065
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:3195
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:3156
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:3207
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:3205
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:3219
::llzk::felt::FeltConstAttr getValueAttr()
Definition Ops.h.inc:688
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:666
FeltConstantOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:670
bool typesUnify(Type lhs, Type rhs, ArrayRef< StringRef > rhsReversePrefix, UnificationMap *unifications)