LLZK 3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
Ops.h.inc
Go to the documentation of this file.
1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* Op Declarations *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* From: Ops.td *|
7|* *|
8\*===----------------------------------------------------------------------===*/
9
10namespace llzk::felt {
11
13class AddFeltOp;
14
15} // namespace llzk::felt
16namespace llzk::felt {
17
19class AndFeltOp;
20
21} // namespace llzk::felt
22namespace llzk::felt {
23
34class DivFeltOp;
35
36} // namespace llzk::felt
37namespace llzk::felt {
38
65class FeltConstantOp;
66
67} // namespace llzk::felt
68namespace llzk::felt {
69
71class InvFeltOp;
72
73} // namespace llzk::felt
74namespace llzk::felt {
75
77class MulFeltOp;
78
79} // namespace llzk::felt
80namespace llzk::felt {
81
83class NegFeltOp;
84
85} // namespace llzk::felt
86namespace llzk::felt {
87
92class NotFeltOp;
93
94} // namespace llzk::felt
95namespace llzk::felt {
96
98class OrFeltOp;
99
100} // namespace llzk::felt
101namespace llzk::felt {
102
109class PowFeltOp;
110
111} // namespace llzk::felt
112namespace llzk::felt {
113
118class ShlFeltOp;
119
120} // namespace llzk::felt
121namespace llzk::felt {
122
127class ShrFeltOp;
128
129} // namespace llzk::felt
130namespace llzk::felt {
131
144
145} // namespace llzk::felt
146namespace llzk::felt {
147
151class SignedModFeltOp;
152
153} // namespace llzk::felt
154namespace llzk::felt {
155
157class SubFeltOp;
158
159} // namespace llzk::felt
160namespace llzk::felt {
161
166
167} // namespace llzk::felt
168namespace llzk::felt {
169
174
175} // namespace llzk::felt
176namespace llzk::felt {
177
179class XorFeltOp;
180
181} // namespace llzk::felt
182#ifdef GET_OP_CLASSES
183#undef GET_OP_CLASSES
184
185namespace llzk::felt {
186
187
188//===----------------------------------------------------------------------===//
189// ::llzk::felt::AddFeltOp declarations
190//===----------------------------------------------------------------------===//
191
192namespace detail {
193
195public:
196 using Properties = ::mlir::EmptyProperties;
197protected:
198 ::mlir::DictionaryAttr odsAttrs;
199 ::std::optional<::mlir::OperationName> odsOpName;
201 ::mlir::RegionRange odsRegions;
202public:
203 AddFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
204 odsOpName.emplace("felt.add", odsAttrs.getContext());
205 }
206
208
209 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
210 return {index, 1};
211 }
212
214 return properties;
215 }
216
217 ::mlir::DictionaryAttr getAttributes() {
218 return odsAttrs;
219 }
220
221};
222
223} // namespace detail
224template <typename RangeT>
226 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
228 static constexpr int odsIndex_lhs = 0;
229 static constexpr int odsIndex_rhs = 1;
230public:
231 AddFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
232
233 AddFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : AddFeltOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
234
235 AddFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : AddFeltOpGenericAdaptor(values, attrs, Properties{}, {}) {}
236
237 AddFeltOpGenericAdaptor(RangeT values, const AddFeltOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
238
239 template <typename LateInst = AddFeltOp, typename = std::enable_if_t<std::is_same_v<LateInst, AddFeltOp>>>
240 AddFeltOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
241
242 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
243 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
244 }
245
246 RangeT getODSOperands(unsigned index) {
247 auto valueRange = getODSOperandIndexAndLength(index);
248 return {std::next(odsOperands.begin(), valueRange.first),
249 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
250 }
251
252 ValueT getLhs() {
253 return (*getODSOperands(0).begin());
254 }
255
256 ValueT getRhs() {
257 return (*getODSOperands(1).begin());
258 }
259
260 RangeT getOperands() {
261 return odsOperands;
262 }
263
264private:
265 RangeT odsOperands;
266};
267class AddFeltOpAdaptor : public AddFeltOpGenericAdaptor<::mlir::ValueRange> {
268public:
271
272 ::llvm::LogicalResult verify(::mlir::Location loc);
273};
274class AddFeltOp : public ::mlir::Op<AddFeltOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::OpTrait::IsCommutative, ::llzk::felt::FeltBinaryOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait, ::mlir::OpTrait::InferTypeOpAdaptor, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> {
275public:
276 using Op::Op;
277 using Op::print;
279 template <typename RangeT>
282 static constexpr int odsIndex_lhs = 0;
283 static constexpr int odsIndex_rhs = 1;
285 using ::mlir::InferTypeOpInterface::Trait<AddFeltOp>::refineReturnTypes;
286 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
287 return {};
288 }
289
290 static constexpr ::llvm::StringLiteral getOperationName() {
291 return ::llvm::StringLiteral("felt.add");
292 }
293
294 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
295 return {index, 1};
296 }
297
298 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
299 auto valueRange = getODSOperandIndexAndLength(index);
300 return {std::next(getOperation()->operand_begin(), valueRange.first),
301 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
302 }
303
304 ::mlir::TypedValue<::mlir::Type> getLhs() {
305 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
306 }
307
308 ::mlir::TypedValue<::mlir::Type> getRhs() {
309 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
310 }
311
312 ::mlir::OpOperand &getLhsMutable() {
313 auto range = getODSOperandIndexAndLength(0);
314 return getOperation()->getOpOperand(range.first);
315 }
316
317 ::mlir::OpOperand &getRhsMutable() {
318 auto range = getODSOperandIndexAndLength(1);
319 return getOperation()->getOpOperand(range.first);
320 }
321
322 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
323 return {index, 1};
324 }
325
326 ::mlir::Operation::result_range getODSResults(unsigned index) {
327 auto valueRange = getODSResultIndexAndLength(index);
328 return {std::next(getOperation()->result_begin(), valueRange.first),
329 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
330 }
331
332 ::mlir::TypedValue<::mlir::Type> getResult() {
333 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
334 }
335
336 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
337 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
338 static llvm::hash_code computePropertiesHash(const Properties &prop);
339 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
340 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
341 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
342 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
343 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
344 static AddFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
345 static AddFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
346 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs);
347 static AddFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value lhs, ::mlir::Value rhs);
348 static AddFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value lhs, ::mlir::Value rhs);
349 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
350 static AddFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
351 static AddFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
352 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
353 static AddFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
354 static AddFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
355 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
356 static AddFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
357 static AddFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
358 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
359 static AddFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
360 static AddFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
361 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
362 static AddFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
363 static AddFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
364 ::llvm::LogicalResult verifyInvariantsImpl();
365 ::llvm::LogicalResult verifyInvariants();
366 ::mlir::OpFoldResult fold(FoldAdaptor adaptor);
367 static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
368 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
369 void print(::mlir::OpAsmPrinter &_odsPrinter);
370 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
371public:
372 static ::llvm::LogicalResult
373 inferReturnTypes(::mlir::MLIRContext *context,
374 std::optional<::mlir::Location> location,
375 Adaptor adaptor,
376 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
377
378 static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r);
379
380
381 private:
382 static ::mlir::ParseResult parseInferredOrParsedType(
383 ::mlir::OpAsmParser &parser, ::mlir::Type &opType, bool isFirst
384 ) {
385 if (mlir::succeeded(isFirst ? parser.parseOptionalColon() : parser.parseOptionalComma())) {
386 // If there is a comma, parse the `opType`
387 mlir::Type type;
388 if (parser.parseCustomTypeWithFallback(type)) {
389 return mlir::failure();
390 }
391 opType = type;
392 } else {
393 // Otherwise, build the default type
394 opType =
395 ::llzk::felt::FeltType::get(parser.getBuilder().getContext());
396 }
397 return mlir::success();
398 }
399
400 static void printInferredOrParsedType(::mlir::OpAsmPrinter &printer,
401 ::mlir::Operation *op, ::mlir::Type opType, bool isFirst
402 ) {
403 printer << (isFirst ? " : " : ", ");
404 printer.printStrippedAttrOrType(opType);
405 }
406};
407
408} // namespace llzk::felt
409MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::felt::AddFeltOp)
410
411namespace llzk::felt {
412
413
414//===----------------------------------------------------------------------===//
415// ::llzk::felt::AndFeltOp declarations
416//===----------------------------------------------------------------------===//
417
418namespace detail {
419
421public:
422 using Properties = ::mlir::EmptyProperties;
423protected:
424 ::mlir::DictionaryAttr odsAttrs;
425 ::std::optional<::mlir::OperationName> odsOpName;
427 ::mlir::RegionRange odsRegions;
428public:
429 AndFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
430 odsOpName.emplace("felt.bit_and", odsAttrs.getContext());
431 }
432
434
435 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
436 return {index, 1};
437 }
438
440 return properties;
441 }
442
443 ::mlir::DictionaryAttr getAttributes() {
444 return odsAttrs;
445 }
446
447};
448
449} // namespace detail
450template <typename RangeT>
452 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
454 static constexpr int odsIndex_lhs = 0;
455 static constexpr int odsIndex_rhs = 1;
456public:
457 AndFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
458
459 AndFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : AndFeltOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
460
461 AndFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : AndFeltOpGenericAdaptor(values, attrs, Properties{}, {}) {}
462
463 AndFeltOpGenericAdaptor(RangeT values, const AndFeltOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
464
465 template <typename LateInst = AndFeltOp, typename = std::enable_if_t<std::is_same_v<LateInst, AndFeltOp>>>
466 AndFeltOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
467
468 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
469 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
470 }
471
472 RangeT getODSOperands(unsigned index) {
473 auto valueRange = getODSOperandIndexAndLength(index);
474 return {std::next(odsOperands.begin(), valueRange.first),
475 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
476 }
477
478 ValueT getLhs() {
479 return (*getODSOperands(0).begin());
480 }
481
482 ValueT getRhs() {
483 return (*getODSOperands(1).begin());
484 }
485
486 RangeT getOperands() {
487 return odsOperands;
488 }
489
490private:
491 RangeT odsOperands;
492};
493class AndFeltOpAdaptor : public AndFeltOpGenericAdaptor<::mlir::ValueRange> {
494public:
497
498 ::llvm::LogicalResult verify(::mlir::Location loc);
499};
500class AndFeltOp : public ::mlir::Op<AndFeltOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::llzk::function::NotFieldNative, ::mlir::OpTrait::OpInvariants, ::mlir::OpTrait::IsCommutative, ::llzk::felt::FeltBinaryOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait, ::mlir::OpTrait::InferTypeOpAdaptor, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> {
501public:
502 using Op::Op;
503 using Op::print;
505 template <typename RangeT>
508 static constexpr int odsIndex_lhs = 0;
509 static constexpr int odsIndex_rhs = 1;
511 using ::mlir::InferTypeOpInterface::Trait<AndFeltOp>::refineReturnTypes;
512 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
513 return {};
514 }
515
516 static constexpr ::llvm::StringLiteral getOperationName() {
517 return ::llvm::StringLiteral("felt.bit_and");
518 }
519
520 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
521 return {index, 1};
522 }
523
524 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
525 auto valueRange = getODSOperandIndexAndLength(index);
526 return {std::next(getOperation()->operand_begin(), valueRange.first),
527 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
528 }
529
530 ::mlir::TypedValue<::mlir::Type> getLhs() {
531 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
532 }
533
534 ::mlir::TypedValue<::mlir::Type> getRhs() {
535 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
536 }
537
538 ::mlir::OpOperand &getLhsMutable() {
539 auto range = getODSOperandIndexAndLength(0);
540 return getOperation()->getOpOperand(range.first);
541 }
542
543 ::mlir::OpOperand &getRhsMutable() {
544 auto range = getODSOperandIndexAndLength(1);
545 return getOperation()->getOpOperand(range.first);
546 }
547
548 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
549 return {index, 1};
550 }
551
552 ::mlir::Operation::result_range getODSResults(unsigned index) {
553 auto valueRange = getODSResultIndexAndLength(index);
554 return {std::next(getOperation()->result_begin(), valueRange.first),
555 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
556 }
557
558 ::mlir::TypedValue<::mlir::Type> getResult() {
559 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
560 }
561
562 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
563 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
564 static llvm::hash_code computePropertiesHash(const Properties &prop);
565 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
566 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
567 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
568 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
569 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
570 static AndFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
571 static AndFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
572 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs);
573 static AndFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value lhs, ::mlir::Value rhs);
574 static AndFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value lhs, ::mlir::Value rhs);
575 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
576 static AndFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
577 static AndFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
578 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
579 static AndFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
580 static AndFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
581 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
582 static AndFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
583 static AndFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
584 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
585 static AndFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
586 static AndFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
587 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
588 static AndFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
589 static AndFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
590 ::llvm::LogicalResult verifyInvariantsImpl();
591 ::llvm::LogicalResult verifyInvariants();
592 ::mlir::OpFoldResult fold(FoldAdaptor adaptor);
593 static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
594 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
595 void print(::mlir::OpAsmPrinter &_odsPrinter);
596 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
597public:
598 static ::llvm::LogicalResult
599 inferReturnTypes(::mlir::MLIRContext *context,
600 std::optional<::mlir::Location> location,
601 Adaptor adaptor,
602 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
603
604 static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r);
605
606
607 private:
608 static ::mlir::ParseResult parseInferredOrParsedType(
609 ::mlir::OpAsmParser &parser, ::mlir::Type &opType, bool isFirst
610 ) {
611 if (mlir::succeeded(isFirst ? parser.parseOptionalColon() : parser.parseOptionalComma())) {
612 // If there is a comma, parse the `opType`
613 mlir::Type type;
614 if (parser.parseCustomTypeWithFallback(type)) {
615 return mlir::failure();
616 }
617 opType = type;
618 } else {
619 // Otherwise, build the default type
620 opType =
621 ::llzk::felt::FeltType::get(parser.getBuilder().getContext());
622 }
623 return mlir::success();
624 }
625
626 static void printInferredOrParsedType(::mlir::OpAsmPrinter &printer,
627 ::mlir::Operation *op, ::mlir::Type opType, bool isFirst
628 ) {
629 printer << (isFirst ? " : " : ", ");
630 printer.printStrippedAttrOrType(opType);
631 }
632};
633
634} // namespace llzk::felt
635MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::felt::AndFeltOp)
636
637namespace llzk::felt {
638
639
640//===----------------------------------------------------------------------===//
641// ::llzk::felt::DivFeltOp declarations
642//===----------------------------------------------------------------------===//
643
644namespace detail {
645
647public:
648 using Properties = ::mlir::EmptyProperties;
649protected:
650 ::mlir::DictionaryAttr odsAttrs;
651 ::std::optional<::mlir::OperationName> odsOpName;
653 ::mlir::RegionRange odsRegions;
654public:
655 DivFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
656 odsOpName.emplace("felt.div", odsAttrs.getContext());
657 }
658
660
661 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
662 return {index, 1};
663 }
664
666 return properties;
667 }
668
669 ::mlir::DictionaryAttr getAttributes() {
670 return odsAttrs;
671 }
672
673};
674
675} // namespace detail
676template <typename RangeT>
678 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
680 static constexpr int odsIndex_lhs = 0;
681 static constexpr int odsIndex_rhs = 1;
682public:
683 DivFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
684
685 DivFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : DivFeltOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
686
687 DivFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : DivFeltOpGenericAdaptor(values, attrs, Properties{}, {}) {}
688
689 DivFeltOpGenericAdaptor(RangeT values, const DivFeltOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
690
691 template <typename LateInst = DivFeltOp, typename = std::enable_if_t<std::is_same_v<LateInst, DivFeltOp>>>
692 DivFeltOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
693
694 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
695 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
696 }
697
698 RangeT getODSOperands(unsigned index) {
699 auto valueRange = getODSOperandIndexAndLength(index);
700 return {std::next(odsOperands.begin(), valueRange.first),
701 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
702 }
703
704 ValueT getLhs() {
705 return (*getODSOperands(0).begin());
706 }
707
708 ValueT getRhs() {
709 return (*getODSOperands(1).begin());
710 }
711
712 RangeT getOperands() {
713 return odsOperands;
714 }
715
716private:
717 RangeT odsOperands;
718};
719class DivFeltOpAdaptor : public DivFeltOpGenericAdaptor<::mlir::ValueRange> {
720public:
723
724 ::llvm::LogicalResult verify(::mlir::Location loc);
725};
726class DivFeltOp : public ::mlir::Op<DivFeltOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::llzk::felt::FeltBinaryOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait, ::mlir::OpTrait::InferTypeOpAdaptor, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> {
727public:
728 using Op::Op;
729 using Op::print;
731 template <typename RangeT>
734 static constexpr int odsIndex_lhs = 0;
735 static constexpr int odsIndex_rhs = 1;
737 using ::mlir::InferTypeOpInterface::Trait<DivFeltOp>::refineReturnTypes;
738 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
739 return {};
740 }
741
742 static constexpr ::llvm::StringLiteral getOperationName() {
743 return ::llvm::StringLiteral("felt.div");
744 }
745
746 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
747 return {index, 1};
748 }
749
750 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
751 auto valueRange = getODSOperandIndexAndLength(index);
752 return {std::next(getOperation()->operand_begin(), valueRange.first),
753 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
754 }
755
756 ::mlir::TypedValue<::mlir::Type> getLhs() {
757 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
758 }
759
760 ::mlir::TypedValue<::mlir::Type> getRhs() {
761 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
762 }
763
764 ::mlir::OpOperand &getLhsMutable() {
765 auto range = getODSOperandIndexAndLength(0);
766 return getOperation()->getOpOperand(range.first);
767 }
768
769 ::mlir::OpOperand &getRhsMutable() {
770 auto range = getODSOperandIndexAndLength(1);
771 return getOperation()->getOpOperand(range.first);
772 }
773
774 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
775 return {index, 1};
776 }
777
778 ::mlir::Operation::result_range getODSResults(unsigned index) {
779 auto valueRange = getODSResultIndexAndLength(index);
780 return {std::next(getOperation()->result_begin(), valueRange.first),
781 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
782 }
783
784 ::mlir::TypedValue<::mlir::Type> getResult() {
785 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
786 }
787
788 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
789 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
790 static llvm::hash_code computePropertiesHash(const Properties &prop);
791 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
792 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
793 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
794 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
795 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
796 static DivFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
797 static DivFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
798 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs);
799 static DivFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value lhs, ::mlir::Value rhs);
800 static DivFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value lhs, ::mlir::Value rhs);
801 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
802 static DivFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
803 static DivFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
804 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
805 static DivFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
806 static DivFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
807 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
808 static DivFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
809 static DivFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
810 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
811 static DivFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
812 static DivFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
813 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
814 static DivFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
815 static DivFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
816 ::llvm::LogicalResult verifyInvariantsImpl();
817 ::llvm::LogicalResult verifyInvariants();
818 ::mlir::OpFoldResult fold(FoldAdaptor adaptor);
819 static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
820 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
821 void print(::mlir::OpAsmPrinter &_odsPrinter);
822 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
823public:
824 static ::llvm::LogicalResult
825 inferReturnTypes(::mlir::MLIRContext *context,
826 std::optional<::mlir::Location> location,
827 Adaptor adaptor,
828 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
829
830 static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r);
831
832
833 private:
834 static ::mlir::ParseResult parseInferredOrParsedType(
835 ::mlir::OpAsmParser &parser, ::mlir::Type &opType, bool isFirst
836 ) {
837 if (mlir::succeeded(isFirst ? parser.parseOptionalColon() : parser.parseOptionalComma())) {
838 // If there is a comma, parse the `opType`
839 mlir::Type type;
840 if (parser.parseCustomTypeWithFallback(type)) {
841 return mlir::failure();
842 }
843 opType = type;
844 } else {
845 // Otherwise, build the default type
846 opType =
847 ::llzk::felt::FeltType::get(parser.getBuilder().getContext());
848 }
849 return mlir::success();
850 }
851
852 static void printInferredOrParsedType(::mlir::OpAsmPrinter &printer,
853 ::mlir::Operation *op, ::mlir::Type opType, bool isFirst
854 ) {
855 printer << (isFirst ? " : " : ", ");
856 printer.printStrippedAttrOrType(opType);
857 }
858};
859
860} // namespace llzk::felt
861MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::felt::DivFeltOp)
862
863namespace llzk::felt {
864
865
866//===----------------------------------------------------------------------===//
867// ::llzk::felt::FeltConstantOp declarations
868//===----------------------------------------------------------------------===//
869
870namespace detail {
871
873public:
874 struct Properties {
875 using valueTy = ::llzk::felt::FeltConstAttr;
877
878 auto getValue() const {
879 auto &propStorage = this->value;
880 return ::llvm::cast<::llzk::felt::FeltConstAttr>(propStorage);
881 }
882 void setValue(const ::llzk::felt::FeltConstAttr &propValue) {
883 this->value = propValue;
884 }
885 bool operator==(const Properties &rhs) const {
886 return
887 rhs.value == this->value &&
888 true;
889 }
890 bool operator!=(const Properties &rhs) const {
891 return !(*this == rhs);
892 }
893 };
894protected:
895 ::mlir::DictionaryAttr odsAttrs;
896 ::std::optional<::mlir::OperationName> odsOpName;
898 ::mlir::RegionRange odsRegions;
899public:
900 FeltConstantOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
901 odsOpName.emplace("felt.const", odsAttrs.getContext());
902 }
903
905
906 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
907 return {index, 1};
908 }
909
911 return properties;
912 }
913
914 ::mlir::DictionaryAttr getAttributes() {
915 return odsAttrs;
916 }
917
918 ::llzk::felt::FeltConstAttr getValueAttr() {
919 auto attr = ::llvm::cast<::llzk::felt::FeltConstAttr>(getProperties().value);
920 return attr;
921 }
922
923 ::llzk::felt::FeltConstAttr getValue();
924};
925
926} // namespace detail
927template <typename RangeT>
929 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
931public:
932 FeltConstantOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
933
934 FeltConstantOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : FeltConstantOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
935
936 FeltConstantOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : FeltConstantOpGenericAdaptor(values, attrs, Properties{}, {}) {}
937
938 FeltConstantOpGenericAdaptor(RangeT values, const FeltConstantOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
939
940 template <typename LateInst = FeltConstantOp, typename = std::enable_if_t<std::is_same_v<LateInst, FeltConstantOp>>>
941 FeltConstantOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
942
943 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
944 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
945 }
946
947 RangeT getODSOperands(unsigned index) {
948 auto valueRange = getODSOperandIndexAndLength(index);
949 return {std::next(odsOperands.begin(), valueRange.first),
950 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
951 }
952
953 RangeT getOperands() {
954 return odsOperands;
955 }
956
957private:
958 RangeT odsOperands;
959};
960class FeltConstantOpAdaptor : public FeltConstantOpGenericAdaptor<::mlir::ValueRange> {
961public:
964
965 ::llvm::LogicalResult verify(::mlir::Location loc);
966};
967class FeltConstantOp : public ::mlir::Op<FeltConstantOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::ConstantLike, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpAsmOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait, ::mlir::OpTrait::InferTypeOpAdaptor> {
968public:
969 using Op::Op;
970 using Op::print;
972 template <typename RangeT>
976 using ::mlir::OpAsmOpInterface::Trait<FeltConstantOp>::getAsmBlockArgumentNames;
977 using ::mlir::OpAsmOpInterface::Trait<FeltConstantOp>::getAsmBlockNames;
978 using ::mlir::OpAsmOpInterface::Trait<FeltConstantOp>::getDefaultDialect;
979 using ::mlir::InferTypeOpInterface::Trait<FeltConstantOp>::refineReturnTypes;
980 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
981 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("value")};
982 return ::llvm::ArrayRef(attrNames);
983 }
984
985 ::mlir::StringAttr getValueAttrName() {
986 return getAttributeNameForIndex(0);
987 }
988
989 static ::mlir::StringAttr getValueAttrName(::mlir::OperationName name) {
990 return getAttributeNameForIndex(name, 0);
991 }
992
993 static constexpr ::llvm::StringLiteral getOperationName() {
994 return ::llvm::StringLiteral("felt.const");
995 }
996
997 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
998 return {index, 1};
999 }
1000
1001 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
1002 auto valueRange = getODSOperandIndexAndLength(index);
1003 return {std::next(getOperation()->operand_begin(), valueRange.first),
1004 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
1005 }
1006
1007 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
1008 return {index, 1};
1009 }
1010
1011 ::mlir::Operation::result_range getODSResults(unsigned index) {
1012 auto valueRange = getODSResultIndexAndLength(index);
1013 return {std::next(getOperation()->result_begin(), valueRange.first),
1014 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
1015 }
1016
1017 ::mlir::TypedValue<::mlir::Type> getResult() {
1018 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
1019 }
1020
1021 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1022 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
1023 static llvm::hash_code computePropertiesHash(const Properties &prop);
1024 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
1025 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
1026 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
1027 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1028 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
1029 void writeProperties(::mlir::DialectBytecodeWriter &writer);
1030 ::llzk::felt::FeltConstAttr getValueAttr() {
1031 return ::llvm::cast<::llzk::felt::FeltConstAttr>(getProperties().value);
1032 }
1033
1034 ::llzk::felt::FeltConstAttr getValue();
1035 void setValueAttr(::llzk::felt::FeltConstAttr attr) {
1036 getProperties().value = attr;
1037 }
1038
1039 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::felt::FeltConstAttr value);
1040 static FeltConstantOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::llzk::felt::FeltConstAttr value);
1041 static FeltConstantOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::llzk::felt::FeltConstAttr value);
1042 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::felt::FeltConstAttr value);
1043 static FeltConstantOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llzk::felt::FeltConstAttr value);
1044 static FeltConstantOp create(::mlir::ImplicitLocOpBuilder &builder, ::llzk::felt::FeltConstAttr value);
1045 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llzk::felt::FeltConstAttr value);
1046 static FeltConstantOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::llzk::felt::FeltConstAttr value);
1047 static FeltConstantOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::llzk::felt::FeltConstAttr value);
1048 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1049 static FeltConstantOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1050 static FeltConstantOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1051 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1052 static FeltConstantOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1053 static FeltConstantOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1054 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1055 static FeltConstantOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1056 static FeltConstantOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1057 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1058 static FeltConstantOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1059 static FeltConstantOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1060 ::llvm::LogicalResult verifyInvariantsImpl();
1061 ::llvm::LogicalResult verifyInvariants();
1062 static ::llvm::LogicalResult canonicalize(FeltConstantOp op, ::mlir::PatternRewriter &rewriter);
1063 static void getCanonicalizationPatterns(::mlir::RewritePatternSet &results, ::mlir::MLIRContext *context);
1064 ::mlir::OpFoldResult fold(FoldAdaptor adaptor);
1065 void getAsmResultNames(::mlir::OpAsmSetValueNameFn setNameFn);
1066 static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
1067 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
1068 void print(::mlir::OpAsmPrinter &_odsPrinter);
1069 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
1070private:
1071 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
1072 return getAttributeNameForIndex((*this)->getName(), index);
1073 }
1074
1075 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
1076 assert(index < 1 && "invalid attribute index");
1077 assert(name.getStringRef() == getOperationName() && "invalid operation name");
1078 assert(name.isRegistered() && "Operation isn't registered, missing a "
1079 "dependent dialect loading?");
1080 return name.getAttributeNames()[index];
1081 }
1082
1083public:
1084 static ::llvm::LogicalResult
1085 inferReturnTypes(::mlir::MLIRContext *context,
1086 std::optional<::mlir::Location> location,
1087 Adaptor adaptor,
1088 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
1089
1090 static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r);
1091
1092};
1093
1094} // namespace llzk::felt
1095MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::felt::FeltConstantOp)
1097
1098namespace llzk::felt {
1099
1100
1101//===----------------------------------------------------------------------===//
1102// ::llzk::felt::InvFeltOp declarations
1103//===----------------------------------------------------------------------===//
1104
1105namespace detail {
1106
1108public:
1109 using Properties = ::mlir::EmptyProperties;
1110protected:
1111 ::mlir::DictionaryAttr odsAttrs;
1112 ::std::optional<::mlir::OperationName> odsOpName;
1114 ::mlir::RegionRange odsRegions;
1115public:
1116 InvFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
1117 odsOpName.emplace("felt.inv", odsAttrs.getContext());
1118 }
1119
1121
1122 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
1123 return {index, 1};
1124 }
1125
1127 return properties;
1128 }
1129
1130 ::mlir::DictionaryAttr getAttributes() {
1131 return odsAttrs;
1132 }
1133
1134};
1135
1136} // namespace detail
1137template <typename RangeT>
1139 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
1141 static constexpr int odsIndex_operand = 0;
1142public:
1143 InvFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
1144
1145 InvFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : InvFeltOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
1146
1147 InvFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : InvFeltOpGenericAdaptor(values, attrs, Properties{}, {}) {}
1148
1149 InvFeltOpGenericAdaptor(RangeT values, const InvFeltOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
1150
1151 template <typename LateInst = InvFeltOp, typename = std::enable_if_t<std::is_same_v<LateInst, InvFeltOp>>>
1152 InvFeltOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
1153
1154 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1155 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
1156 }
1157
1158 RangeT getODSOperands(unsigned index) {
1159 auto valueRange = getODSOperandIndexAndLength(index);
1160 return {std::next(odsOperands.begin(), valueRange.first),
1161 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
1162 }
1163
1164 ValueT getOperand() {
1165 return (*getODSOperands(0).begin());
1166 }
1167
1168 RangeT getOperands() {
1169 return odsOperands;
1170 }
1171
1172private:
1173 RangeT odsOperands;
1174};
1175class InvFeltOpAdaptor : public InvFeltOpGenericAdaptor<::mlir::ValueRange> {
1176public:
1179
1180 ::llvm::LogicalResult verify(::mlir::Location loc);
1181};
1182class InvFeltOp : public ::mlir::Op<InvFeltOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::llzk::function::NotFieldNative, ::mlir::OpTrait::OpInvariants, ::mlir::InferTypeOpInterface::Trait, ::mlir::OpTrait::InferTypeOpAdaptor, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> {
1183public:
1184 using Op::Op;
1185 using Op::print;
1187 template <typename RangeT>
1190 static constexpr int odsIndex_operand = 0;
1192 using ::mlir::InferTypeOpInterface::Trait<InvFeltOp>::refineReturnTypes;
1193 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
1194 return {};
1195 }
1196
1197 static constexpr ::llvm::StringLiteral getOperationName() {
1198 return ::llvm::StringLiteral("felt.inv");
1199 }
1200
1201 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1202 return {index, 1};
1203 }
1204
1205 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
1206 auto valueRange = getODSOperandIndexAndLength(index);
1207 return {std::next(getOperation()->operand_begin(), valueRange.first),
1208 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
1209 }
1210
1211 ::mlir::TypedValue<::mlir::Type> getOperand() {
1212 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
1213 }
1214
1215 ::mlir::OpOperand &getOperandMutable() {
1216 auto range = getODSOperandIndexAndLength(0);
1217 return getOperation()->getOpOperand(range.first);
1218 }
1219
1220 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
1221 return {index, 1};
1222 }
1223
1224 ::mlir::Operation::result_range getODSResults(unsigned index) {
1225 auto valueRange = getODSResultIndexAndLength(index);
1226 return {std::next(getOperation()->result_begin(), valueRange.first),
1227 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
1228 }
1229
1230 ::mlir::TypedValue<::mlir::Type> getResult() {
1231 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
1232 }
1233
1234 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1235 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
1236 static llvm::hash_code computePropertiesHash(const Properties &prop);
1237 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
1238 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
1239 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
1240 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1241 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value operand);
1242 static InvFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value operand);
1243 static InvFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value operand);
1244 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value operand);
1245 static InvFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value operand);
1246 static InvFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value operand);
1247 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value operand);
1248 static InvFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value operand);
1249 static InvFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value operand);
1250 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1251 static InvFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1252 static InvFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1253 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1254 static InvFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1255 static InvFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1256 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1257 static InvFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1258 static InvFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1259 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1260 static InvFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1261 static InvFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1262 ::llvm::LogicalResult verifyInvariantsImpl();
1263 ::llvm::LogicalResult verifyInvariants();
1264 ::mlir::OpFoldResult fold(FoldAdaptor adaptor);
1265 static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
1266 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
1267 void print(::mlir::OpAsmPrinter &_odsPrinter);
1268 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
1269public:
1270 static ::llvm::LogicalResult
1271 inferReturnTypes(::mlir::MLIRContext *context,
1272 std::optional<::mlir::Location> location,
1273 Adaptor adaptor,
1274 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
1275
1276 static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r);
1277
1278
1279 private:
1280 static ::mlir::ParseResult parseInferredOrParsedType(
1281 ::mlir::OpAsmParser &parser, ::mlir::Type &opType, bool isFirst
1282 ) {
1283 if (mlir::succeeded(isFirst ? parser.parseOptionalColon() : parser.parseOptionalComma())) {
1284 // If there is a comma, parse the `opType`
1285 mlir::Type type;
1286 if (parser.parseCustomTypeWithFallback(type)) {
1287 return mlir::failure();
1288 }
1289 opType = type;
1290 } else {
1291 // Otherwise, build the default type
1292 opType =
1293 ::llzk::felt::FeltType::get(parser.getBuilder().getContext());
1294 }
1295 return mlir::success();
1296 }
1297
1298 static void printInferredOrParsedType(::mlir::OpAsmPrinter &printer,
1299 ::mlir::Operation *op, ::mlir::Type opType, bool isFirst
1300 ) {
1301 printer << (isFirst ? " : " : ", ");
1302 printer.printStrippedAttrOrType(opType);
1303 }
1304};
1305
1306} // namespace llzk::felt
1307MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::felt::InvFeltOp)
1308
1309namespace llzk::felt {
1310
1311
1312//===----------------------------------------------------------------------===//
1313// ::llzk::felt::MulFeltOp declarations
1314//===----------------------------------------------------------------------===//
1315
1316namespace detail {
1317
1319public:
1320 using Properties = ::mlir::EmptyProperties;
1321protected:
1322 ::mlir::DictionaryAttr odsAttrs;
1323 ::std::optional<::mlir::OperationName> odsOpName;
1325 ::mlir::RegionRange odsRegions;
1326public:
1327 MulFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
1328 odsOpName.emplace("felt.mul", odsAttrs.getContext());
1329 }
1330
1332
1333 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
1334 return {index, 1};
1335 }
1336
1338 return properties;
1339 }
1340
1341 ::mlir::DictionaryAttr getAttributes() {
1342 return odsAttrs;
1343 }
1344
1345};
1346
1347} // namespace detail
1348template <typename RangeT>
1350 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
1352 static constexpr int odsIndex_lhs = 0;
1353 static constexpr int odsIndex_rhs = 1;
1354public:
1355 MulFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
1356
1357 MulFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MulFeltOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
1358
1359 MulFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MulFeltOpGenericAdaptor(values, attrs, Properties{}, {}) {}
1360
1361 MulFeltOpGenericAdaptor(RangeT values, const MulFeltOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
1362
1363 template <typename LateInst = MulFeltOp, typename = std::enable_if_t<std::is_same_v<LateInst, MulFeltOp>>>
1364 MulFeltOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
1365
1366 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1367 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
1368 }
1369
1370 RangeT getODSOperands(unsigned index) {
1371 auto valueRange = getODSOperandIndexAndLength(index);
1372 return {std::next(odsOperands.begin(), valueRange.first),
1373 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
1374 }
1375
1376 ValueT getLhs() {
1377 return (*getODSOperands(0).begin());
1378 }
1379
1380 ValueT getRhs() {
1381 return (*getODSOperands(1).begin());
1382 }
1383
1384 RangeT getOperands() {
1385 return odsOperands;
1386 }
1387
1388private:
1389 RangeT odsOperands;
1390};
1391class MulFeltOpAdaptor : public MulFeltOpGenericAdaptor<::mlir::ValueRange> {
1392public:
1395
1396 ::llvm::LogicalResult verify(::mlir::Location loc);
1397};
1398class MulFeltOp : public ::mlir::Op<MulFeltOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::OpTrait::IsCommutative, ::llzk::felt::FeltBinaryOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait, ::mlir::OpTrait::InferTypeOpAdaptor, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> {
1399public:
1400 using Op::Op;
1401 using Op::print;
1403 template <typename RangeT>
1406 static constexpr int odsIndex_lhs = 0;
1407 static constexpr int odsIndex_rhs = 1;
1409 using ::mlir::InferTypeOpInterface::Trait<MulFeltOp>::refineReturnTypes;
1410 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
1411 return {};
1412 }
1413
1414 static constexpr ::llvm::StringLiteral getOperationName() {
1415 return ::llvm::StringLiteral("felt.mul");
1416 }
1417
1418 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1419 return {index, 1};
1420 }
1421
1422 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
1423 auto valueRange = getODSOperandIndexAndLength(index);
1424 return {std::next(getOperation()->operand_begin(), valueRange.first),
1425 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
1426 }
1427
1428 ::mlir::TypedValue<::mlir::Type> getLhs() {
1429 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
1430 }
1431
1432 ::mlir::TypedValue<::mlir::Type> getRhs() {
1433 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
1434 }
1435
1436 ::mlir::OpOperand &getLhsMutable() {
1437 auto range = getODSOperandIndexAndLength(0);
1438 return getOperation()->getOpOperand(range.first);
1439 }
1440
1441 ::mlir::OpOperand &getRhsMutable() {
1442 auto range = getODSOperandIndexAndLength(1);
1443 return getOperation()->getOpOperand(range.first);
1444 }
1445
1446 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
1447 return {index, 1};
1448 }
1449
1450 ::mlir::Operation::result_range getODSResults(unsigned index) {
1451 auto valueRange = getODSResultIndexAndLength(index);
1452 return {std::next(getOperation()->result_begin(), valueRange.first),
1453 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
1454 }
1455
1456 ::mlir::TypedValue<::mlir::Type> getResult() {
1457 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
1458 }
1459
1460 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1461 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
1462 static llvm::hash_code computePropertiesHash(const Properties &prop);
1463 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
1464 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
1465 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
1466 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1467 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
1468 static MulFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
1469 static MulFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
1470 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs);
1471 static MulFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value lhs, ::mlir::Value rhs);
1472 static MulFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value lhs, ::mlir::Value rhs);
1473 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
1474 static MulFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
1475 static MulFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
1476 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1477 static MulFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1478 static MulFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1479 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1480 static MulFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1481 static MulFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1482 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1483 static MulFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1484 static MulFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1485 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1486 static MulFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1487 static MulFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1488 ::llvm::LogicalResult verifyInvariantsImpl();
1489 ::llvm::LogicalResult verifyInvariants();
1490 ::mlir::OpFoldResult fold(FoldAdaptor adaptor);
1491 static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
1492 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
1493 void print(::mlir::OpAsmPrinter &_odsPrinter);
1494 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
1495public:
1496 static ::llvm::LogicalResult
1497 inferReturnTypes(::mlir::MLIRContext *context,
1498 std::optional<::mlir::Location> location,
1499 Adaptor adaptor,
1500 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
1501
1502 static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r);
1503
1504
1505 private:
1506 static ::mlir::ParseResult parseInferredOrParsedType(
1507 ::mlir::OpAsmParser &parser, ::mlir::Type &opType, bool isFirst
1508 ) {
1509 if (mlir::succeeded(isFirst ? parser.parseOptionalColon() : parser.parseOptionalComma())) {
1510 // If there is a comma, parse the `opType`
1511 mlir::Type type;
1512 if (parser.parseCustomTypeWithFallback(type)) {
1513 return mlir::failure();
1514 }
1515 opType = type;
1516 } else {
1517 // Otherwise, build the default type
1518 opType =
1519 ::llzk::felt::FeltType::get(parser.getBuilder().getContext());
1520 }
1521 return mlir::success();
1522 }
1523
1524 static void printInferredOrParsedType(::mlir::OpAsmPrinter &printer,
1525 ::mlir::Operation *op, ::mlir::Type opType, bool isFirst
1526 ) {
1527 printer << (isFirst ? " : " : ", ");
1528 printer.printStrippedAttrOrType(opType);
1529 }
1530};
1531
1532} // namespace llzk::felt
1533MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::felt::MulFeltOp)
1534
1535namespace llzk::felt {
1536
1537
1538//===----------------------------------------------------------------------===//
1539// ::llzk::felt::NegFeltOp declarations
1540//===----------------------------------------------------------------------===//
1541
1542namespace detail {
1543
1545public:
1546 using Properties = ::mlir::EmptyProperties;
1547protected:
1548 ::mlir::DictionaryAttr odsAttrs;
1549 ::std::optional<::mlir::OperationName> odsOpName;
1551 ::mlir::RegionRange odsRegions;
1552public:
1553 NegFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
1554 odsOpName.emplace("felt.neg", odsAttrs.getContext());
1555 }
1556
1558
1559 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
1560 return {index, 1};
1561 }
1562
1564 return properties;
1565 }
1566
1567 ::mlir::DictionaryAttr getAttributes() {
1568 return odsAttrs;
1569 }
1570
1571};
1572
1573} // namespace detail
1574template <typename RangeT>
1576 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
1578 static constexpr int odsIndex_operand = 0;
1579public:
1580 NegFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
1581
1582 NegFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : NegFeltOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
1583
1584 NegFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : NegFeltOpGenericAdaptor(values, attrs, Properties{}, {}) {}
1585
1586 NegFeltOpGenericAdaptor(RangeT values, const NegFeltOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
1587
1588 template <typename LateInst = NegFeltOp, typename = std::enable_if_t<std::is_same_v<LateInst, NegFeltOp>>>
1589 NegFeltOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
1590
1591 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1592 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
1593 }
1594
1595 RangeT getODSOperands(unsigned index) {
1596 auto valueRange = getODSOperandIndexAndLength(index);
1597 return {std::next(odsOperands.begin(), valueRange.first),
1598 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
1599 }
1600
1601 ValueT getOperand() {
1602 return (*getODSOperands(0).begin());
1603 }
1604
1605 RangeT getOperands() {
1606 return odsOperands;
1607 }
1608
1609private:
1610 RangeT odsOperands;
1611};
1612class NegFeltOpAdaptor : public NegFeltOpGenericAdaptor<::mlir::ValueRange> {
1613public:
1616
1617 ::llvm::LogicalResult verify(::mlir::Location loc);
1618};
1619class NegFeltOp : public ::mlir::Op<NegFeltOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::InferTypeOpInterface::Trait, ::mlir::OpTrait::InferTypeOpAdaptor, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> {
1620public:
1621 using Op::Op;
1622 using Op::print;
1624 template <typename RangeT>
1627 static constexpr int odsIndex_operand = 0;
1629 using ::mlir::InferTypeOpInterface::Trait<NegFeltOp>::refineReturnTypes;
1630 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
1631 return {};
1632 }
1633
1634 static constexpr ::llvm::StringLiteral getOperationName() {
1635 return ::llvm::StringLiteral("felt.neg");
1636 }
1637
1638 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1639 return {index, 1};
1640 }
1641
1642 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
1643 auto valueRange = getODSOperandIndexAndLength(index);
1644 return {std::next(getOperation()->operand_begin(), valueRange.first),
1645 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
1646 }
1647
1648 ::mlir::TypedValue<::mlir::Type> getOperand() {
1649 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
1650 }
1651
1652 ::mlir::OpOperand &getOperandMutable() {
1653 auto range = getODSOperandIndexAndLength(0);
1654 return getOperation()->getOpOperand(range.first);
1655 }
1656
1657 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
1658 return {index, 1};
1659 }
1660
1661 ::mlir::Operation::result_range getODSResults(unsigned index) {
1662 auto valueRange = getODSResultIndexAndLength(index);
1663 return {std::next(getOperation()->result_begin(), valueRange.first),
1664 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
1665 }
1666
1667 ::mlir::TypedValue<::mlir::Type> getResult() {
1668 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
1669 }
1670
1671 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1672 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
1673 static llvm::hash_code computePropertiesHash(const Properties &prop);
1674 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
1675 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
1676 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
1677 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1678 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value operand);
1679 static NegFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value operand);
1680 static NegFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value operand);
1681 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value operand);
1682 static NegFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value operand);
1683 static NegFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value operand);
1684 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value operand);
1685 static NegFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value operand);
1686 static NegFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value operand);
1687 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1688 static NegFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1689 static NegFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1690 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1691 static NegFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1692 static NegFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1693 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1694 static NegFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1695 static NegFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1696 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1697 static NegFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1698 static NegFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1699 ::llvm::LogicalResult verifyInvariantsImpl();
1700 ::llvm::LogicalResult verifyInvariants();
1701 ::mlir::OpFoldResult fold(FoldAdaptor adaptor);
1702 static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
1703 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
1704 void print(::mlir::OpAsmPrinter &_odsPrinter);
1705 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
1706public:
1707 static ::llvm::LogicalResult
1708 inferReturnTypes(::mlir::MLIRContext *context,
1709 std::optional<::mlir::Location> location,
1710 Adaptor adaptor,
1711 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
1712
1713 static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r);
1714
1715
1716 private:
1717 static ::mlir::ParseResult parseInferredOrParsedType(
1718 ::mlir::OpAsmParser &parser, ::mlir::Type &opType, bool isFirst
1719 ) {
1720 if (mlir::succeeded(isFirst ? parser.parseOptionalColon() : parser.parseOptionalComma())) {
1721 // If there is a comma, parse the `opType`
1722 mlir::Type type;
1723 if (parser.parseCustomTypeWithFallback(type)) {
1724 return mlir::failure();
1725 }
1726 opType = type;
1727 } else {
1728 // Otherwise, build the default type
1729 opType =
1730 ::llzk::felt::FeltType::get(parser.getBuilder().getContext());
1731 }
1732 return mlir::success();
1733 }
1734
1735 static void printInferredOrParsedType(::mlir::OpAsmPrinter &printer,
1736 ::mlir::Operation *op, ::mlir::Type opType, bool isFirst
1737 ) {
1738 printer << (isFirst ? " : " : ", ");
1739 printer.printStrippedAttrOrType(opType);
1740 }
1741};
1742
1743} // namespace llzk::felt
1744MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::felt::NegFeltOp)
1745
1746namespace llzk::felt {
1747
1748
1749//===----------------------------------------------------------------------===//
1750// ::llzk::felt::NotFeltOp declarations
1751//===----------------------------------------------------------------------===//
1752
1753namespace detail {
1754
1756public:
1757 using Properties = ::mlir::EmptyProperties;
1758protected:
1759 ::mlir::DictionaryAttr odsAttrs;
1760 ::std::optional<::mlir::OperationName> odsOpName;
1762 ::mlir::RegionRange odsRegions;
1763public:
1764 NotFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
1765 odsOpName.emplace("felt.bit_not", odsAttrs.getContext());
1766 }
1767
1769
1770 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
1771 return {index, 1};
1772 }
1773
1775 return properties;
1776 }
1777
1778 ::mlir::DictionaryAttr getAttributes() {
1779 return odsAttrs;
1780 }
1781
1782};
1783
1784} // namespace detail
1785template <typename RangeT>
1787 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
1789 static constexpr int odsIndex_operand = 0;
1790public:
1791 NotFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
1792
1793 NotFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : NotFeltOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
1794
1795 NotFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : NotFeltOpGenericAdaptor(values, attrs, Properties{}, {}) {}
1796
1797 NotFeltOpGenericAdaptor(RangeT values, const NotFeltOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
1798
1799 template <typename LateInst = NotFeltOp, typename = std::enable_if_t<std::is_same_v<LateInst, NotFeltOp>>>
1800 NotFeltOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
1801
1802 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1803 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
1804 }
1805
1806 RangeT getODSOperands(unsigned index) {
1807 auto valueRange = getODSOperandIndexAndLength(index);
1808 return {std::next(odsOperands.begin(), valueRange.first),
1809 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
1810 }
1811
1812 ValueT getOperand() {
1813 return (*getODSOperands(0).begin());
1814 }
1815
1816 RangeT getOperands() {
1817 return odsOperands;
1818 }
1819
1820private:
1821 RangeT odsOperands;
1822};
1823class NotFeltOpAdaptor : public NotFeltOpGenericAdaptor<::mlir::ValueRange> {
1824public:
1827
1828 ::llvm::LogicalResult verify(::mlir::Location loc);
1829};
1830class NotFeltOp : public ::mlir::Op<NotFeltOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::llzk::function::NotFieldNative, ::mlir::OpTrait::OpInvariants, ::mlir::InferTypeOpInterface::Trait, ::mlir::OpTrait::InferTypeOpAdaptor, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> {
1831public:
1832 using Op::Op;
1833 using Op::print;
1835 template <typename RangeT>
1838 static constexpr int odsIndex_operand = 0;
1840 using ::mlir::InferTypeOpInterface::Trait<NotFeltOp>::refineReturnTypes;
1841 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
1842 return {};
1843 }
1844
1845 static constexpr ::llvm::StringLiteral getOperationName() {
1846 return ::llvm::StringLiteral("felt.bit_not");
1847 }
1848
1849 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1850 return {index, 1};
1851 }
1852
1853 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
1854 auto valueRange = getODSOperandIndexAndLength(index);
1855 return {std::next(getOperation()->operand_begin(), valueRange.first),
1856 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
1857 }
1858
1859 ::mlir::TypedValue<::mlir::Type> getOperand() {
1860 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
1861 }
1862
1863 ::mlir::OpOperand &getOperandMutable() {
1864 auto range = getODSOperandIndexAndLength(0);
1865 return getOperation()->getOpOperand(range.first);
1866 }
1867
1868 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
1869 return {index, 1};
1870 }
1871
1872 ::mlir::Operation::result_range getODSResults(unsigned index) {
1873 auto valueRange = getODSResultIndexAndLength(index);
1874 return {std::next(getOperation()->result_begin(), valueRange.first),
1875 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
1876 }
1877
1878 ::mlir::TypedValue<::mlir::Type> getResult() {
1879 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
1880 }
1881
1882 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1883 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
1884 static llvm::hash_code computePropertiesHash(const Properties &prop);
1885 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
1886 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
1887 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
1888 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1889 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value operand);
1890 static NotFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value operand);
1891 static NotFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value operand);
1892 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value operand);
1893 static NotFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value operand);
1894 static NotFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value operand);
1895 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value operand);
1896 static NotFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value operand);
1897 static NotFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value operand);
1898 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1899 static NotFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1900 static NotFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1901 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1902 static NotFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1903 static NotFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1904 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1905 static NotFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1906 static NotFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1907 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1908 static NotFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1909 static NotFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1910 ::llvm::LogicalResult verifyInvariantsImpl();
1911 ::llvm::LogicalResult verifyInvariants();
1912 ::mlir::OpFoldResult fold(FoldAdaptor adaptor);
1913 static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
1914 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
1915 void print(::mlir::OpAsmPrinter &_odsPrinter);
1916 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
1917public:
1918 static ::llvm::LogicalResult
1919 inferReturnTypes(::mlir::MLIRContext *context,
1920 std::optional<::mlir::Location> location,
1921 Adaptor adaptor,
1922 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
1923
1924 static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r);
1925
1926
1927 private:
1928 static ::mlir::ParseResult parseInferredOrParsedType(
1929 ::mlir::OpAsmParser &parser, ::mlir::Type &opType, bool isFirst
1930 ) {
1931 if (mlir::succeeded(isFirst ? parser.parseOptionalColon() : parser.parseOptionalComma())) {
1932 // If there is a comma, parse the `opType`
1933 mlir::Type type;
1934 if (parser.parseCustomTypeWithFallback(type)) {
1935 return mlir::failure();
1936 }
1937 opType = type;
1938 } else {
1939 // Otherwise, build the default type
1940 opType =
1941 ::llzk::felt::FeltType::get(parser.getBuilder().getContext());
1942 }
1943 return mlir::success();
1944 }
1945
1946 static void printInferredOrParsedType(::mlir::OpAsmPrinter &printer,
1947 ::mlir::Operation *op, ::mlir::Type opType, bool isFirst
1948 ) {
1949 printer << (isFirst ? " : " : ", ");
1950 printer.printStrippedAttrOrType(opType);
1951 }
1952};
1953
1954} // namespace llzk::felt
1955MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::felt::NotFeltOp)
1956
1957namespace llzk::felt {
1958
1959
1960//===----------------------------------------------------------------------===//
1961// ::llzk::felt::OrFeltOp declarations
1962//===----------------------------------------------------------------------===//
1963
1964namespace detail {
1965
1967public:
1968 using Properties = ::mlir::EmptyProperties;
1969protected:
1970 ::mlir::DictionaryAttr odsAttrs;
1971 ::std::optional<::mlir::OperationName> odsOpName;
1973 ::mlir::RegionRange odsRegions;
1974public:
1975 OrFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
1976 odsOpName.emplace("felt.bit_or", odsAttrs.getContext());
1977 }
1978
1980
1981 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
1982 return {index, 1};
1983 }
1984
1986 return properties;
1987 }
1988
1989 ::mlir::DictionaryAttr getAttributes() {
1990 return odsAttrs;
1991 }
1992
1993};
1994
1995} // namespace detail
1996template <typename RangeT>
1998 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
2000 static constexpr int odsIndex_lhs = 0;
2001 static constexpr int odsIndex_rhs = 1;
2002public:
2003 OrFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
2004
2005 OrFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : OrFeltOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
2006
2007 OrFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : OrFeltOpGenericAdaptor(values, attrs, Properties{}, {}) {}
2008
2009 OrFeltOpGenericAdaptor(RangeT values, const OrFeltOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
2010
2011 template <typename LateInst = OrFeltOp, typename = std::enable_if_t<std::is_same_v<LateInst, OrFeltOp>>>
2012 OrFeltOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
2013
2014 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
2015 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
2016 }
2017
2018 RangeT getODSOperands(unsigned index) {
2019 auto valueRange = getODSOperandIndexAndLength(index);
2020 return {std::next(odsOperands.begin(), valueRange.first),
2021 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
2022 }
2023
2024 ValueT getLhs() {
2025 return (*getODSOperands(0).begin());
2026 }
2027
2028 ValueT getRhs() {
2029 return (*getODSOperands(1).begin());
2030 }
2031
2032 RangeT getOperands() {
2033 return odsOperands;
2034 }
2035
2036private:
2037 RangeT odsOperands;
2038};
2039class OrFeltOpAdaptor : public OrFeltOpGenericAdaptor<::mlir::ValueRange> {
2040public:
2043
2044 ::llvm::LogicalResult verify(::mlir::Location loc);
2045};
2046class OrFeltOp : public ::mlir::Op<OrFeltOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::llzk::function::NotFieldNative, ::mlir::OpTrait::OpInvariants, ::mlir::OpTrait::IsCommutative, ::llzk::felt::FeltBinaryOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait, ::mlir::OpTrait::InferTypeOpAdaptor, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> {
2047public:
2048 using Op::Op;
2049 using Op::print;
2051 template <typename RangeT>
2054 static constexpr int odsIndex_lhs = 0;
2055 static constexpr int odsIndex_rhs = 1;
2057 using ::mlir::InferTypeOpInterface::Trait<OrFeltOp>::refineReturnTypes;
2058 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
2059 return {};
2060 }
2061
2062 static constexpr ::llvm::StringLiteral getOperationName() {
2063 return ::llvm::StringLiteral("felt.bit_or");
2064 }
2065
2066 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
2067 return {index, 1};
2068 }
2069
2070 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
2071 auto valueRange = getODSOperandIndexAndLength(index);
2072 return {std::next(getOperation()->operand_begin(), valueRange.first),
2073 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
2074 }
2075
2076 ::mlir::TypedValue<::mlir::Type> getLhs() {
2077 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
2078 }
2079
2080 ::mlir::TypedValue<::mlir::Type> getRhs() {
2081 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
2082 }
2083
2084 ::mlir::OpOperand &getLhsMutable() {
2085 auto range = getODSOperandIndexAndLength(0);
2086 return getOperation()->getOpOperand(range.first);
2087 }
2088
2089 ::mlir::OpOperand &getRhsMutable() {
2090 auto range = getODSOperandIndexAndLength(1);
2091 return getOperation()->getOpOperand(range.first);
2092 }
2093
2094 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
2095 return {index, 1};
2096 }
2097
2098 ::mlir::Operation::result_range getODSResults(unsigned index) {
2099 auto valueRange = getODSResultIndexAndLength(index);
2100 return {std::next(getOperation()->result_begin(), valueRange.first),
2101 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
2102 }
2103
2104 ::mlir::TypedValue<::mlir::Type> getResult() {
2105 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
2106 }
2107
2108 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
2109 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
2110 static llvm::hash_code computePropertiesHash(const Properties &prop);
2111 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
2112 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
2113 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
2114 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
2115 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
2116 static OrFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
2117 static OrFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
2118 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs);
2119 static OrFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value lhs, ::mlir::Value rhs);
2120 static OrFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value lhs, ::mlir::Value rhs);
2121 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
2122 static OrFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
2123 static OrFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
2124 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2125 static OrFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2126 static OrFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2127 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2128 static OrFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2129 static OrFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2130 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2131 static OrFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2132 static OrFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2133 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2134 static OrFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2135 static OrFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2136 ::llvm::LogicalResult verifyInvariantsImpl();
2137 ::llvm::LogicalResult verifyInvariants();
2138 ::mlir::OpFoldResult fold(FoldAdaptor adaptor);
2139 static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
2140 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
2141 void print(::mlir::OpAsmPrinter &_odsPrinter);
2142 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
2143public:
2144 static ::llvm::LogicalResult
2145 inferReturnTypes(::mlir::MLIRContext *context,
2146 std::optional<::mlir::Location> location,
2147 Adaptor adaptor,
2148 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
2149
2150 static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r);
2151
2152
2153 private:
2154 static ::mlir::ParseResult parseInferredOrParsedType(
2155 ::mlir::OpAsmParser &parser, ::mlir::Type &opType, bool isFirst
2156 ) {
2157 if (mlir::succeeded(isFirst ? parser.parseOptionalColon() : parser.parseOptionalComma())) {
2158 // If there is a comma, parse the `opType`
2159 mlir::Type type;
2160 if (parser.parseCustomTypeWithFallback(type)) {
2161 return mlir::failure();
2162 }
2163 opType = type;
2164 } else {
2165 // Otherwise, build the default type
2166 opType =
2167 ::llzk::felt::FeltType::get(parser.getBuilder().getContext());
2168 }
2169 return mlir::success();
2170 }
2171
2172 static void printInferredOrParsedType(::mlir::OpAsmPrinter &printer,
2173 ::mlir::Operation *op, ::mlir::Type opType, bool isFirst
2174 ) {
2175 printer << (isFirst ? " : " : ", ");
2176 printer.printStrippedAttrOrType(opType);
2177 }
2178};
2179
2180} // namespace llzk::felt
2181MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::felt::OrFeltOp)
2182
2183namespace llzk::felt {
2184
2185
2186//===----------------------------------------------------------------------===//
2187// ::llzk::felt::PowFeltOp declarations
2188//===----------------------------------------------------------------------===//
2189
2190namespace detail {
2191
2193public:
2194 using Properties = ::mlir::EmptyProperties;
2195protected:
2196 ::mlir::DictionaryAttr odsAttrs;
2197 ::std::optional<::mlir::OperationName> odsOpName;
2199 ::mlir::RegionRange odsRegions;
2200public:
2201 PowFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
2202 odsOpName.emplace("felt.pow", odsAttrs.getContext());
2203 }
2204
2206
2207 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
2208 return {index, 1};
2209 }
2210
2212 return properties;
2213 }
2214
2215 ::mlir::DictionaryAttr getAttributes() {
2216 return odsAttrs;
2217 }
2218
2219};
2220
2221} // namespace detail
2222template <typename RangeT>
2224 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
2226 static constexpr int odsIndex_lhs = 0;
2227 static constexpr int odsIndex_rhs = 1;
2228public:
2229 PowFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
2230
2231 PowFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : PowFeltOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
2232
2233 PowFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : PowFeltOpGenericAdaptor(values, attrs, Properties{}, {}) {}
2234
2235 PowFeltOpGenericAdaptor(RangeT values, const PowFeltOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
2236
2237 template <typename LateInst = PowFeltOp, typename = std::enable_if_t<std::is_same_v<LateInst, PowFeltOp>>>
2238 PowFeltOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
2239
2240 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
2241 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
2242 }
2243
2244 RangeT getODSOperands(unsigned index) {
2245 auto valueRange = getODSOperandIndexAndLength(index);
2246 return {std::next(odsOperands.begin(), valueRange.first),
2247 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
2248 }
2249
2250 ValueT getLhs() {
2251 return (*getODSOperands(0).begin());
2252 }
2253
2254 ValueT getRhs() {
2255 return (*getODSOperands(1).begin());
2256 }
2257
2258 RangeT getOperands() {
2259 return odsOperands;
2260 }
2261
2262private:
2263 RangeT odsOperands;
2264};
2265class PowFeltOpAdaptor : public PowFeltOpGenericAdaptor<::mlir::ValueRange> {
2266public:
2269
2270 ::llvm::LogicalResult verify(::mlir::Location loc);
2271};
2272class PowFeltOp : public ::mlir::Op<PowFeltOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::llzk::function::NotFieldNative, ::mlir::OpTrait::OpInvariants, ::llzk::felt::FeltBinaryOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait, ::mlir::OpTrait::InferTypeOpAdaptor, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> {
2273public:
2274 using Op::Op;
2275 using Op::print;
2277 template <typename RangeT>
2280 static constexpr int odsIndex_lhs = 0;
2281 static constexpr int odsIndex_rhs = 1;
2283 using ::mlir::InferTypeOpInterface::Trait<PowFeltOp>::refineReturnTypes;
2284 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
2285 return {};
2286 }
2287
2288 static constexpr ::llvm::StringLiteral getOperationName() {
2289 return ::llvm::StringLiteral("felt.pow");
2290 }
2291
2292 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
2293 return {index, 1};
2294 }
2295
2296 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
2297 auto valueRange = getODSOperandIndexAndLength(index);
2298 return {std::next(getOperation()->operand_begin(), valueRange.first),
2299 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
2300 }
2301
2302 ::mlir::TypedValue<::mlir::Type> getLhs() {
2303 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
2304 }
2305
2306 ::mlir::TypedValue<::mlir::Type> getRhs() {
2307 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
2308 }
2309
2310 ::mlir::OpOperand &getLhsMutable() {
2311 auto range = getODSOperandIndexAndLength(0);
2312 return getOperation()->getOpOperand(range.first);
2313 }
2314
2315 ::mlir::OpOperand &getRhsMutable() {
2316 auto range = getODSOperandIndexAndLength(1);
2317 return getOperation()->getOpOperand(range.first);
2318 }
2319
2320 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
2321 return {index, 1};
2322 }
2323
2324 ::mlir::Operation::result_range getODSResults(unsigned index) {
2325 auto valueRange = getODSResultIndexAndLength(index);
2326 return {std::next(getOperation()->result_begin(), valueRange.first),
2327 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
2328 }
2329
2330 ::mlir::TypedValue<::mlir::Type> getResult() {
2331 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
2332 }
2333
2334 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
2335 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
2336 static llvm::hash_code computePropertiesHash(const Properties &prop);
2337 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
2338 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
2339 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
2340 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
2341 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
2342 static PowFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
2343 static PowFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
2344 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs);
2345 static PowFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value lhs, ::mlir::Value rhs);
2346 static PowFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value lhs, ::mlir::Value rhs);
2347 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
2348 static PowFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
2349 static PowFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
2350 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2351 static PowFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2352 static PowFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2353 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2354 static PowFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2355 static PowFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2356 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2357 static PowFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2358 static PowFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2359 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2360 static PowFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2361 static PowFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2362 ::llvm::LogicalResult verifyInvariantsImpl();
2363 ::llvm::LogicalResult verifyInvariants();
2364 ::mlir::OpFoldResult fold(FoldAdaptor adaptor);
2365 static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
2366 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
2367 void print(::mlir::OpAsmPrinter &_odsPrinter);
2368 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
2369public:
2370 static ::llvm::LogicalResult
2371 inferReturnTypes(::mlir::MLIRContext *context,
2372 std::optional<::mlir::Location> location,
2373 Adaptor adaptor,
2374 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
2375
2376 static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r);
2377
2378
2379 private:
2380 static ::mlir::ParseResult parseInferredOrParsedType(
2381 ::mlir::OpAsmParser &parser, ::mlir::Type &opType, bool isFirst
2382 ) {
2383 if (mlir::succeeded(isFirst ? parser.parseOptionalColon() : parser.parseOptionalComma())) {
2384 // If there is a comma, parse the `opType`
2385 mlir::Type type;
2386 if (parser.parseCustomTypeWithFallback(type)) {
2387 return mlir::failure();
2388 }
2389 opType = type;
2390 } else {
2391 // Otherwise, build the default type
2392 opType =
2393 ::llzk::felt::FeltType::get(parser.getBuilder().getContext());
2394 }
2395 return mlir::success();
2396 }
2397
2398 static void printInferredOrParsedType(::mlir::OpAsmPrinter &printer,
2399 ::mlir::Operation *op, ::mlir::Type opType, bool isFirst
2400 ) {
2401 printer << (isFirst ? " : " : ", ");
2402 printer.printStrippedAttrOrType(opType);
2403 }
2404};
2405
2406} // namespace llzk::felt
2407MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::felt::PowFeltOp)
2408
2409namespace llzk::felt {
2410
2411
2412//===----------------------------------------------------------------------===//
2413// ::llzk::felt::ShlFeltOp declarations
2414//===----------------------------------------------------------------------===//
2415
2416namespace detail {
2417
2419public:
2420 using Properties = ::mlir::EmptyProperties;
2421protected:
2422 ::mlir::DictionaryAttr odsAttrs;
2423 ::std::optional<::mlir::OperationName> odsOpName;
2425 ::mlir::RegionRange odsRegions;
2426public:
2427 ShlFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
2428 odsOpName.emplace("felt.shl", odsAttrs.getContext());
2429 }
2430
2432
2433 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
2434 return {index, 1};
2435 }
2436
2438 return properties;
2439 }
2440
2441 ::mlir::DictionaryAttr getAttributes() {
2442 return odsAttrs;
2443 }
2444
2445};
2446
2447} // namespace detail
2448template <typename RangeT>
2450 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
2452 static constexpr int odsIndex_lhs = 0;
2453 static constexpr int odsIndex_rhs = 1;
2454public:
2455 ShlFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
2456
2457 ShlFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ShlFeltOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
2458
2459 ShlFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ShlFeltOpGenericAdaptor(values, attrs, Properties{}, {}) {}
2460
2461 ShlFeltOpGenericAdaptor(RangeT values, const ShlFeltOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
2462
2463 template <typename LateInst = ShlFeltOp, typename = std::enable_if_t<std::is_same_v<LateInst, ShlFeltOp>>>
2464 ShlFeltOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
2465
2466 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
2467 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
2468 }
2469
2470 RangeT getODSOperands(unsigned index) {
2471 auto valueRange = getODSOperandIndexAndLength(index);
2472 return {std::next(odsOperands.begin(), valueRange.first),
2473 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
2474 }
2475
2476 ValueT getLhs() {
2477 return (*getODSOperands(0).begin());
2478 }
2479
2480 ValueT getRhs() {
2481 return (*getODSOperands(1).begin());
2482 }
2483
2484 RangeT getOperands() {
2485 return odsOperands;
2486 }
2487
2488private:
2489 RangeT odsOperands;
2490};
2491class ShlFeltOpAdaptor : public ShlFeltOpGenericAdaptor<::mlir::ValueRange> {
2492public:
2495
2496 ::llvm::LogicalResult verify(::mlir::Location loc);
2497};
2498class ShlFeltOp : public ::mlir::Op<ShlFeltOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::llzk::function::NotFieldNative, ::mlir::OpTrait::OpInvariants, ::llzk::felt::FeltBinaryOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait, ::mlir::OpTrait::InferTypeOpAdaptor, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> {
2499public:
2500 using Op::Op;
2501 using Op::print;
2503 template <typename RangeT>
2506 static constexpr int odsIndex_lhs = 0;
2507 static constexpr int odsIndex_rhs = 1;
2509 using ::mlir::InferTypeOpInterface::Trait<ShlFeltOp>::refineReturnTypes;
2510 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
2511 return {};
2512 }
2513
2514 static constexpr ::llvm::StringLiteral getOperationName() {
2515 return ::llvm::StringLiteral("felt.shl");
2516 }
2517
2518 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
2519 return {index, 1};
2520 }
2521
2522 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
2523 auto valueRange = getODSOperandIndexAndLength(index);
2524 return {std::next(getOperation()->operand_begin(), valueRange.first),
2525 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
2526 }
2527
2528 ::mlir::TypedValue<::mlir::Type> getLhs() {
2529 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
2530 }
2531
2532 ::mlir::TypedValue<::mlir::Type> getRhs() {
2533 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
2534 }
2535
2536 ::mlir::OpOperand &getLhsMutable() {
2537 auto range = getODSOperandIndexAndLength(0);
2538 return getOperation()->getOpOperand(range.first);
2539 }
2540
2541 ::mlir::OpOperand &getRhsMutable() {
2542 auto range = getODSOperandIndexAndLength(1);
2543 return getOperation()->getOpOperand(range.first);
2544 }
2545
2546 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
2547 return {index, 1};
2548 }
2549
2550 ::mlir::Operation::result_range getODSResults(unsigned index) {
2551 auto valueRange = getODSResultIndexAndLength(index);
2552 return {std::next(getOperation()->result_begin(), valueRange.first),
2553 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
2554 }
2555
2556 ::mlir::TypedValue<::mlir::Type> getResult() {
2557 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
2558 }
2559
2560 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
2561 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
2562 static llvm::hash_code computePropertiesHash(const Properties &prop);
2563 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
2564 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
2565 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
2566 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
2567 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
2568 static ShlFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
2569 static ShlFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
2570 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs);
2571 static ShlFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value lhs, ::mlir::Value rhs);
2572 static ShlFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value lhs, ::mlir::Value rhs);
2573 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
2574 static ShlFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
2575 static ShlFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
2576 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2577 static ShlFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2578 static ShlFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2579 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2580 static ShlFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2581 static ShlFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2582 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2583 static ShlFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2584 static ShlFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2585 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2586 static ShlFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2587 static ShlFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2588 ::llvm::LogicalResult verifyInvariantsImpl();
2589 ::llvm::LogicalResult verifyInvariants();
2590 ::mlir::OpFoldResult fold(FoldAdaptor adaptor);
2591 static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
2592 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
2593 void print(::mlir::OpAsmPrinter &_odsPrinter);
2594 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
2595public:
2596 static ::llvm::LogicalResult
2597 inferReturnTypes(::mlir::MLIRContext *context,
2598 std::optional<::mlir::Location> location,
2599 Adaptor adaptor,
2600 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
2601
2602 static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r);
2603
2604
2605 private:
2606 static ::mlir::ParseResult parseInferredOrParsedType(
2607 ::mlir::OpAsmParser &parser, ::mlir::Type &opType, bool isFirst
2608 ) {
2609 if (mlir::succeeded(isFirst ? parser.parseOptionalColon() : parser.parseOptionalComma())) {
2610 // If there is a comma, parse the `opType`
2611 mlir::Type type;
2612 if (parser.parseCustomTypeWithFallback(type)) {
2613 return mlir::failure();
2614 }
2615 opType = type;
2616 } else {
2617 // Otherwise, build the default type
2618 opType =
2619 ::llzk::felt::FeltType::get(parser.getBuilder().getContext());
2620 }
2621 return mlir::success();
2622 }
2623
2624 static void printInferredOrParsedType(::mlir::OpAsmPrinter &printer,
2625 ::mlir::Operation *op, ::mlir::Type opType, bool isFirst
2626 ) {
2627 printer << (isFirst ? " : " : ", ");
2628 printer.printStrippedAttrOrType(opType);
2629 }
2630};
2631
2632} // namespace llzk::felt
2633MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::felt::ShlFeltOp)
2634
2635namespace llzk::felt {
2636
2637
2638//===----------------------------------------------------------------------===//
2639// ::llzk::felt::ShrFeltOp declarations
2640//===----------------------------------------------------------------------===//
2641
2642namespace detail {
2643
2645public:
2646 using Properties = ::mlir::EmptyProperties;
2647protected:
2648 ::mlir::DictionaryAttr odsAttrs;
2649 ::std::optional<::mlir::OperationName> odsOpName;
2651 ::mlir::RegionRange odsRegions;
2652public:
2653 ShrFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
2654 odsOpName.emplace("felt.shr", odsAttrs.getContext());
2655 }
2656
2658
2659 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
2660 return {index, 1};
2661 }
2662
2664 return properties;
2665 }
2666
2667 ::mlir::DictionaryAttr getAttributes() {
2668 return odsAttrs;
2669 }
2670
2671};
2672
2673} // namespace detail
2674template <typename RangeT>
2676 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
2678 static constexpr int odsIndex_lhs = 0;
2679 static constexpr int odsIndex_rhs = 1;
2680public:
2681 ShrFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
2682
2683 ShrFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ShrFeltOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
2684
2685 ShrFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ShrFeltOpGenericAdaptor(values, attrs, Properties{}, {}) {}
2686
2687 ShrFeltOpGenericAdaptor(RangeT values, const ShrFeltOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
2688
2689 template <typename LateInst = ShrFeltOp, typename = std::enable_if_t<std::is_same_v<LateInst, ShrFeltOp>>>
2690 ShrFeltOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
2691
2692 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
2693 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
2694 }
2695
2696 RangeT getODSOperands(unsigned index) {
2697 auto valueRange = getODSOperandIndexAndLength(index);
2698 return {std::next(odsOperands.begin(), valueRange.first),
2699 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
2700 }
2701
2702 ValueT getLhs() {
2703 return (*getODSOperands(0).begin());
2704 }
2705
2706 ValueT getRhs() {
2707 return (*getODSOperands(1).begin());
2708 }
2709
2710 RangeT getOperands() {
2711 return odsOperands;
2712 }
2713
2714private:
2715 RangeT odsOperands;
2716};
2717class ShrFeltOpAdaptor : public ShrFeltOpGenericAdaptor<::mlir::ValueRange> {
2718public:
2721
2722 ::llvm::LogicalResult verify(::mlir::Location loc);
2723};
2724class ShrFeltOp : public ::mlir::Op<ShrFeltOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::llzk::function::NotFieldNative, ::mlir::OpTrait::OpInvariants, ::llzk::felt::FeltBinaryOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait, ::mlir::OpTrait::InferTypeOpAdaptor, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> {
2725public:
2726 using Op::Op;
2727 using Op::print;
2729 template <typename RangeT>
2732 static constexpr int odsIndex_lhs = 0;
2733 static constexpr int odsIndex_rhs = 1;
2735 using ::mlir::InferTypeOpInterface::Trait<ShrFeltOp>::refineReturnTypes;
2736 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
2737 return {};
2738 }
2739
2740 static constexpr ::llvm::StringLiteral getOperationName() {
2741 return ::llvm::StringLiteral("felt.shr");
2742 }
2743
2744 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
2745 return {index, 1};
2746 }
2747
2748 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
2749 auto valueRange = getODSOperandIndexAndLength(index);
2750 return {std::next(getOperation()->operand_begin(), valueRange.first),
2751 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
2752 }
2753
2754 ::mlir::TypedValue<::mlir::Type> getLhs() {
2755 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
2756 }
2757
2758 ::mlir::TypedValue<::mlir::Type> getRhs() {
2759 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
2760 }
2761
2762 ::mlir::OpOperand &getLhsMutable() {
2763 auto range = getODSOperandIndexAndLength(0);
2764 return getOperation()->getOpOperand(range.first);
2765 }
2766
2767 ::mlir::OpOperand &getRhsMutable() {
2768 auto range = getODSOperandIndexAndLength(1);
2769 return getOperation()->getOpOperand(range.first);
2770 }
2771
2772 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
2773 return {index, 1};
2774 }
2775
2776 ::mlir::Operation::result_range getODSResults(unsigned index) {
2777 auto valueRange = getODSResultIndexAndLength(index);
2778 return {std::next(getOperation()->result_begin(), valueRange.first),
2779 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
2780 }
2781
2782 ::mlir::TypedValue<::mlir::Type> getResult() {
2783 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
2784 }
2785
2786 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
2787 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
2788 static llvm::hash_code computePropertiesHash(const Properties &prop);
2789 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
2790 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
2791 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
2792 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
2793 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
2794 static ShrFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
2795 static ShrFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
2796 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs);
2797 static ShrFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value lhs, ::mlir::Value rhs);
2798 static ShrFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value lhs, ::mlir::Value rhs);
2799 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
2800 static ShrFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
2801 static ShrFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
2802 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2803 static ShrFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2804 static ShrFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2805 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2806 static ShrFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2807 static ShrFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2808 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2809 static ShrFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2810 static ShrFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2811 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2812 static ShrFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2813 static ShrFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2814 ::llvm::LogicalResult verifyInvariantsImpl();
2815 ::llvm::LogicalResult verifyInvariants();
2816 ::mlir::OpFoldResult fold(FoldAdaptor adaptor);
2817 static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
2818 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
2819 void print(::mlir::OpAsmPrinter &_odsPrinter);
2820 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
2821public:
2822 static ::llvm::LogicalResult
2823 inferReturnTypes(::mlir::MLIRContext *context,
2824 std::optional<::mlir::Location> location,
2825 Adaptor adaptor,
2826 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
2827
2828 static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r);
2829
2830
2831 private:
2832 static ::mlir::ParseResult parseInferredOrParsedType(
2833 ::mlir::OpAsmParser &parser, ::mlir::Type &opType, bool isFirst
2834 ) {
2835 if (mlir::succeeded(isFirst ? parser.parseOptionalColon() : parser.parseOptionalComma())) {
2836 // If there is a comma, parse the `opType`
2837 mlir::Type type;
2838 if (parser.parseCustomTypeWithFallback(type)) {
2839 return mlir::failure();
2840 }
2841 opType = type;
2842 } else {
2843 // Otherwise, build the default type
2844 opType =
2845 ::llzk::felt::FeltType::get(parser.getBuilder().getContext());
2846 }
2847 return mlir::success();
2848 }
2849
2850 static void printInferredOrParsedType(::mlir::OpAsmPrinter &printer,
2851 ::mlir::Operation *op, ::mlir::Type opType, bool isFirst
2852 ) {
2853 printer << (isFirst ? " : " : ", ");
2854 printer.printStrippedAttrOrType(opType);
2855 }
2856};
2857
2858} // namespace llzk::felt
2859MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::felt::ShrFeltOp)
2860
2861namespace llzk::felt {
2862
2863
2864//===----------------------------------------------------------------------===//
2865// ::llzk::felt::SignedIntDivFeltOp declarations
2866//===----------------------------------------------------------------------===//
2867
2868namespace detail {
2869
2871public:
2872 using Properties = ::mlir::EmptyProperties;
2873protected:
2874 ::mlir::DictionaryAttr odsAttrs;
2875 ::std::optional<::mlir::OperationName> odsOpName;
2877 ::mlir::RegionRange odsRegions;
2878public:
2879 SignedIntDivFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
2880 odsOpName.emplace("felt.sintdiv", odsAttrs.getContext());
2881 }
2882
2884
2885 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
2886 return {index, 1};
2887 }
2888
2890 return properties;
2891 }
2892
2893 ::mlir::DictionaryAttr getAttributes() {
2894 return odsAttrs;
2895 }
2896
2897};
2898
2899} // namespace detail
2900template <typename RangeT>
2902 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
2904 static constexpr int odsIndex_lhs = 0;
2905 static constexpr int odsIndex_rhs = 1;
2906public:
2907 SignedIntDivFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
2908
2909 SignedIntDivFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : SignedIntDivFeltOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
2910
2911 SignedIntDivFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : SignedIntDivFeltOpGenericAdaptor(values, attrs, Properties{}, {}) {}
2912
2913 SignedIntDivFeltOpGenericAdaptor(RangeT values, const SignedIntDivFeltOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
2914
2915 template <typename LateInst = SignedIntDivFeltOp, typename = std::enable_if_t<std::is_same_v<LateInst, SignedIntDivFeltOp>>>
2916 SignedIntDivFeltOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
2917
2918 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
2919 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
2920 }
2921
2922 RangeT getODSOperands(unsigned index) {
2923 auto valueRange = getODSOperandIndexAndLength(index);
2924 return {std::next(odsOperands.begin(), valueRange.first),
2925 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
2926 }
2927
2928 ValueT getLhs() {
2929 return (*getODSOperands(0).begin());
2930 }
2931
2932 ValueT getRhs() {
2933 return (*getODSOperands(1).begin());
2934 }
2935
2936 RangeT getOperands() {
2937 return odsOperands;
2938 }
2939
2940private:
2941 RangeT odsOperands;
2942};
2944public:
2947
2948 ::llvm::LogicalResult verify(::mlir::Location loc);
2949};
2950class SignedIntDivFeltOp : public ::mlir::Op<SignedIntDivFeltOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::llzk::function::NotFieldNative, ::mlir::OpTrait::OpInvariants, ::llzk::felt::FeltBinaryOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait, ::mlir::OpTrait::InferTypeOpAdaptor, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> {
2951public:
2952 using Op::Op;
2953 using Op::print;
2955 template <typename RangeT>
2958 static constexpr int odsIndex_lhs = 0;
2959 static constexpr int odsIndex_rhs = 1;
2961 using ::mlir::InferTypeOpInterface::Trait<SignedIntDivFeltOp>::refineReturnTypes;
2962 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
2963 return {};
2964 }
2965
2966 static constexpr ::llvm::StringLiteral getOperationName() {
2967 return ::llvm::StringLiteral("felt.sintdiv");
2968 }
2969
2970 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
2971 return {index, 1};
2972 }
2973
2974 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
2975 auto valueRange = getODSOperandIndexAndLength(index);
2976 return {std::next(getOperation()->operand_begin(), valueRange.first),
2977 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
2978 }
2979
2980 ::mlir::TypedValue<::mlir::Type> getLhs() {
2981 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
2982 }
2983
2984 ::mlir::TypedValue<::mlir::Type> getRhs() {
2985 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
2986 }
2987
2988 ::mlir::OpOperand &getLhsMutable() {
2989 auto range = getODSOperandIndexAndLength(0);
2990 return getOperation()->getOpOperand(range.first);
2991 }
2992
2993 ::mlir::OpOperand &getRhsMutable() {
2994 auto range = getODSOperandIndexAndLength(1);
2995 return getOperation()->getOpOperand(range.first);
2996 }
2997
2998 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
2999 return {index, 1};
3000 }
3001
3002 ::mlir::Operation::result_range getODSResults(unsigned index) {
3003 auto valueRange = getODSResultIndexAndLength(index);
3004 return {std::next(getOperation()->result_begin(), valueRange.first),
3005 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
3006 }
3007
3008 ::mlir::TypedValue<::mlir::Type> getResult() {
3009 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
3010 }
3011
3012 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
3013 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
3014 static llvm::hash_code computePropertiesHash(const Properties &prop);
3015 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
3016 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
3017 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
3018 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
3019 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
3020 static SignedIntDivFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
3021 static SignedIntDivFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
3022 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs);
3023 static SignedIntDivFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value lhs, ::mlir::Value rhs);
3024 static SignedIntDivFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value lhs, ::mlir::Value rhs);
3025 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
3026 static SignedIntDivFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
3027 static SignedIntDivFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
3028 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3029 static SignedIntDivFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3030 static SignedIntDivFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3031 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3032 static SignedIntDivFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3033 static SignedIntDivFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3034 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3035 static SignedIntDivFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3036 static SignedIntDivFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3037 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3038 static SignedIntDivFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3039 static SignedIntDivFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3040 ::llvm::LogicalResult verifyInvariantsImpl();
3041 ::llvm::LogicalResult verifyInvariants();
3042 ::mlir::OpFoldResult fold(FoldAdaptor adaptor);
3043 static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
3044 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
3045 void print(::mlir::OpAsmPrinter &_odsPrinter);
3046 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
3047public:
3048 static ::llvm::LogicalResult
3049 inferReturnTypes(::mlir::MLIRContext *context,
3050 std::optional<::mlir::Location> location,
3051 Adaptor adaptor,
3052 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
3053
3054 static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r);
3055
3056
3057 private:
3058 static ::mlir::ParseResult parseInferredOrParsedType(
3059 ::mlir::OpAsmParser &parser, ::mlir::Type &opType, bool isFirst
3060 ) {
3061 if (mlir::succeeded(isFirst ? parser.parseOptionalColon() : parser.parseOptionalComma())) {
3062 // If there is a comma, parse the `opType`
3063 mlir::Type type;
3064 if (parser.parseCustomTypeWithFallback(type)) {
3065 return mlir::failure();
3066 }
3067 opType = type;
3068 } else {
3069 // Otherwise, build the default type
3070 opType =
3071 ::llzk::felt::FeltType::get(parser.getBuilder().getContext());
3072 }
3073 return mlir::success();
3074 }
3075
3076 static void printInferredOrParsedType(::mlir::OpAsmPrinter &printer,
3077 ::mlir::Operation *op, ::mlir::Type opType, bool isFirst
3078 ) {
3079 printer << (isFirst ? " : " : ", ");
3080 printer.printStrippedAttrOrType(opType);
3081 }
3082};
3083
3084} // namespace llzk::felt
3085MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::felt::SignedIntDivFeltOp)
3086
3087namespace llzk::felt {
3088
3089
3090//===----------------------------------------------------------------------===//
3091// ::llzk::felt::SignedModFeltOp declarations
3092//===----------------------------------------------------------------------===//
3093
3094namespace detail {
3095
3097public:
3098 using Properties = ::mlir::EmptyProperties;
3099protected:
3100 ::mlir::DictionaryAttr odsAttrs;
3101 ::std::optional<::mlir::OperationName> odsOpName;
3103 ::mlir::RegionRange odsRegions;
3104public:
3105 SignedModFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
3106 odsOpName.emplace("felt.smod", odsAttrs.getContext());
3107 }
3108
3110
3111 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
3112 return {index, 1};
3113 }
3114
3116 return properties;
3117 }
3118
3119 ::mlir::DictionaryAttr getAttributes() {
3120 return odsAttrs;
3121 }
3122
3123};
3124
3125} // namespace detail
3126template <typename RangeT>
3128 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
3130 static constexpr int odsIndex_lhs = 0;
3131 static constexpr int odsIndex_rhs = 1;
3132public:
3133 SignedModFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
3134
3135 SignedModFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : SignedModFeltOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
3136
3137 SignedModFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : SignedModFeltOpGenericAdaptor(values, attrs, Properties{}, {}) {}
3138
3139 SignedModFeltOpGenericAdaptor(RangeT values, const SignedModFeltOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
3140
3141 template <typename LateInst = SignedModFeltOp, typename = std::enable_if_t<std::is_same_v<LateInst, SignedModFeltOp>>>
3142 SignedModFeltOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
3143
3144 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
3145 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
3146 }
3147
3148 RangeT getODSOperands(unsigned index) {
3149 auto valueRange = getODSOperandIndexAndLength(index);
3150 return {std::next(odsOperands.begin(), valueRange.first),
3151 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
3152 }
3153
3154 ValueT getLhs() {
3155 return (*getODSOperands(0).begin());
3156 }
3157
3158 ValueT getRhs() {
3159 return (*getODSOperands(1).begin());
3160 }
3161
3162 RangeT getOperands() {
3163 return odsOperands;
3164 }
3165
3166private:
3167 RangeT odsOperands;
3168};
3169class SignedModFeltOpAdaptor : public SignedModFeltOpGenericAdaptor<::mlir::ValueRange> {
3170public:
3173
3174 ::llvm::LogicalResult verify(::mlir::Location loc);
3175};
3176class SignedModFeltOp : public ::mlir::Op<SignedModFeltOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::llzk::function::NotFieldNative, ::mlir::OpTrait::OpInvariants, ::llzk::felt::FeltBinaryOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait, ::mlir::OpTrait::InferTypeOpAdaptor, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> {
3177public:
3178 using Op::Op;
3179 using Op::print;
3181 template <typename RangeT>
3184 static constexpr int odsIndex_lhs = 0;
3185 static constexpr int odsIndex_rhs = 1;
3187 using ::mlir::InferTypeOpInterface::Trait<SignedModFeltOp>::refineReturnTypes;
3188 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
3189 return {};
3190 }
3191
3192 static constexpr ::llvm::StringLiteral getOperationName() {
3193 return ::llvm::StringLiteral("felt.smod");
3194 }
3195
3196 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
3197 return {index, 1};
3198 }
3199
3200 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
3201 auto valueRange = getODSOperandIndexAndLength(index);
3202 return {std::next(getOperation()->operand_begin(), valueRange.first),
3203 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
3204 }
3205
3206 ::mlir::TypedValue<::mlir::Type> getLhs() {
3207 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
3208 }
3209
3210 ::mlir::TypedValue<::mlir::Type> getRhs() {
3211 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
3212 }
3213
3214 ::mlir::OpOperand &getLhsMutable() {
3215 auto range = getODSOperandIndexAndLength(0);
3216 return getOperation()->getOpOperand(range.first);
3217 }
3218
3219 ::mlir::OpOperand &getRhsMutable() {
3220 auto range = getODSOperandIndexAndLength(1);
3221 return getOperation()->getOpOperand(range.first);
3222 }
3223
3224 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
3225 return {index, 1};
3226 }
3227
3228 ::mlir::Operation::result_range getODSResults(unsigned index) {
3229 auto valueRange = getODSResultIndexAndLength(index);
3230 return {std::next(getOperation()->result_begin(), valueRange.first),
3231 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
3232 }
3233
3234 ::mlir::TypedValue<::mlir::Type> getResult() {
3235 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
3236 }
3237
3238 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
3239 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
3240 static llvm::hash_code computePropertiesHash(const Properties &prop);
3241 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
3242 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
3243 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
3244 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
3245 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
3246 static SignedModFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
3247 static SignedModFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
3248 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs);
3249 static SignedModFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value lhs, ::mlir::Value rhs);
3250 static SignedModFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value lhs, ::mlir::Value rhs);
3251 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
3252 static SignedModFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
3253 static SignedModFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
3254 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3255 static SignedModFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3256 static SignedModFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3257 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3258 static SignedModFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3259 static SignedModFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3260 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3261 static SignedModFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3262 static SignedModFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3263 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3264 static SignedModFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3265 static SignedModFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3266 ::llvm::LogicalResult verifyInvariantsImpl();
3267 ::llvm::LogicalResult verifyInvariants();
3268 ::mlir::OpFoldResult fold(FoldAdaptor adaptor);
3269 static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
3270 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
3271 void print(::mlir::OpAsmPrinter &_odsPrinter);
3272 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
3273public:
3274 static ::llvm::LogicalResult
3275 inferReturnTypes(::mlir::MLIRContext *context,
3276 std::optional<::mlir::Location> location,
3277 Adaptor adaptor,
3278 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
3279
3280 static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r);
3281
3282
3283 private:
3284 static ::mlir::ParseResult parseInferredOrParsedType(
3285 ::mlir::OpAsmParser &parser, ::mlir::Type &opType, bool isFirst
3286 ) {
3287 if (mlir::succeeded(isFirst ? parser.parseOptionalColon() : parser.parseOptionalComma())) {
3288 // If there is a comma, parse the `opType`
3289 mlir::Type type;
3290 if (parser.parseCustomTypeWithFallback(type)) {
3291 return mlir::failure();
3292 }
3293 opType = type;
3294 } else {
3295 // Otherwise, build the default type
3296 opType =
3297 ::llzk::felt::FeltType::get(parser.getBuilder().getContext());
3298 }
3299 return mlir::success();
3300 }
3301
3302 static void printInferredOrParsedType(::mlir::OpAsmPrinter &printer,
3303 ::mlir::Operation *op, ::mlir::Type opType, bool isFirst
3304 ) {
3305 printer << (isFirst ? " : " : ", ");
3306 printer.printStrippedAttrOrType(opType);
3307 }
3308};
3309
3310} // namespace llzk::felt
3311MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::felt::SignedModFeltOp)
3312
3313namespace llzk::felt {
3314
3315
3316//===----------------------------------------------------------------------===//
3317// ::llzk::felt::SubFeltOp declarations
3318//===----------------------------------------------------------------------===//
3319
3320namespace detail {
3321
3323public:
3324 using Properties = ::mlir::EmptyProperties;
3325protected:
3326 ::mlir::DictionaryAttr odsAttrs;
3327 ::std::optional<::mlir::OperationName> odsOpName;
3329 ::mlir::RegionRange odsRegions;
3330public:
3331 SubFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
3332 odsOpName.emplace("felt.sub", odsAttrs.getContext());
3333 }
3334
3336
3337 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
3338 return {index, 1};
3339 }
3340
3342 return properties;
3343 }
3344
3345 ::mlir::DictionaryAttr getAttributes() {
3346 return odsAttrs;
3347 }
3348
3349};
3350
3351} // namespace detail
3352template <typename RangeT>
3354 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
3356 static constexpr int odsIndex_lhs = 0;
3357 static constexpr int odsIndex_rhs = 1;
3358public:
3359 SubFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
3360
3361 SubFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : SubFeltOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
3362
3363 SubFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : SubFeltOpGenericAdaptor(values, attrs, Properties{}, {}) {}
3364
3365 SubFeltOpGenericAdaptor(RangeT values, const SubFeltOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
3366
3367 template <typename LateInst = SubFeltOp, typename = std::enable_if_t<std::is_same_v<LateInst, SubFeltOp>>>
3368 SubFeltOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
3369
3370 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
3371 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
3372 }
3373
3374 RangeT getODSOperands(unsigned index) {
3375 auto valueRange = getODSOperandIndexAndLength(index);
3376 return {std::next(odsOperands.begin(), valueRange.first),
3377 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
3378 }
3379
3380 ValueT getLhs() {
3381 return (*getODSOperands(0).begin());
3382 }
3383
3384 ValueT getRhs() {
3385 return (*getODSOperands(1).begin());
3386 }
3387
3388 RangeT getOperands() {
3389 return odsOperands;
3390 }
3391
3392private:
3393 RangeT odsOperands;
3394};
3395class SubFeltOpAdaptor : public SubFeltOpGenericAdaptor<::mlir::ValueRange> {
3396public:
3399
3400 ::llvm::LogicalResult verify(::mlir::Location loc);
3401};
3402class SubFeltOp : public ::mlir::Op<SubFeltOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::llzk::felt::FeltBinaryOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait, ::mlir::OpTrait::InferTypeOpAdaptor, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> {
3403public:
3404 using Op::Op;
3405 using Op::print;
3407 template <typename RangeT>
3410 static constexpr int odsIndex_lhs = 0;
3411 static constexpr int odsIndex_rhs = 1;
3413 using ::mlir::InferTypeOpInterface::Trait<SubFeltOp>::refineReturnTypes;
3414 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
3415 return {};
3416 }
3417
3418 static constexpr ::llvm::StringLiteral getOperationName() {
3419 return ::llvm::StringLiteral("felt.sub");
3420 }
3421
3422 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
3423 return {index, 1};
3424 }
3425
3426 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
3427 auto valueRange = getODSOperandIndexAndLength(index);
3428 return {std::next(getOperation()->operand_begin(), valueRange.first),
3429 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
3430 }
3431
3432 ::mlir::TypedValue<::mlir::Type> getLhs() {
3433 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
3434 }
3435
3436 ::mlir::TypedValue<::mlir::Type> getRhs() {
3437 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
3438 }
3439
3440 ::mlir::OpOperand &getLhsMutable() {
3441 auto range = getODSOperandIndexAndLength(0);
3442 return getOperation()->getOpOperand(range.first);
3443 }
3444
3445 ::mlir::OpOperand &getRhsMutable() {
3446 auto range = getODSOperandIndexAndLength(1);
3447 return getOperation()->getOpOperand(range.first);
3448 }
3449
3450 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
3451 return {index, 1};
3452 }
3453
3454 ::mlir::Operation::result_range getODSResults(unsigned index) {
3455 auto valueRange = getODSResultIndexAndLength(index);
3456 return {std::next(getOperation()->result_begin(), valueRange.first),
3457 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
3458 }
3459
3460 ::mlir::TypedValue<::mlir::Type> getResult() {
3461 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
3462 }
3463
3464 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
3465 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
3466 static llvm::hash_code computePropertiesHash(const Properties &prop);
3467 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
3468 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
3469 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
3470 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
3471 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
3472 static SubFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
3473 static SubFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
3474 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs);
3475 static SubFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value lhs, ::mlir::Value rhs);
3476 static SubFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value lhs, ::mlir::Value rhs);
3477 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
3478 static SubFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
3479 static SubFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
3480 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3481 static SubFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3482 static SubFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3483 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3484 static SubFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3485 static SubFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3486 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3487 static SubFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3488 static SubFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3489 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3490 static SubFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3491 static SubFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3492 ::llvm::LogicalResult verifyInvariantsImpl();
3493 ::llvm::LogicalResult verifyInvariants();
3494 ::mlir::OpFoldResult fold(FoldAdaptor adaptor);
3495 static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
3496 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
3497 void print(::mlir::OpAsmPrinter &_odsPrinter);
3498 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
3499public:
3500 static ::llvm::LogicalResult
3501 inferReturnTypes(::mlir::MLIRContext *context,
3502 std::optional<::mlir::Location> location,
3503 Adaptor adaptor,
3504 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
3505
3506 static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r);
3507
3508
3509 private:
3510 static ::mlir::ParseResult parseInferredOrParsedType(
3511 ::mlir::OpAsmParser &parser, ::mlir::Type &opType, bool isFirst
3512 ) {
3513 if (mlir::succeeded(isFirst ? parser.parseOptionalColon() : parser.parseOptionalComma())) {
3514 // If there is a comma, parse the `opType`
3515 mlir::Type type;
3516 if (parser.parseCustomTypeWithFallback(type)) {
3517 return mlir::failure();
3518 }
3519 opType = type;
3520 } else {
3521 // Otherwise, build the default type
3522 opType =
3523 ::llzk::felt::FeltType::get(parser.getBuilder().getContext());
3524 }
3525 return mlir::success();
3526 }
3527
3528 static void printInferredOrParsedType(::mlir::OpAsmPrinter &printer,
3529 ::mlir::Operation *op, ::mlir::Type opType, bool isFirst
3530 ) {
3531 printer << (isFirst ? " : " : ", ");
3532 printer.printStrippedAttrOrType(opType);
3533 }
3534};
3535
3536} // namespace llzk::felt
3537MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::felt::SubFeltOp)
3538
3539namespace llzk::felt {
3540
3541
3542//===----------------------------------------------------------------------===//
3543// ::llzk::felt::UnsignedIntDivFeltOp declarations
3544//===----------------------------------------------------------------------===//
3545
3546namespace detail {
3547
3549public:
3550 using Properties = ::mlir::EmptyProperties;
3551protected:
3552 ::mlir::DictionaryAttr odsAttrs;
3553 ::std::optional<::mlir::OperationName> odsOpName;
3555 ::mlir::RegionRange odsRegions;
3556public:
3557 UnsignedIntDivFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
3558 odsOpName.emplace("felt.uintdiv", odsAttrs.getContext());
3559 }
3560
3562
3563 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
3564 return {index, 1};
3565 }
3566
3568 return properties;
3569 }
3570
3571 ::mlir::DictionaryAttr getAttributes() {
3572 return odsAttrs;
3573 }
3574
3575};
3576
3577} // namespace detail
3578template <typename RangeT>
3580 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
3582 static constexpr int odsIndex_lhs = 0;
3583 static constexpr int odsIndex_rhs = 1;
3584public:
3585 UnsignedIntDivFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
3586
3587 UnsignedIntDivFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : UnsignedIntDivFeltOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
3588
3589 UnsignedIntDivFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : UnsignedIntDivFeltOpGenericAdaptor(values, attrs, Properties{}, {}) {}
3590
3591 UnsignedIntDivFeltOpGenericAdaptor(RangeT values, const UnsignedIntDivFeltOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
3592
3593 template <typename LateInst = UnsignedIntDivFeltOp, typename = std::enable_if_t<std::is_same_v<LateInst, UnsignedIntDivFeltOp>>>
3594 UnsignedIntDivFeltOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
3595
3596 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
3597 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
3598 }
3599
3600 RangeT getODSOperands(unsigned index) {
3601 auto valueRange = getODSOperandIndexAndLength(index);
3602 return {std::next(odsOperands.begin(), valueRange.first),
3603 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
3604 }
3605
3606 ValueT getLhs() {
3607 return (*getODSOperands(0).begin());
3608 }
3609
3610 ValueT getRhs() {
3611 return (*getODSOperands(1).begin());
3612 }
3613
3614 RangeT getOperands() {
3615 return odsOperands;
3616 }
3617
3618private:
3619 RangeT odsOperands;
3620};
3622public:
3625
3626 ::llvm::LogicalResult verify(::mlir::Location loc);
3627};
3628class UnsignedIntDivFeltOp : public ::mlir::Op<UnsignedIntDivFeltOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::llzk::function::NotFieldNative, ::mlir::OpTrait::OpInvariants, ::llzk::felt::FeltBinaryOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait, ::mlir::OpTrait::InferTypeOpAdaptor, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> {
3629public:
3630 using Op::Op;
3631 using Op::print;
3633 template <typename RangeT>
3636 static constexpr int odsIndex_lhs = 0;
3637 static constexpr int odsIndex_rhs = 1;
3639 using ::mlir::InferTypeOpInterface::Trait<UnsignedIntDivFeltOp>::refineReturnTypes;
3640 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
3641 return {};
3642 }
3643
3644 static constexpr ::llvm::StringLiteral getOperationName() {
3645 return ::llvm::StringLiteral("felt.uintdiv");
3646 }
3647
3648 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
3649 return {index, 1};
3650 }
3651
3652 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
3653 auto valueRange = getODSOperandIndexAndLength(index);
3654 return {std::next(getOperation()->operand_begin(), valueRange.first),
3655 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
3656 }
3657
3658 ::mlir::TypedValue<::mlir::Type> getLhs() {
3659 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
3660 }
3661
3662 ::mlir::TypedValue<::mlir::Type> getRhs() {
3663 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
3664 }
3665
3666 ::mlir::OpOperand &getLhsMutable() {
3667 auto range = getODSOperandIndexAndLength(0);
3668 return getOperation()->getOpOperand(range.first);
3669 }
3670
3671 ::mlir::OpOperand &getRhsMutable() {
3672 auto range = getODSOperandIndexAndLength(1);
3673 return getOperation()->getOpOperand(range.first);
3674 }
3675
3676 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
3677 return {index, 1};
3678 }
3679
3680 ::mlir::Operation::result_range getODSResults(unsigned index) {
3681 auto valueRange = getODSResultIndexAndLength(index);
3682 return {std::next(getOperation()->result_begin(), valueRange.first),
3683 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
3684 }
3685
3686 ::mlir::TypedValue<::mlir::Type> getResult() {
3687 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
3688 }
3689
3690 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
3691 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
3692 static llvm::hash_code computePropertiesHash(const Properties &prop);
3693 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
3694 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
3695 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
3696 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
3697 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
3698 static UnsignedIntDivFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
3699 static UnsignedIntDivFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
3700 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs);
3701 static UnsignedIntDivFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value lhs, ::mlir::Value rhs);
3702 static UnsignedIntDivFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value lhs, ::mlir::Value rhs);
3703 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
3704 static UnsignedIntDivFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
3705 static UnsignedIntDivFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
3706 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3707 static UnsignedIntDivFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3708 static UnsignedIntDivFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3709 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3710 static UnsignedIntDivFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3711 static UnsignedIntDivFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3712 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3713 static UnsignedIntDivFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3714 static UnsignedIntDivFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3715 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3716 static UnsignedIntDivFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3717 static UnsignedIntDivFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3718 ::llvm::LogicalResult verifyInvariantsImpl();
3719 ::llvm::LogicalResult verifyInvariants();
3720 ::mlir::OpFoldResult fold(FoldAdaptor adaptor);
3721 static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
3722 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
3723 void print(::mlir::OpAsmPrinter &_odsPrinter);
3724 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
3725public:
3726 static ::llvm::LogicalResult
3727 inferReturnTypes(::mlir::MLIRContext *context,
3728 std::optional<::mlir::Location> location,
3729 Adaptor adaptor,
3730 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
3731
3732 static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r);
3733
3734
3735 private:
3736 static ::mlir::ParseResult parseInferredOrParsedType(
3737 ::mlir::OpAsmParser &parser, ::mlir::Type &opType, bool isFirst
3738 ) {
3739 if (mlir::succeeded(isFirst ? parser.parseOptionalColon() : parser.parseOptionalComma())) {
3740 // If there is a comma, parse the `opType`
3741 mlir::Type type;
3742 if (parser.parseCustomTypeWithFallback(type)) {
3743 return mlir::failure();
3744 }
3745 opType = type;
3746 } else {
3747 // Otherwise, build the default type
3748 opType =
3749 ::llzk::felt::FeltType::get(parser.getBuilder().getContext());
3750 }
3751 return mlir::success();
3752 }
3753
3754 static void printInferredOrParsedType(::mlir::OpAsmPrinter &printer,
3755 ::mlir::Operation *op, ::mlir::Type opType, bool isFirst
3756 ) {
3757 printer << (isFirst ? " : " : ", ");
3758 printer.printStrippedAttrOrType(opType);
3759 }
3760};
3761
3762} // namespace llzk::felt
3763MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::felt::UnsignedIntDivFeltOp)
3764
3765namespace llzk::felt {
3766
3767
3768//===----------------------------------------------------------------------===//
3769// ::llzk::felt::UnsignedModFeltOp declarations
3770//===----------------------------------------------------------------------===//
3771
3772namespace detail {
3773
3775public:
3776 using Properties = ::mlir::EmptyProperties;
3777protected:
3778 ::mlir::DictionaryAttr odsAttrs;
3779 ::std::optional<::mlir::OperationName> odsOpName;
3781 ::mlir::RegionRange odsRegions;
3782public:
3783 UnsignedModFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
3784 odsOpName.emplace("felt.umod", odsAttrs.getContext());
3785 }
3786
3788
3789 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
3790 return {index, 1};
3791 }
3792
3794 return properties;
3795 }
3796
3797 ::mlir::DictionaryAttr getAttributes() {
3798 return odsAttrs;
3799 }
3800
3801};
3802
3803} // namespace detail
3804template <typename RangeT>
3806 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
3808 static constexpr int odsIndex_lhs = 0;
3809 static constexpr int odsIndex_rhs = 1;
3810public:
3811 UnsignedModFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
3812
3813 UnsignedModFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : UnsignedModFeltOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
3814
3815 UnsignedModFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : UnsignedModFeltOpGenericAdaptor(values, attrs, Properties{}, {}) {}
3816
3817 UnsignedModFeltOpGenericAdaptor(RangeT values, const UnsignedModFeltOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
3818
3819 template <typename LateInst = UnsignedModFeltOp, typename = std::enable_if_t<std::is_same_v<LateInst, UnsignedModFeltOp>>>
3820 UnsignedModFeltOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
3821
3822 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
3823 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
3824 }
3825
3826 RangeT getODSOperands(unsigned index) {
3827 auto valueRange = getODSOperandIndexAndLength(index);
3828 return {std::next(odsOperands.begin(), valueRange.first),
3829 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
3830 }
3831
3832 ValueT getLhs() {
3833 return (*getODSOperands(0).begin());
3834 }
3835
3836 ValueT getRhs() {
3837 return (*getODSOperands(1).begin());
3838 }
3839
3840 RangeT getOperands() {
3841 return odsOperands;
3842 }
3843
3844private:
3845 RangeT odsOperands;
3846};
3848public:
3851
3852 ::llvm::LogicalResult verify(::mlir::Location loc);
3853};
3854class UnsignedModFeltOp : public ::mlir::Op<UnsignedModFeltOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::llzk::function::NotFieldNative, ::mlir::OpTrait::OpInvariants, ::llzk::felt::FeltBinaryOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait, ::mlir::OpTrait::InferTypeOpAdaptor, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> {
3855public:
3856 using Op::Op;
3857 using Op::print;
3859 template <typename RangeT>
3862 static constexpr int odsIndex_lhs = 0;
3863 static constexpr int odsIndex_rhs = 1;
3865 using ::mlir::InferTypeOpInterface::Trait<UnsignedModFeltOp>::refineReturnTypes;
3866 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
3867 return {};
3868 }
3869
3870 static constexpr ::llvm::StringLiteral getOperationName() {
3871 return ::llvm::StringLiteral("felt.umod");
3872 }
3873
3874 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
3875 return {index, 1};
3876 }
3877
3878 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
3879 auto valueRange = getODSOperandIndexAndLength(index);
3880 return {std::next(getOperation()->operand_begin(), valueRange.first),
3881 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
3882 }
3883
3884 ::mlir::TypedValue<::mlir::Type> getLhs() {
3885 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
3886 }
3887
3888 ::mlir::TypedValue<::mlir::Type> getRhs() {
3889 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
3890 }
3891
3892 ::mlir::OpOperand &getLhsMutable() {
3893 auto range = getODSOperandIndexAndLength(0);
3894 return getOperation()->getOpOperand(range.first);
3895 }
3896
3897 ::mlir::OpOperand &getRhsMutable() {
3898 auto range = getODSOperandIndexAndLength(1);
3899 return getOperation()->getOpOperand(range.first);
3900 }
3901
3902 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
3903 return {index, 1};
3904 }
3905
3906 ::mlir::Operation::result_range getODSResults(unsigned index) {
3907 auto valueRange = getODSResultIndexAndLength(index);
3908 return {std::next(getOperation()->result_begin(), valueRange.first),
3909 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
3910 }
3911
3912 ::mlir::TypedValue<::mlir::Type> getResult() {
3913 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
3914 }
3915
3916 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
3917 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
3918 static llvm::hash_code computePropertiesHash(const Properties &prop);
3919 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
3920 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
3921 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
3922 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
3923 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
3924 static UnsignedModFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
3925 static UnsignedModFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
3926 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs);
3927 static UnsignedModFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value lhs, ::mlir::Value rhs);
3928 static UnsignedModFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value lhs, ::mlir::Value rhs);
3929 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
3930 static UnsignedModFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
3931 static UnsignedModFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
3932 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3933 static UnsignedModFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3934 static UnsignedModFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3935 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3936 static UnsignedModFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3937 static UnsignedModFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3938 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3939 static UnsignedModFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3940 static UnsignedModFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3941 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3942 static UnsignedModFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3943 static UnsignedModFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3944 ::llvm::LogicalResult verifyInvariantsImpl();
3945 ::llvm::LogicalResult verifyInvariants();
3946 ::mlir::OpFoldResult fold(FoldAdaptor adaptor);
3947 static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
3948 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
3949 void print(::mlir::OpAsmPrinter &_odsPrinter);
3950 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
3951public:
3952 static ::llvm::LogicalResult
3953 inferReturnTypes(::mlir::MLIRContext *context,
3954 std::optional<::mlir::Location> location,
3955 Adaptor adaptor,
3956 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
3957
3958 static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r);
3959
3960
3961 private:
3962 static ::mlir::ParseResult parseInferredOrParsedType(
3963 ::mlir::OpAsmParser &parser, ::mlir::Type &opType, bool isFirst
3964 ) {
3965 if (mlir::succeeded(isFirst ? parser.parseOptionalColon() : parser.parseOptionalComma())) {
3966 // If there is a comma, parse the `opType`
3967 mlir::Type type;
3968 if (parser.parseCustomTypeWithFallback(type)) {
3969 return mlir::failure();
3970 }
3971 opType = type;
3972 } else {
3973 // Otherwise, build the default type
3974 opType =
3975 ::llzk::felt::FeltType::get(parser.getBuilder().getContext());
3976 }
3977 return mlir::success();
3978 }
3979
3980 static void printInferredOrParsedType(::mlir::OpAsmPrinter &printer,
3981 ::mlir::Operation *op, ::mlir::Type opType, bool isFirst
3982 ) {
3983 printer << (isFirst ? " : " : ", ");
3984 printer.printStrippedAttrOrType(opType);
3985 }
3986};
3987
3988} // namespace llzk::felt
3989MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::felt::UnsignedModFeltOp)
3990
3991namespace llzk::felt {
3992
3993
3994//===----------------------------------------------------------------------===//
3995// ::llzk::felt::XorFeltOp declarations
3996//===----------------------------------------------------------------------===//
3997
3998namespace detail {
3999
4001public:
4002 using Properties = ::mlir::EmptyProperties;
4003protected:
4004 ::mlir::DictionaryAttr odsAttrs;
4005 ::std::optional<::mlir::OperationName> odsOpName;
4007 ::mlir::RegionRange odsRegions;
4008public:
4009 XorFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
4010 odsOpName.emplace("felt.bit_xor", odsAttrs.getContext());
4011 }
4012
4014
4015 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
4016 return {index, 1};
4017 }
4018
4020 return properties;
4021 }
4022
4023 ::mlir::DictionaryAttr getAttributes() {
4024 return odsAttrs;
4025 }
4026
4027};
4028
4029} // namespace detail
4030template <typename RangeT>
4032 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
4034 static constexpr int odsIndex_lhs = 0;
4035 static constexpr int odsIndex_rhs = 1;
4036public:
4037 XorFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
4038
4039 XorFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : XorFeltOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
4040
4041 XorFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : XorFeltOpGenericAdaptor(values, attrs, Properties{}, {}) {}
4042
4043 XorFeltOpGenericAdaptor(RangeT values, const XorFeltOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
4044
4045 template <typename LateInst = XorFeltOp, typename = std::enable_if_t<std::is_same_v<LateInst, XorFeltOp>>>
4046 XorFeltOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
4047
4048 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
4049 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
4050 }
4051
4052 RangeT getODSOperands(unsigned index) {
4053 auto valueRange = getODSOperandIndexAndLength(index);
4054 return {std::next(odsOperands.begin(), valueRange.first),
4055 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
4056 }
4057
4058 ValueT getLhs() {
4059 return (*getODSOperands(0).begin());
4060 }
4061
4062 ValueT getRhs() {
4063 return (*getODSOperands(1).begin());
4064 }
4065
4066 RangeT getOperands() {
4067 return odsOperands;
4068 }
4069
4070private:
4071 RangeT odsOperands;
4072};
4073class XorFeltOpAdaptor : public XorFeltOpGenericAdaptor<::mlir::ValueRange> {
4074public:
4077
4078 ::llvm::LogicalResult verify(::mlir::Location loc);
4079};
4080class XorFeltOp : public ::mlir::Op<XorFeltOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::llzk::function::NotFieldNative, ::mlir::OpTrait::OpInvariants, ::mlir::OpTrait::IsCommutative, ::llzk::felt::FeltBinaryOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait, ::mlir::OpTrait::InferTypeOpAdaptor, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> {
4081public:
4082 using Op::Op;
4083 using Op::print;
4085 template <typename RangeT>
4088 static constexpr int odsIndex_lhs = 0;
4089 static constexpr int odsIndex_rhs = 1;
4091 using ::mlir::InferTypeOpInterface::Trait<XorFeltOp>::refineReturnTypes;
4092 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
4093 return {};
4094 }
4095
4096 static constexpr ::llvm::StringLiteral getOperationName() {
4097 return ::llvm::StringLiteral("felt.bit_xor");
4098 }
4099
4100 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
4101 return {index, 1};
4102 }
4103
4104 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
4105 auto valueRange = getODSOperandIndexAndLength(index);
4106 return {std::next(getOperation()->operand_begin(), valueRange.first),
4107 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
4108 }
4109
4110 ::mlir::TypedValue<::mlir::Type> getLhs() {
4111 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
4112 }
4113
4114 ::mlir::TypedValue<::mlir::Type> getRhs() {
4115 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
4116 }
4117
4118 ::mlir::OpOperand &getLhsMutable() {
4119 auto range = getODSOperandIndexAndLength(0);
4120 return getOperation()->getOpOperand(range.first);
4121 }
4122
4123 ::mlir::OpOperand &getRhsMutable() {
4124 auto range = getODSOperandIndexAndLength(1);
4125 return getOperation()->getOpOperand(range.first);
4126 }
4127
4128 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
4129 return {index, 1};
4130 }
4131
4132 ::mlir::Operation::result_range getODSResults(unsigned index) {
4133 auto valueRange = getODSResultIndexAndLength(index);
4134 return {std::next(getOperation()->result_begin(), valueRange.first),
4135 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
4136 }
4137
4138 ::mlir::TypedValue<::mlir::Type> getResult() {
4139 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
4140 }
4141
4142 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
4143 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
4144 static llvm::hash_code computePropertiesHash(const Properties &prop);
4145 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
4146 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
4147 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
4148 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
4149 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
4150 static XorFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
4151 static XorFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
4152 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs);
4153 static XorFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value lhs, ::mlir::Value rhs);
4154 static XorFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value lhs, ::mlir::Value rhs);
4155 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
4156 static XorFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
4157 static XorFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
4158 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
4159 static XorFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
4160 static XorFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
4161 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
4162 static XorFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
4163 static XorFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
4164 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
4165 static XorFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
4166 static XorFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
4167 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
4168 static XorFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
4169 static XorFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
4170 ::llvm::LogicalResult verifyInvariantsImpl();
4171 ::llvm::LogicalResult verifyInvariants();
4172 ::mlir::OpFoldResult fold(FoldAdaptor adaptor);
4173 static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
4174 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
4175 void print(::mlir::OpAsmPrinter &_odsPrinter);
4176 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
4177public:
4178 static ::llvm::LogicalResult
4179 inferReturnTypes(::mlir::MLIRContext *context,
4180 std::optional<::mlir::Location> location,
4181 Adaptor adaptor,
4182 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
4183
4184 static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r);
4185
4186
4187 private:
4188 static ::mlir::ParseResult parseInferredOrParsedType(
4189 ::mlir::OpAsmParser &parser, ::mlir::Type &opType, bool isFirst
4190 ) {
4191 if (mlir::succeeded(isFirst ? parser.parseOptionalColon() : parser.parseOptionalComma())) {
4192 // If there is a comma, parse the `opType`
4193 mlir::Type type;
4194 if (parser.parseCustomTypeWithFallback(type)) {
4195 return mlir::failure();
4196 }
4197 opType = type;
4198 } else {
4199 // Otherwise, build the default type
4200 opType =
4201 ::llzk::felt::FeltType::get(parser.getBuilder().getContext());
4202 }
4203 return mlir::success();
4204 }
4205
4206 static void printInferredOrParsedType(::mlir::OpAsmPrinter &printer,
4207 ::mlir::Operation *op, ::mlir::Type opType, bool isFirst
4208 ) {
4209 printer << (isFirst ? " : " : ", ");
4210 printer.printStrippedAttrOrType(opType);
4211 }
4212};
4213
4214} // namespace llzk::felt
4215MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::felt::XorFeltOp)
4216
4217
4218#endif // GET_OP_CLASSES
4219
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:90
AddFeltOpAdaptor(AddFeltOp op)
Definition Ops.cpp.inc:88
AddFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:231
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:242
AddFeltOpGenericAdaptor(RangeT values, const AddFeltOpGenericAdaptorBase &base)
Definition Ops.h.inc:237
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:246
AddFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:235
AddFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:233
AddFeltOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:240
AddFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:231
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:124
::mlir::OpFoldResult fold(FoldAdaptor adaptor)
Definition Ops.cpp:153
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:332
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:127
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:304
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
Definition Ops.cpp.inc:427
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:406
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:281
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:290
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:121
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:298
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:286
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, std::optional<::mlir::Location > location, Adaptor adaptor, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
::mlir::TypedValue<::mlir::Type > getResult()
Definition Ops.h.inc:332
::mlir::OpOperand & getLhsMutable()
Definition Ops.h.inc:312
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:336
static constexpr int odsIndex_lhs
Definition Ops.h.inc:282
::mlir::OpOperand & getRhsMutable()
Definition Ops.h.inc:317
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:322
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:390
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:103
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:326
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:294
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:112
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:117
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:308
FoldAdaptor::Properties Properties
Definition Ops.h.inc:284
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:402
AddFeltOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:280
static constexpr int odsIndex_rhs
Definition Ops.h.inc:283
AddFeltOpAdaptor Adaptor
Definition Ops.h.inc:278
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:94
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:298
static AddFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:137
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:131
AndFeltOpAdaptor(AndFeltOp op)
Definition Ops.cpp.inc:447
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:449
AndFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:457
AndFeltOpGenericAdaptor(RangeT values, const AndFeltOpGenericAdaptorBase &base)
Definition Ops.h.inc:463
AndFeltOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:466
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:468
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:472
AndFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:459
AndFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:461
AndFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:457
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:516
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:483
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:471
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:657
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:765
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:520
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:749
::mlir::OpOperand & getLhsMutable()
Definition Ops.h.inc:538
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:490
::mlir::OpOperand & getRhsMutable()
Definition Ops.h.inc:543
::mlir::OpFoldResult fold(FoldAdaptor adaptor)
Definition Ops.cpp:255
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:691
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:453
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, std::optional<::mlir::Location > location, Adaptor adaptor, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:534
AndFeltOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:506
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:486
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:695
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:524
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:507
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:512
::mlir::TypedValue<::mlir::Type > getResult()
Definition Ops.h.inc:558
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:480
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:530
static AndFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:496
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:476
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
Definition Ops.cpp.inc:786
AndFeltOpAdaptor Adaptor
Definition Ops.h.inc:504
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:548
static constexpr int odsIndex_rhs
Definition Ops.h.inc:509
static constexpr int odsIndex_lhs
Definition Ops.h.inc:508
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:552
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:761
FoldAdaptor::Properties Properties
Definition Ops.h.inc:510
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:462
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:808
DivFeltOpAdaptor(DivFeltOp op)
Definition Ops.cpp.inc:806
DivFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:683
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:698
DivFeltOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:692
DivFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:687
DivFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:683
DivFeltOpGenericAdaptor(RangeT values, const DivFeltOpGenericAdaptorBase &base)
Definition Ops.h.inc:689
DivFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:685
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:694
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:778
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:742
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1016
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:845
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1108
::mlir::OpFoldResult fold(FoldAdaptor adaptor)
Definition Ops.cpp:194
::mlir::TypedValue<::mlir::Type > getResult()
Definition Ops.h.inc:784
DivFeltOpAdaptor Adaptor
Definition Ops.h.inc:730
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:830
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:760
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
Definition Ops.cpp.inc:1145
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:756
static DivFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:855
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:774
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:821
FoldAdaptor::Properties Properties
Definition Ops.h.inc:736
static constexpr int odsIndex_lhs
Definition Ops.h.inc:734
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:1124
static constexpr int odsIndex_rhs
Definition Ops.h.inc:735
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1054
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:746
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:1120
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1050
::mlir::OpOperand & getRhsMutable()
Definition Ops.h.inc:769
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:738
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, std::optional<::mlir::Location > location, Adaptor adaptor, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:750
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:849
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:842
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:839
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:733
DivFeltOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:732
::mlir::OpOperand & getLhsMutable()
Definition Ops.h.inc:764
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:812
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:835
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1172
FeltConstantOpAdaptor(FeltConstantOp op)
Definition Ops.cpp.inc:1170
FeltConstantOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:932
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:947
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:943
FeltConstantOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:932
FeltConstantOpGenericAdaptor(RangeT values, const FeltConstantOpGenericAdaptorBase &base)
Definition Ops.h.inc:938
FeltConstantOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:936
FeltConstantOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:941
FeltConstantOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:934
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::felt::FeltConstAttr value)
Definition Ops.cpp.inc:1269
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:1259
FeltConstantOpAdaptor Adaptor
Definition Ops.h.inc:971
::llvm::LogicalResult canonicalize(FeltConstantOp op, ::mlir::PatternRewriter &rewriter)
Replaces a constant's raw value with its canonical field representative.
Definition Ops.cpp:125
FoldAdaptor::Properties Properties
Definition Ops.h.inc:975
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1508
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:993
static void getCanonicalizationPatterns(::mlir::RewritePatternSet &results, ::mlir::MLIRContext *context)
Definition Ops.cpp.inc:1476
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:1252
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:997
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:1226
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:974
FeltConstantOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:973
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:1239
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1181
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1452
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:1516
::llzk::felt::FeltConstAttr getValueAttr()
Definition Ops.h.inc:1030
::mlir::TypedValue<::mlir::Type > getResult()
Definition Ops.h.inc:1017
void setValueAttr(::llzk::felt::FeltConstAttr attr)
Definition Ops.h.inc:1035
void getAsmResultNames(::mlir::OpAsmSetValueNameFn setNameFn)
Definition Ops.cpp:116
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, std::optional<::mlir::Location > location, Adaptor adaptor, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
static FeltConstantOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::llzk::felt::FeltConstAttr value)
Definition Ops.cpp.inc:1274
::mlir::OpFoldResult fold(FoldAdaptor adaptor)
Definition Ops.cpp:122
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:1011
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:1232
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:1007
::mlir::StringAttr getValueAttrName()
Definition Ops.h.inc:985
::mlir::StringAttr getValueAttrName(::mlir::OperationName name)
Definition Ops.h.inc:989
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:1220
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1480
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:980
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1243
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:1204
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1472
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
Definition Ops.cpp:147
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:1520
::llzk::felt::FeltConstAttr getValue()
Definition Ops.cpp.inc:1264
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1001
static FeltType get(::mlir::MLIRContext *context, ::mlir::StringAttr fieldName)
Definition Types.cpp.inc:69
InvFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1143
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1550
InvFeltOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:1152
InvFeltOpGenericAdaptor(RangeT values, const InvFeltOpGenericAdaptorBase &base)
Definition Ops.h.inc:1149
InvFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1143
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:1158
InvFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1145
InvFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:1147
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1154
InvFeltOpAdaptor Adaptor
Definition Ops.h.inc:1186
static constexpr int odsIndex_operand
Definition Ops.h.inc:1190
static InvFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value operand)
Definition Ops.cpp.inc:1596
::mlir::TypedValue<::mlir::Type > getOperand()
Definition Ops.h.inc:1211
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, std::optional<::mlir::Location > location, Adaptor adaptor, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:1224
::mlir::TypedValue<::mlir::Type > getResult()
Definition Ops.h.inc:1230
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1820
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1779
FoldAdaptor::Properties Properties
Definition Ops.h.inc:1191
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1201
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:1572
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:1197
::mlir::OpFoldResult fold(FoldAdaptor adaptor)
Definition Ops.cpp:328
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:1577
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:1220
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:1189
InvFeltOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:1188
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1554
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:1832
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:1584
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1205
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:1193
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
Definition Ops.cpp.inc:1853
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value operand)
Definition Ops.cpp.inc:1591
::mlir::OpOperand & getOperandMutable()
Definition Ops.h.inc:1215
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1783
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:1828
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1755
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:1581
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1587
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:1563
MulFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1355
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1875
MulFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1355
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1366
MulFeltOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:1364
MulFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:1359
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:1370
MulFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1357
MulFeltOpGenericAdaptor(RangeT values, const MulFeltOpGenericAdaptorBase &base)
Definition Ops.h.inc:1361
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:2175
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:1902
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:1428
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:1405
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1418
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:2083
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:2191
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:1888
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:1432
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:1909
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:1897
MulFeltOpAdaptor Adaptor
Definition Ops.h.inc:1402
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:1916
::mlir::OpOperand & getLhsMutable()
Definition Ops.h.inc:1436
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:1410
static constexpr int odsIndex_lhs
Definition Ops.h.inc:1406
FoldAdaptor::Properties Properties
Definition Ops.h.inc:1408
static MulFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:1922
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:1414
::mlir::OpOperand & getRhsMutable()
Definition Ops.h.inc:1441
MulFeltOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:1404
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:2121
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:2187
::mlir::OpFoldResult fold(FoldAdaptor adaptor)
Definition Ops.cpp:173
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:1450
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:2117
::mlir::TypedValue<::mlir::Type > getResult()
Definition Ops.h.inc:1456
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1912
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, std::optional<::mlir::Location > location, Adaptor adaptor, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:1906
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
Definition Ops.cpp.inc:2212
static constexpr int odsIndex_rhs
Definition Ops.h.inc:1407
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1422
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:1446
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1879
NegFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1580
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:2234
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1591
NegFeltOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:1589
NegFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:1584
NegFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1580
NegFeltOpGenericAdaptor(RangeT values, const NegFeltOpGenericAdaptorBase &base)
Definition Ops.h.inc:1586
NegFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1582
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:1595
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:2439
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value operand)
Definition Ops.cpp.inc:2275
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:1630
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:2271
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:2512
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1638
FoldAdaptor::Properties Properties
Definition Ops.h.inc:1628
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:2463
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:2256
::mlir::TypedValue<::mlir::Type > getOperand()
Definition Ops.h.inc:1648
static NegFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value operand)
Definition Ops.cpp.inc:2280
::mlir::OpOperand & getOperandMutable()
Definition Ops.h.inc:1652
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:2261
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:2265
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
Definition Ops.cpp.inc:2537
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:1657
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:2516
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:1661
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, std::optional<::mlir::Location > location, Adaptor adaptor, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
NegFeltOpAdaptor Adaptor
Definition Ops.h.inc:1623
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:2504
::mlir::TypedValue<::mlir::Type > getResult()
Definition Ops.h.inc:1667
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:2247
::mlir::OpFoldResult fold(FoldAdaptor adaptor)
Definition Ops.cpp:318
static constexpr int odsIndex_operand
Definition Ops.h.inc:1627
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:2268
NegFeltOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:1625
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:2238
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:1626
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1642
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:1634
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:2467
NotFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1791
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:2559
NotFeltOpGenericAdaptor(RangeT values, const NotFeltOpGenericAdaptorBase &base)
Definition Ops.h.inc:1797
NotFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:1795
NotFeltOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:1800
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1802
NotFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1791
NotFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1793
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:1806
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:2590
NotFeltOpAdaptor Adaptor
Definition Ops.h.inc:1834
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1849
::mlir::TypedValue<::mlir::Type > getResult()
Definition Ops.h.inc:1878
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:2764
NotFeltOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:1836
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:2596
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:2581
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:1841
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:1872
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:2586
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1853
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value operand)
Definition Ops.cpp.inc:2600
::mlir::TypedValue<::mlir::Type > getOperand()
Definition Ops.h.inc:1859
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:2788
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:1845
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:2593
FoldAdaptor::Properties Properties
Definition Ops.h.inc:1839
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:2792
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:2841
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:2837
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:1837
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:1868
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:2829
::mlir::OpOperand & getOperandMutable()
Definition Ops.h.inc:1863
static constexpr int odsIndex_operand
Definition Ops.h.inc:1838
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, std::optional<::mlir::Location > location, Adaptor adaptor, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
::mlir::OpFoldResult fold(FoldAdaptor adaptor)
Definition Ops.cpp:336
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:2572
static NotFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value operand)
Definition Ops.cpp.inc:2605
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:2563
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
Definition Ops.cpp.inc:2862
OrFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2003
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:2884
OrFeltOpGenericAdaptor(RangeT values, const OrFeltOpGenericAdaptorBase &base)
Definition Ops.h.inc:2009
OrFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:2007
OrFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2003
OrFeltOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:2012
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:2014
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:2018
OrFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2005
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:3200
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:2897
::mlir::OpOperand & getLhsMutable()
Definition Ops.h.inc:2084
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:2094
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:2906
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:2915
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:3130
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:2053
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:2098
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
Definition Ops.cpp.inc:3221
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:2888
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:2921
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:2925
OrFeltOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:2052
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:3184
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:2062
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:2066
FoldAdaptor::Properties Properties
Definition Ops.h.inc:2056
static OrFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:2931
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:2070
::mlir::TypedValue<::mlir::Type > getResult()
Definition Ops.h.inc:2104
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:3126
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:2911
static constexpr int odsIndex_rhs
Definition Ops.h.inc:2055
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, std::optional<::mlir::Location > location, Adaptor adaptor, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
OrFeltOpAdaptor Adaptor
Definition Ops.h.inc:2050
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:2058
::mlir::OpFoldResult fold(FoldAdaptor adaptor)
Definition Ops.cpp:265
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:2080
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:3092
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:3196
::mlir::OpOperand & getRhsMutable()
Definition Ops.h.inc:2089
static constexpr int odsIndex_lhs
Definition Ops.h.inc:2054
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:2076
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:2918
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:3243
PowFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2229
PowFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2229
PowFeltOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:2238
PowFeltOpGenericAdaptor(RangeT values, const PowFeltOpGenericAdaptorBase &base)
Definition Ops.h.inc:2235
PowFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:2233
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:2244
PowFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2231
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:2240
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:2320
static constexpr int odsIndex_rhs
Definition Ops.h.inc:2281
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:2288
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:2302
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:2296
PowFeltOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:2278
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:3555
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:3274
static constexpr int odsIndex_lhs
Definition Ops.h.inc:2280
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:2324
::mlir::OpFoldResult fold(FoldAdaptor adaptor)
Definition Ops.cpp:183
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:2279
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:3543
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:3280
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:2306
::mlir::OpOperand & getLhsMutable()
Definition Ops.h.inc:2310
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
Definition Ops.cpp.inc:3580
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:2284
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:3489
static PowFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:3290
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:3451
::mlir::TypedValue<::mlir::Type > getResult()
Definition Ops.h.inc:2330
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:3284
PowFeltOpAdaptor Adaptor
Definition Ops.h.inc:2276
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:3247
FoldAdaptor::Properties Properties
Definition Ops.h.inc:2282
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:3485
::mlir::OpOperand & getRhsMutable()
Definition Ops.h.inc:2315
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, std::optional<::mlir::Location > location, Adaptor adaptor, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:3559
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:3256
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:3277
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:3270
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:3265
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:2292
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:3602
ShlFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2455
ShlFeltOpGenericAdaptor(RangeT values, const ShlFeltOpGenericAdaptorBase &base)
Definition Ops.h.inc:2461
ShlFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2457
ShlFeltOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:2464
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:2466
ShlFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2455
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:2470
ShlFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:2459
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:2510
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:3914
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:2514
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:3643
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:2505
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:2528
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:2518
static ShlFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:3649
::mlir::OpOperand & getLhsMutable()
Definition Ops.h.inc:2536
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:3606
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
Definition Ops.cpp.inc:3939
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:2532
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:3639
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, std::optional<::mlir::Location > location, Adaptor adaptor, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:3629
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:3848
ShlFeltOpAdaptor Adaptor
Definition Ops.h.inc:2502
::mlir::TypedValue<::mlir::Type > getResult()
Definition Ops.h.inc:2556
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:3902
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:2546
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:3810
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:3615
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:3636
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:3633
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:2522
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:3624
ShlFeltOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:2504
static constexpr int odsIndex_lhs
Definition Ops.h.inc:2506
::mlir::OpFoldResult fold(FoldAdaptor adaptor)
Definition Ops.cpp:285
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:2550
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:3918
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:3844
::mlir::OpOperand & getRhsMutable()
Definition Ops.h.inc:2541
FoldAdaptor::Properties Properties
Definition Ops.h.inc:2508
static constexpr int odsIndex_rhs
Definition Ops.h.inc:2507
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:3961
ShrFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2681
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:2692
ShrFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:2685
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:2696
ShrFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2683
ShrFeltOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:2690
ShrFeltOpGenericAdaptor(RangeT values, const ShrFeltOpGenericAdaptorBase &base)
Definition Ops.h.inc:2687
ShrFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2681
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:4203
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:3992
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:4261
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:2748
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, std::optional<::mlir::Location > location, Adaptor adaptor, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
static constexpr int odsIndex_lhs
Definition Ops.h.inc:2732
::mlir::OpFoldResult fold(FoldAdaptor adaptor)
Definition Ops.cpp:299
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:2758
FoldAdaptor::Properties Properties
Definition Ops.h.inc:2734
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:4273
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:2731
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:3965
::mlir::OpOperand & getRhsMutable()
Definition Ops.h.inc:2767
ShrFeltOpAdaptor Adaptor
Definition Ops.h.inc:2728
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:3974
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:4277
static ShrFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:4008
static constexpr int odsIndex_rhs
Definition Ops.h.inc:2733
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:2776
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:4169
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:2744
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:2740
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:4002
ShrFeltOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:2730
::mlir::TypedValue<::mlir::Type > getResult()
Definition Ops.h.inc:2782
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:2754
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:3998
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:2772
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
Definition Ops.cpp.inc:4298
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:3995
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:4207
::mlir::OpOperand & getLhsMutable()
Definition Ops.h.inc:2762
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:3988
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:3983
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:2736
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:4320
SignedIntDivFeltOpAdaptor(SignedIntDivFeltOp op)
Definition Ops.cpp.inc:4318
SignedIntDivFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2907
SignedIntDivFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:2911
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:2918
SignedIntDivFeltOpGenericAdaptor(RangeT values, const SignedIntDivFeltOpGenericAdaptorBase &base)
Definition Ops.h.inc:2913
SignedIntDivFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2909
SignedIntDivFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2907
SignedIntDivFeltOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:2916
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:2966
::mlir::OpOperand & getRhsMutable()
Definition Ops.h.inc:2993
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:4566
static constexpr int odsIndex_lhs
Definition Ops.h.inc:2958
SignedIntDivFeltOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:2956
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:4333
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
Definition Ops.cpp.inc:4657
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:4528
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:2974
FoldAdaptor::Properties Properties
Definition Ops.h.inc:2960
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:3002
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:2984
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:2980
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:4342
static SignedIntDivFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:4367
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:4357
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:4351
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:4562
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:2962
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:2970
::mlir::OpFoldResult fold(FoldAdaptor adaptor)
Definition Ops.cpp:215
static constexpr int odsIndex_rhs
Definition Ops.h.inc:2959
SignedIntDivFeltOpAdaptor Adaptor
Definition Ops.h.inc:2954
::mlir::OpOperand & getLhsMutable()
Definition Ops.h.inc:2988
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:2998
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:2957
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:4636
::mlir::TypedValue<::mlir::Type > getResult()
Definition Ops.h.inc:3008
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:4347
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, std::optional<::mlir::Location > location, Adaptor adaptor, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:4361
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:4620
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:4324
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:4632
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:4354
SignedModFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:3133
SignedModFeltOpAdaptor(SignedModFeltOp op)
Definition Ops.cpp.inc:4677
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:4679
SignedModFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:3133
SignedModFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:3135
SignedModFeltOpGenericAdaptor(RangeT values, const SignedModFeltOpGenericAdaptorBase &base)
Definition Ops.h.inc:3139
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:3148
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:3144
SignedModFeltOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:3142
SignedModFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:3137
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:4713
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:4716
FoldAdaptor::Properties Properties
Definition Ops.h.inc:3186
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:4710
static constexpr int odsIndex_rhs
Definition Ops.h.inc:3185
SignedModFeltOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:3182
static constexpr int odsIndex_lhs
Definition Ops.h.inc:3184
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:4995
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:3196
::mlir::OpOperand & getLhsMutable()
Definition Ops.h.inc:3214
SignedModFeltOpAdaptor Adaptor
Definition Ops.h.inc:3180
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:4925
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:3224
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:3210
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:4701
static SignedModFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:4726
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, std::optional<::mlir::Location > location, Adaptor adaptor, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
::mlir::OpFoldResult fold(FoldAdaptor adaptor)
Definition Ops.cpp:240
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:4692
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:3188
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:4991
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:4979
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:4720
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:4683
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
Definition Ops.cpp.inc:5016
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:4706
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:3192
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:3206
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:3183
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:3228
::mlir::OpOperand & getRhsMutable()
Definition Ops.h.inc:3219
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:3200
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:4887
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:4921
::mlir::TypedValue<::mlir::Type > getResult()
Definition Ops.h.inc:3234
SubFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:3359
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:5038
SubFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:3361
SubFeltOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:3368
SubFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:3363
SubFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:3359
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:3370
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:3374
SubFeltOpGenericAdaptor(RangeT values, const SubFeltOpGenericAdaptorBase &base)
Definition Ops.h.inc:3365
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:5284
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:3454
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:5079
::mlir::OpFoldResult fold(FoldAdaptor adaptor)
Definition Ops.cpp:163
static SubFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:5085
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:5246
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:5350
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:3436
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:3409
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:3414
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:5338
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, std::optional<::mlir::Location > location, Adaptor adaptor, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:3418
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:5075
::mlir::OpOperand & getRhsMutable()
Definition Ops.h.inc:3445
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:5051
FoldAdaptor::Properties Properties
Definition Ops.h.inc:3412
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:5065
SubFeltOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:3408
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:3450
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:5060
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
Definition Ops.cpp.inc:5375
static constexpr int odsIndex_lhs
Definition Ops.h.inc:3410
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:5042
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:5069
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:5072
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:5280
::mlir::OpOperand & getLhsMutable()
Definition Ops.h.inc:3440
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:3432
::mlir::TypedValue<::mlir::Type > getResult()
Definition Ops.h.inc:3460
SubFeltOpAdaptor Adaptor
Definition Ops.h.inc:3406
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:3422
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:5354
static constexpr int odsIndex_rhs
Definition Ops.h.inc:3411
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:3426
UnsignedIntDivFeltOpAdaptor(UnsignedIntDivFeltOp op)
Definition Ops.cpp.inc:5395
UnsignedIntDivFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:3585
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:5397
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:3596
UnsignedIntDivFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:3585
UnsignedIntDivFeltOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:3594
UnsignedIntDivFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:3589
UnsignedIntDivFeltOpGenericAdaptor(RangeT values, const UnsignedIntDivFeltOpGenericAdaptorBase &base)
Definition Ops.h.inc:3591
UnsignedIntDivFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:3587
UnsignedIntDivFeltOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:3634
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:5697
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:5713
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:5424
static UnsignedIntDivFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:5444
static constexpr int odsIndex_lhs
Definition Ops.h.inc:3636
static constexpr int odsIndex_rhs
Definition Ops.h.inc:3637
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:5419
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:3662
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:5401
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:3676
::mlir::OpOperand & getRhsMutable()
Definition Ops.h.inc:3671
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:5410
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:3644
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:5643
UnsignedIntDivFeltOpAdaptor Adaptor
Definition Ops.h.inc:3632
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:5709
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:5434
::mlir::OpOperand & getLhsMutable()
Definition Ops.h.inc:3666
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:5431
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:5428
FoldAdaptor::Properties Properties
Definition Ops.h.inc:3638
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:3640
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:3648
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:3635
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, std::optional<::mlir::Location > location, Adaptor adaptor, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
::mlir::TypedValue<::mlir::Type > getResult()
Definition Ops.h.inc:3686
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:5438
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
Definition Ops.cpp.inc:5734
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:5605
::mlir::OpFoldResult fold(FoldAdaptor adaptor)
Definition Ops.cpp:205
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:3658
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:3680
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:5639
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:3652
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:5756
UnsignedModFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:3811
UnsignedModFeltOpAdaptor(UnsignedModFeltOp op)
Definition Ops.cpp.inc:5754
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:3822
UnsignedModFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:3815
UnsignedModFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:3813
UnsignedModFeltOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:3820
UnsignedModFeltOpGenericAdaptor(RangeT values, const UnsignedModFeltOpGenericAdaptorBase &base)
Definition Ops.h.inc:3817
UnsignedModFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:3811
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:6072
static UnsignedModFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:5803
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:6068
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:3874
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:3888
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:3878
FoldAdaptor::Properties Properties
Definition Ops.h.inc:3864
UnsignedModFeltOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:3860
::mlir::OpFoldResult fold(FoldAdaptor adaptor)
Definition Ops.cpp:231
::mlir::OpOperand & getRhsMutable()
Definition Ops.h.inc:3897
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:5783
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
Definition Ops.cpp.inc:6093
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:5998
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:6002
static constexpr int odsIndex_lhs
Definition Ops.h.inc:3862
static constexpr int odsIndex_rhs
Definition Ops.h.inc:3863
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:3906
UnsignedModFeltOpAdaptor Adaptor
Definition Ops.h.inc:3858
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:5964
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:5760
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, std::optional<::mlir::Location > location, Adaptor adaptor, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:5787
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:3861
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:3884
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:3902
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:6056
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:5778
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:5769
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:5790
::mlir::TypedValue<::mlir::Type > getResult()
Definition Ops.h.inc:3912
::mlir::OpOperand & getLhsMutable()
Definition Ops.h.inc:3892
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:5797
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:3866
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:3870
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:5793
XorFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:4037
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:6115
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:4052
XorFeltOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:4046
XorFeltOpGenericAdaptor(RangeT values, const XorFeltOpGenericAdaptorBase &base)
Definition Ops.h.inc:4043
XorFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:4041
XorFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:4039
XorFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:4037
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:4048
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:4092
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:6146
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:6142
XorFeltOpAdaptor Adaptor
Definition Ops.h.inc:4084
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:6152
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:4096
::mlir::OpOperand & getRhsMutable()
Definition Ops.h.inc:4123
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:6137
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:4132
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:6323
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:4087
static XorFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:6162
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:4100
::mlir::OpFoldResult fold(FoldAdaptor adaptor)
Definition Ops.cpp:275
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:4128
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, std::optional<::mlir::Location > location, Adaptor adaptor, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:6361
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:4110
static constexpr int odsIndex_rhs
Definition Ops.h.inc:4089
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:6128
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:6431
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:6357
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:6119
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:6156
FoldAdaptor::Properties Properties
Definition Ops.h.inc:4090
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:4104
::mlir::OpOperand & getLhsMutable()
Definition Ops.h.inc:4118
XorFeltOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:4086
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:6415
::mlir::TypedValue<::mlir::Type > getResult()
Definition Ops.h.inc:4138
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:4114
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
Definition Ops.cpp.inc:6452
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:6427
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:6149
static constexpr int odsIndex_lhs
Definition Ops.h.inc:4088
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:209
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:199
AddFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:203
AndFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:429
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:435
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:425
DivFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:655
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:651
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:661
::llzk::felt::FeltConstAttr getValueAttr()
Definition Ops.h.inc:918
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:896
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:906
FeltConstantOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:900
InvFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1116
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:1112
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:1122
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:1333
MulFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1327
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:1323
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:1549
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:1559
NegFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1553
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:1770
NotFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1764
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:1760
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:1981
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:1971
OrFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1975
PowFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2201
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:2207
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:2197
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:2423
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:2433
ShlFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2427
ShrFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2653
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:2649
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:2659
SignedIntDivFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:2879
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:2875
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:2885
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:3101
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:3111
SignedModFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:3105
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:3337
SubFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:3331
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:3327
UnsignedIntDivFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:3557
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:3553
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:3563
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:3789
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:3779
UnsignedModFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:3783
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:4005
XorFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:4009
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:4015
Common interface for binary arithmetic operations on felts.
Common interface for constant parameter-like symbol operations that can be defined within a TemplateO...
void setValue(const ::llzk::felt::FeltConstAttr &propValue)
Definition Ops.h.inc:882