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