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