LLZK 2.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 {
11namespace boolean {
12class AndBoolOp;
13} // namespace boolean
14} // namespace llzk
15namespace llzk {
16namespace boolean {
17class AssertOp;
18} // namespace boolean
19} // namespace llzk
20namespace llzk {
21namespace boolean {
22class CmpOp;
23} // namespace boolean
24} // namespace llzk
25namespace llzk {
26namespace boolean {
27class NotBoolOp;
28} // namespace boolean
29} // namespace llzk
30namespace llzk {
31namespace boolean {
32class OrBoolOp;
33} // namespace boolean
34} // namespace llzk
35namespace llzk {
36namespace boolean {
37class XorBoolOp;
38} // namespace boolean
39} // namespace llzk
40#ifdef GET_OP_CLASSES
41#undef GET_OP_CLASSES
42
43namespace llzk {
44namespace boolean {
45
46//===----------------------------------------------------------------------===//
47// ::llzk::boolean::AndBoolOp declarations
48//===----------------------------------------------------------------------===//
49
50namespace detail {
52public:
53protected:
54 ::mlir::DictionaryAttr odsAttrs;
55 ::std::optional<::mlir::OperationName> odsOpName;
56 ::mlir::RegionRange odsRegions;
57public:
58 AndBoolOpGenericAdaptorBase(::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), odsRegions(regions) { if (odsAttrs)
59 odsOpName.emplace("bool.and", odsAttrs.getContext());
60 }
61
62 AndBoolOpGenericAdaptorBase(::mlir::Operation *op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), odsRegions(op->getRegions()) {}
63
64 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
65 return {index, 1};
66 }
67
68 ::mlir::DictionaryAttr getAttributes() {
69 return odsAttrs;
70 }
71
72};
73} // namespace detail
74template <typename RangeT>
76 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
78public:
79 AndBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
80
81 AndBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : AndBoolOpGenericAdaptor(values, attrs, (properties ? *properties.as<::mlir::EmptyProperties *>() : ::mlir::EmptyProperties{}), regions) {}
82
83 AndBoolOpGenericAdaptor(RangeT values, const AndBoolOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
84
85 template <typename LateInst = AndBoolOp, typename = std::enable_if_t<std::is_same_v<LateInst, AndBoolOp>>>
86 AndBoolOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
87
88 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
89 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
90 }
91
92 RangeT getODSOperands(unsigned index) {
93 auto valueRange = getODSOperandIndexAndLength(index);
94 return {std::next(odsOperands.begin(), valueRange.first),
95 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
96 }
97
98 ValueT getLhs() {
99 return (*getODSOperands(0).begin());
100 }
101
102 ValueT getRhs() {
103 return (*getODSOperands(1).begin());
104 }
105
106 RangeT getOperands() {
107 return odsOperands;
108 }
109
110private:
111 RangeT odsOperands;
112};
113class AndBoolOpAdaptor : public AndBoolOpGenericAdaptor<::mlir::ValueRange> {
114public:
117
118 ::llvm::LogicalResult verify(::mlir::Location loc);
119};
120class AndBoolOp : public ::mlir::Op<AndBoolOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::llzk::function::NotFieldNative, ::mlir::OpTrait::OpInvariants, ::mlir::OpTrait::IsCommutative, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
121public:
122 using Op::Op;
123 using Op::print;
125 template <typename RangeT>
128 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
129 return {};
130 }
131
132 static constexpr ::llvm::StringLiteral getOperationName() {
133 return ::llvm::StringLiteral("bool.and");
134 }
135
136 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
137 return {index, 1};
138 }
139
140 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
141 auto valueRange = getODSOperandIndexAndLength(index);
142 return {std::next(getOperation()->operand_begin(), valueRange.first),
143 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
144 }
145
146 ::mlir::TypedValue<::mlir::Type> getLhs() {
147 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
148 }
149
150 ::mlir::TypedValue<::mlir::Type> getRhs() {
151 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
152 }
153
154 ::mlir::OpOperand &getLhsMutable() {
155 auto range = getODSOperandIndexAndLength(0);
156 return getOperation()->getOpOperand(range.first);
157 }
158
159 ::mlir::OpOperand &getRhsMutable() {
160 auto range = getODSOperandIndexAndLength(1);
161 return getOperation()->getOpOperand(range.first);
162 }
163
164 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
165 return {index, 1};
166 }
167
168 ::mlir::Operation::result_range getODSResults(unsigned index) {
169 auto valueRange = getODSResultIndexAndLength(index);
170 return {std::next(getOperation()->result_begin(), valueRange.first),
171 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
172 }
173
174 ::mlir::TypedValue<::mlir::IntegerType> getResult() {
175 return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
176 }
177
178 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
179 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs);
180 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
181 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
182 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
183 ::llvm::LogicalResult verifyInvariantsImpl();
184 ::llvm::LogicalResult verifyInvariants();
185 ::mlir::OpFoldResult fold(FoldAdaptor adaptor);
186 static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
187 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
188 void print(::mlir::OpAsmPrinter &_odsPrinter);
189 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
190public:
191 private:
192 static ::mlir::ParseResult parseInferredOrParsedType(
193 ::mlir::OpAsmParser &parser, ::mlir::Type &opType, bool isFirst
194 ) {
195 if (mlir::succeeded(isFirst ? parser.parseOptionalColon() : parser.parseOptionalComma())) {
196 // If there is a comma, parse the `opType`
197 mlir::Type type;
198 if (parser.parseCustomTypeWithFallback(type)) {
199 return mlir::failure();
200 }
201 opType = type;
202 } else {
203 // Otherwise, build the default type
204 opType =
205 parser.getBuilder().getIntegerType(1);
206 }
207 return mlir::success();
208 }
209
210 static void printInferredOrParsedType(::mlir::OpAsmPrinter &printer,
211 ::mlir::Operation *op, ::mlir::Type opType, bool isFirst
212 ) {
213 printer << (isFirst ? " : " : ", ");
214 printer.printStrippedAttrOrType(opType);
215 }
216};
217} // namespace boolean
218} // namespace llzk
219MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::boolean::AndBoolOp)
220
221namespace llzk {
222namespace boolean {
223
224//===----------------------------------------------------------------------===//
225// ::llzk::boolean::AssertOp declarations
226//===----------------------------------------------------------------------===//
227
228namespace detail {
230public:
231 struct Properties {
232 using msgTy = ::mlir::StringAttr;
234
235 auto getMsg() {
236 auto &propStorage = this->msg;
237 return ::llvm::dyn_cast_or_null<::mlir::StringAttr>(propStorage);
238 }
239 void setMsg(const ::mlir::StringAttr &propValue) {
240 this->msg = propValue;
241 }
242 bool operator==(const Properties &rhs) const {
243 return
244 rhs.msg == this->msg &&
245 true;
246 }
247 bool operator!=(const Properties &rhs) const {
248 return !(*this == rhs);
249 }
250 };
251protected:
252 ::mlir::DictionaryAttr odsAttrs;
253 ::std::optional<::mlir::OperationName> odsOpName;
255 ::mlir::RegionRange odsRegions;
256public:
257 AssertOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
258 odsOpName.emplace("bool.assert", odsAttrs.getContext());
259 }
260
262
263 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
264 return {index, 1};
265 }
266
268 return properties;
269 }
270
271 ::mlir::DictionaryAttr getAttributes() {
272 return odsAttrs;
273 }
274
275 ::mlir::StringAttr getMsgAttr() {
276 auto attr = ::llvm::dyn_cast_or_null<::mlir::StringAttr>(getProperties().msg);
277 return attr;
278 }
279
280 ::std::optional< ::llvm::StringRef > getMsg();
281};
282} // namespace detail
283template <typename RangeT>
285 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
287public:
288 AssertOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
289
290 AssertOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : AssertOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
291
292 AssertOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : AssertOpGenericAdaptor(values, attrs, Properties{}, {}) {}
293
294 AssertOpGenericAdaptor(RangeT values, const AssertOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
295
296 template <typename LateInst = AssertOp, typename = std::enable_if_t<std::is_same_v<LateInst, AssertOp>>>
297 AssertOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
298
299 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
300 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
301 }
302
303 RangeT getODSOperands(unsigned index) {
304 auto valueRange = getODSOperandIndexAndLength(index);
305 return {std::next(odsOperands.begin(), valueRange.first),
306 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
307 }
308
309 ValueT getCondition() {
310 return (*getODSOperands(0).begin());
311 }
312
313 RangeT getOperands() {
314 return odsOperands;
315 }
316
317private:
318 RangeT odsOperands;
319};
320class AssertOpAdaptor : public AssertOpGenericAdaptor<::mlir::ValueRange> {
321public:
324
325 ::llvm::LogicalResult verify(::mlir::Location loc);
326};
327class AssertOp : public ::mlir::Op<AssertOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::MemoryEffectOpInterface::Trait> {
328public:
329 using Op::Op;
330 using Op::print;
332 template <typename RangeT>
336 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
337 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("msg")};
338 return ::llvm::ArrayRef(attrNames);
339 }
340
341 ::mlir::StringAttr getMsgAttrName() {
342 return getAttributeNameForIndex(0);
343 }
344
345 static ::mlir::StringAttr getMsgAttrName(::mlir::OperationName name) {
346 return getAttributeNameForIndex(name, 0);
347 }
348
349 static constexpr ::llvm::StringLiteral getOperationName() {
350 return ::llvm::StringLiteral("bool.assert");
351 }
352
353 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
354 return {index, 1};
355 }
356
357 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
358 auto valueRange = getODSOperandIndexAndLength(index);
359 return {std::next(getOperation()->operand_begin(), valueRange.first),
360 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
361 }
362
363 ::mlir::TypedValue<::mlir::IntegerType> getCondition() {
364 return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(0).begin());
365 }
366
367 ::mlir::OpOperand &getConditionMutable() {
368 auto range = getODSOperandIndexAndLength(0);
369 return getOperation()->getOpOperand(range.first);
370 }
371
372 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
373 return {index, 1};
374 }
375
376 ::mlir::Operation::result_range getODSResults(unsigned index) {
377 auto valueRange = getODSResultIndexAndLength(index);
378 return {std::next(getOperation()->result_begin(), valueRange.first),
379 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
380 }
381
382 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
383 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
384 static llvm::hash_code computePropertiesHash(const Properties &prop);
385 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
386 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
387 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
388 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
389 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
390 void writeProperties(::mlir::DialectBytecodeWriter &writer);
391 ::mlir::StringAttr getMsgAttr() {
392 return ::llvm::dyn_cast_or_null<::mlir::StringAttr>(getProperties().msg);
393 }
394
395 ::std::optional< ::llvm::StringRef > getMsg();
396 void setMsgAttr(::mlir::StringAttr attr) {
397 getProperties().msg = attr;
398 }
399
400 void setMsg(::std::optional<::llvm::StringRef> attrValue);
401 ::mlir::Attribute removeMsgAttr() {
402 auto &attr = getProperties().msg;
403 attr = {};
404 return attr;
405 }
406
407 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition, /*optional*/::mlir::StringAttr msg);
408 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition, /*optional*/::mlir::StringAttr msg);
409 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
410 ::llvm::LogicalResult verifyInvariantsImpl();
411 ::llvm::LogicalResult verifyInvariants();
412 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
413 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
414 void print(::mlir::OpAsmPrinter &_odsPrinter);
415private:
416 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
417 return getAttributeNameForIndex((*this)->getName(), index);
418 }
419
420 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
421 assert(index < 1 && "invalid attribute index");
422 assert(name.getStringRef() == getOperationName() && "invalid operation name");
423 assert(name.isRegistered() && "Operation isn't registered, missing a "
424 "dependent dialect loading?");
425 return name.getAttributeNames()[index];
426 }
427
428public:
429};
430} // namespace boolean
431} // namespace llzk
432MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::boolean::AssertOp)
433
434namespace llzk {
435namespace boolean {
436
437//===----------------------------------------------------------------------===//
438// ::llzk::boolean::CmpOp declarations
439//===----------------------------------------------------------------------===//
440
441namespace detail {
443public:
444 struct Properties {
445 using predicateTy = ::llzk::boolean::FeltCmpPredicateAttr;
447
449 auto &propStorage = this->predicate;
450 return ::llvm::cast<::llzk::boolean::FeltCmpPredicateAttr>(propStorage);
451 }
452 void setPredicate(const ::llzk::boolean::FeltCmpPredicateAttr &propValue) {
453 this->predicate = propValue;
454 }
455 bool operator==(const Properties &rhs) const {
456 return
457 rhs.predicate == this->predicate &&
458 true;
459 }
460 bool operator!=(const Properties &rhs) const {
461 return !(*this == rhs);
462 }
463 };
464protected:
465 ::mlir::DictionaryAttr odsAttrs;
466 ::std::optional<::mlir::OperationName> odsOpName;
468 ::mlir::RegionRange odsRegions;
469public:
470 CmpOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
471 odsOpName.emplace("bool.cmp", odsAttrs.getContext());
472 }
473
475
476 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
477 return {index, 1};
478 }
479
481 return properties;
482 }
483
484 ::mlir::DictionaryAttr getAttributes() {
485 return odsAttrs;
486 }
487
488 ::llzk::boolean::FeltCmpPredicateAttr getPredicateAttr() {
489 auto attr = ::llvm::cast<::llzk::boolean::FeltCmpPredicateAttr>(getProperties().predicate);
490 return attr;
491 }
492
494};
495} // namespace detail
496template <typename RangeT>
498 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
500public:
501 CmpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
502
503 CmpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : CmpOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
504
505 CmpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : CmpOpGenericAdaptor(values, attrs, Properties{}, {}) {}
506
507 CmpOpGenericAdaptor(RangeT values, const CmpOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
508
509 template <typename LateInst = CmpOp, typename = std::enable_if_t<std::is_same_v<LateInst, CmpOp>>>
510 CmpOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
511
512 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
513 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
514 }
515
516 RangeT getODSOperands(unsigned index) {
517 auto valueRange = getODSOperandIndexAndLength(index);
518 return {std::next(odsOperands.begin(), valueRange.first),
519 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
520 }
521
522 ValueT getLhs() {
523 return (*getODSOperands(0).begin());
524 }
525
526 ValueT getRhs() {
527 return (*getODSOperands(1).begin());
528 }
529
530 RangeT getOperands() {
531 return odsOperands;
532 }
533
534private:
535 RangeT odsOperands;
536};
537class CmpOpAdaptor : public CmpOpGenericAdaptor<::mlir::ValueRange> {
538public:
541
542 ::llvm::LogicalResult verify(::mlir::Location loc);
543};
544class CmpOp : public ::mlir::Op<CmpOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
545public:
546 using Op::Op;
547 using Op::print;
549 template <typename RangeT>
553 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
554 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("predicate")};
555 return ::llvm::ArrayRef(attrNames);
556 }
557
558 ::mlir::StringAttr getPredicateAttrName() {
559 return getAttributeNameForIndex(0);
560 }
561
562 static ::mlir::StringAttr getPredicateAttrName(::mlir::OperationName name) {
563 return getAttributeNameForIndex(name, 0);
564 }
565
566 static constexpr ::llvm::StringLiteral getOperationName() {
567 return ::llvm::StringLiteral("bool.cmp");
568 }
569
570 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
571 return {index, 1};
572 }
573
574 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
575 auto valueRange = getODSOperandIndexAndLength(index);
576 return {std::next(getOperation()->operand_begin(), valueRange.first),
577 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
578 }
579
580 ::mlir::TypedValue<::llzk::felt::FeltType> getLhs() {
581 return ::llvm::cast<::mlir::TypedValue<::llzk::felt::FeltType>>(*getODSOperands(0).begin());
582 }
583
584 ::mlir::TypedValue<::llzk::felt::FeltType> getRhs() {
585 return ::llvm::cast<::mlir::TypedValue<::llzk::felt::FeltType>>(*getODSOperands(1).begin());
586 }
587
588 ::mlir::OpOperand &getLhsMutable() {
589 auto range = getODSOperandIndexAndLength(0);
590 return getOperation()->getOpOperand(range.first);
591 }
592
593 ::mlir::OpOperand &getRhsMutable() {
594 auto range = getODSOperandIndexAndLength(1);
595 return getOperation()->getOpOperand(range.first);
596 }
597
598 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
599 return {index, 1};
600 }
601
602 ::mlir::Operation::result_range getODSResults(unsigned index) {
603 auto valueRange = getODSResultIndexAndLength(index);
604 return {std::next(getOperation()->result_begin(), valueRange.first),
605 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
606 }
607
608 ::mlir::TypedValue<::mlir::IntegerType> getResult() {
609 return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
610 }
611
612 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
613 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
614 static llvm::hash_code computePropertiesHash(const Properties &prop);
615 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
616 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
617 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
618 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
619 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
620 void writeProperties(::mlir::DialectBytecodeWriter &writer);
621 ::llzk::boolean::FeltCmpPredicateAttr getPredicateAttr() {
622 return ::llvm::cast<::llzk::boolean::FeltCmpPredicateAttr>(getProperties().predicate);
623 }
624
626 void setPredicateAttr(::llzk::boolean::FeltCmpPredicateAttr attr) {
627 getProperties().predicate = attr;
628 }
629
631 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::boolean::FeltCmpPredicateAttr predicate, ::mlir::Value lhs, ::mlir::Value rhs);
632 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::boolean::FeltCmpPredicateAttr predicate, ::mlir::Value lhs, ::mlir::Value rhs);
633 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llzk::boolean::FeltCmpPredicateAttr predicate, ::mlir::Value lhs, ::mlir::Value rhs);
634 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::boolean::FeltCmpPredicate predicate, ::mlir::Value lhs, ::mlir::Value rhs);
635 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::boolean::FeltCmpPredicate predicate, ::mlir::Value lhs, ::mlir::Value rhs);
636 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llzk::boolean::FeltCmpPredicate predicate, ::mlir::Value lhs, ::mlir::Value rhs);
637 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
638 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
639 ::llvm::LogicalResult verifyInvariantsImpl();
640 ::llvm::LogicalResult verifyInvariants();
641 ::mlir::OpFoldResult fold(FoldAdaptor adaptor);
642 static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
643 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
644 void print(::mlir::OpAsmPrinter &_odsPrinter);
645 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
646private:
647 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
648 return getAttributeNameForIndex((*this)->getName(), index);
649 }
650
651 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
652 assert(index < 1 && "invalid attribute index");
653 assert(name.getStringRef() == getOperationName() && "invalid operation name");
654 assert(name.isRegistered() && "Operation isn't registered, missing a "
655 "dependent dialect loading?");
656 return name.getAttributeNames()[index];
657 }
658
659public:
660 private:
661 static ::mlir::ParseResult parseInferredOrParsedType(
662 ::mlir::OpAsmParser &parser, ::mlir::Type &opType, bool isFirst
663 ) {
664 if (mlir::succeeded(isFirst ? parser.parseOptionalColon() : parser.parseOptionalComma())) {
665 // If there is a comma, parse the `opType`
666 mlir::Type type;
667 if (parser.parseCustomTypeWithFallback(type)) {
668 return mlir::failure();
669 }
670 opType = type;
671 } else {
672 // Otherwise, build the default type
673 opType =
674 ::llzk::felt::FeltType::get(parser.getBuilder().getContext());
675 }
676 return mlir::success();
677 }
678
679 static void printInferredOrParsedType(::mlir::OpAsmPrinter &printer,
680 ::mlir::Operation *op, ::mlir::Type opType, bool isFirst
681 ) {
682 printer << (isFirst ? " : " : ", ");
683 printer.printStrippedAttrOrType(opType);
684 }
685};
686} // namespace boolean
687} // namespace llzk
688MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::boolean::CmpOp)
689
690namespace llzk {
691namespace boolean {
692
693//===----------------------------------------------------------------------===//
694// ::llzk::boolean::NotBoolOp declarations
695//===----------------------------------------------------------------------===//
696
697namespace detail {
699public:
700protected:
701 ::mlir::DictionaryAttr odsAttrs;
702 ::std::optional<::mlir::OperationName> odsOpName;
703 ::mlir::RegionRange odsRegions;
704public:
705 NotBoolOpGenericAdaptorBase(::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), odsRegions(regions) { if (odsAttrs)
706 odsOpName.emplace("bool.not", odsAttrs.getContext());
707 }
708
709 NotBoolOpGenericAdaptorBase(::mlir::Operation *op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), odsRegions(op->getRegions()) {}
710
711 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
712 return {index, 1};
713 }
714
715 ::mlir::DictionaryAttr getAttributes() {
716 return odsAttrs;
717 }
718
719};
720} // namespace detail
721template <typename RangeT>
723 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
725public:
726 NotBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
727
728 NotBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : NotBoolOpGenericAdaptor(values, attrs, (properties ? *properties.as<::mlir::EmptyProperties *>() : ::mlir::EmptyProperties{}), regions) {}
729
730 NotBoolOpGenericAdaptor(RangeT values, const NotBoolOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
731
732 template <typename LateInst = NotBoolOp, typename = std::enable_if_t<std::is_same_v<LateInst, NotBoolOp>>>
733 NotBoolOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
734
735 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
736 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
737 }
738
739 RangeT getODSOperands(unsigned index) {
740 auto valueRange = getODSOperandIndexAndLength(index);
741 return {std::next(odsOperands.begin(), valueRange.first),
742 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
743 }
744
745 ValueT getOperand() {
746 return (*getODSOperands(0).begin());
747 }
748
749 RangeT getOperands() {
750 return odsOperands;
751 }
752
753private:
754 RangeT odsOperands;
755};
756class NotBoolOpAdaptor : public NotBoolOpGenericAdaptor<::mlir::ValueRange> {
757public:
760
761 ::llvm::LogicalResult verify(::mlir::Location loc);
762};
763class NotBoolOp : public ::mlir::Op<NotBoolOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::llzk::function::NotFieldNative, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
764public:
765 using Op::Op;
766 using Op::print;
768 template <typename RangeT>
771 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
772 return {};
773 }
774
775 static constexpr ::llvm::StringLiteral getOperationName() {
776 return ::llvm::StringLiteral("bool.not");
777 }
778
779 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
780 return {index, 1};
781 }
782
783 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
784 auto valueRange = getODSOperandIndexAndLength(index);
785 return {std::next(getOperation()->operand_begin(), valueRange.first),
786 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
787 }
788
789 ::mlir::TypedValue<::mlir::Type> getOperand() {
790 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
791 }
792
793 ::mlir::OpOperand &getOperandMutable() {
794 auto range = getODSOperandIndexAndLength(0);
795 return getOperation()->getOpOperand(range.first);
796 }
797
798 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
799 return {index, 1};
800 }
801
802 ::mlir::Operation::result_range getODSResults(unsigned index) {
803 auto valueRange = getODSResultIndexAndLength(index);
804 return {std::next(getOperation()->result_begin(), valueRange.first),
805 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
806 }
807
808 ::mlir::TypedValue<::mlir::IntegerType> getResult() {
809 return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
810 }
811
812 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value operand);
813 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value operand);
814 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value operand);
815 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
816 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
817 ::llvm::LogicalResult verifyInvariantsImpl();
818 ::llvm::LogicalResult verifyInvariants();
819 ::mlir::OpFoldResult fold(FoldAdaptor adaptor);
820 static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
821 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
822 void print(::mlir::OpAsmPrinter &_odsPrinter);
823 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
824public:
825 private:
826 static ::mlir::ParseResult parseInferredOrParsedType(
827 ::mlir::OpAsmParser &parser, ::mlir::Type &opType, bool isFirst
828 ) {
829 if (mlir::succeeded(isFirst ? parser.parseOptionalColon() : parser.parseOptionalComma())) {
830 // If there is a comma, parse the `opType`
831 mlir::Type type;
832 if (parser.parseCustomTypeWithFallback(type)) {
833 return mlir::failure();
834 }
835 opType = type;
836 } else {
837 // Otherwise, build the default type
838 opType =
839 parser.getBuilder().getIntegerType(1);
840 }
841 return mlir::success();
842 }
843
844 static void printInferredOrParsedType(::mlir::OpAsmPrinter &printer,
845 ::mlir::Operation *op, ::mlir::Type opType, bool isFirst
846 ) {
847 printer << (isFirst ? " : " : ", ");
848 printer.printStrippedAttrOrType(opType);
849 }
850};
851} // namespace boolean
852} // namespace llzk
853MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::boolean::NotBoolOp)
854
855namespace llzk {
856namespace boolean {
857
858//===----------------------------------------------------------------------===//
859// ::llzk::boolean::OrBoolOp declarations
860//===----------------------------------------------------------------------===//
861
862namespace detail {
864public:
865protected:
866 ::mlir::DictionaryAttr odsAttrs;
867 ::std::optional<::mlir::OperationName> odsOpName;
868 ::mlir::RegionRange odsRegions;
869public:
870 OrBoolOpGenericAdaptorBase(::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), odsRegions(regions) { if (odsAttrs)
871 odsOpName.emplace("bool.or", odsAttrs.getContext());
872 }
873
874 OrBoolOpGenericAdaptorBase(::mlir::Operation *op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), odsRegions(op->getRegions()) {}
875
876 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
877 return {index, 1};
878 }
879
880 ::mlir::DictionaryAttr getAttributes() {
881 return odsAttrs;
882 }
883
884};
885} // namespace detail
886template <typename RangeT>
888 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
890public:
891 OrBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
892
893 OrBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : OrBoolOpGenericAdaptor(values, attrs, (properties ? *properties.as<::mlir::EmptyProperties *>() : ::mlir::EmptyProperties{}), regions) {}
894
895 OrBoolOpGenericAdaptor(RangeT values, const OrBoolOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
896
897 template <typename LateInst = OrBoolOp, typename = std::enable_if_t<std::is_same_v<LateInst, OrBoolOp>>>
898 OrBoolOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
899
900 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
901 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
902 }
903
904 RangeT getODSOperands(unsigned index) {
905 auto valueRange = getODSOperandIndexAndLength(index);
906 return {std::next(odsOperands.begin(), valueRange.first),
907 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
908 }
909
910 ValueT getLhs() {
911 return (*getODSOperands(0).begin());
912 }
913
914 ValueT getRhs() {
915 return (*getODSOperands(1).begin());
916 }
917
918 RangeT getOperands() {
919 return odsOperands;
920 }
921
922private:
923 RangeT odsOperands;
924};
925class OrBoolOpAdaptor : public OrBoolOpGenericAdaptor<::mlir::ValueRange> {
926public:
929
930 ::llvm::LogicalResult verify(::mlir::Location loc);
931};
932class OrBoolOp : public ::mlir::Op<OrBoolOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::llzk::function::NotFieldNative, ::mlir::OpTrait::OpInvariants, ::mlir::OpTrait::IsCommutative, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
933public:
934 using Op::Op;
935 using Op::print;
937 template <typename RangeT>
940 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
941 return {};
942 }
943
944 static constexpr ::llvm::StringLiteral getOperationName() {
945 return ::llvm::StringLiteral("bool.or");
946 }
947
948 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
949 return {index, 1};
950 }
951
952 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
953 auto valueRange = getODSOperandIndexAndLength(index);
954 return {std::next(getOperation()->operand_begin(), valueRange.first),
955 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
956 }
957
958 ::mlir::TypedValue<::mlir::Type> getLhs() {
959 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
960 }
961
962 ::mlir::TypedValue<::mlir::Type> getRhs() {
963 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
964 }
965
966 ::mlir::OpOperand &getLhsMutable() {
967 auto range = getODSOperandIndexAndLength(0);
968 return getOperation()->getOpOperand(range.first);
969 }
970
971 ::mlir::OpOperand &getRhsMutable() {
972 auto range = getODSOperandIndexAndLength(1);
973 return getOperation()->getOpOperand(range.first);
974 }
975
976 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
977 return {index, 1};
978 }
979
980 ::mlir::Operation::result_range getODSResults(unsigned index) {
981 auto valueRange = getODSResultIndexAndLength(index);
982 return {std::next(getOperation()->result_begin(), valueRange.first),
983 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
984 }
985
986 ::mlir::TypedValue<::mlir::IntegerType> getResult() {
987 return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
988 }
989
990 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
991 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs);
992 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
993 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
994 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
995 ::llvm::LogicalResult verifyInvariantsImpl();
996 ::llvm::LogicalResult verifyInvariants();
997 ::mlir::OpFoldResult fold(FoldAdaptor adaptor);
998 static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
999 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
1000 void print(::mlir::OpAsmPrinter &_odsPrinter);
1001 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
1002public:
1003 private:
1004 static ::mlir::ParseResult parseInferredOrParsedType(
1005 ::mlir::OpAsmParser &parser, ::mlir::Type &opType, bool isFirst
1006 ) {
1007 if (mlir::succeeded(isFirst ? parser.parseOptionalColon() : parser.parseOptionalComma())) {
1008 // If there is a comma, parse the `opType`
1009 mlir::Type type;
1010 if (parser.parseCustomTypeWithFallback(type)) {
1011 return mlir::failure();
1012 }
1013 opType = type;
1014 } else {
1015 // Otherwise, build the default type
1016 opType =
1017 parser.getBuilder().getIntegerType(1);
1018 }
1019 return mlir::success();
1020 }
1021
1022 static void printInferredOrParsedType(::mlir::OpAsmPrinter &printer,
1023 ::mlir::Operation *op, ::mlir::Type opType, bool isFirst
1024 ) {
1025 printer << (isFirst ? " : " : ", ");
1026 printer.printStrippedAttrOrType(opType);
1027 }
1028};
1029} // namespace boolean
1030} // namespace llzk
1031MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::boolean::OrBoolOp)
1032
1033namespace llzk {
1034namespace boolean {
1035
1036//===----------------------------------------------------------------------===//
1037// ::llzk::boolean::XorBoolOp declarations
1038//===----------------------------------------------------------------------===//
1039
1040namespace detail {
1042public:
1043protected:
1044 ::mlir::DictionaryAttr odsAttrs;
1045 ::std::optional<::mlir::OperationName> odsOpName;
1046 ::mlir::RegionRange odsRegions;
1047public:
1048 XorBoolOpGenericAdaptorBase(::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), odsRegions(regions) { if (odsAttrs)
1049 odsOpName.emplace("bool.xor", odsAttrs.getContext());
1050 }
1051
1052 XorBoolOpGenericAdaptorBase(::mlir::Operation *op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), odsRegions(op->getRegions()) {}
1053
1054 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
1055 return {index, 1};
1056 }
1057
1058 ::mlir::DictionaryAttr getAttributes() {
1059 return odsAttrs;
1060 }
1061
1062};
1063} // namespace detail
1064template <typename RangeT>
1066 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
1068public:
1069 XorBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
1070
1071 XorBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : XorBoolOpGenericAdaptor(values, attrs, (properties ? *properties.as<::mlir::EmptyProperties *>() : ::mlir::EmptyProperties{}), regions) {}
1072
1073 XorBoolOpGenericAdaptor(RangeT values, const XorBoolOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
1074
1075 template <typename LateInst = XorBoolOp, typename = std::enable_if_t<std::is_same_v<LateInst, XorBoolOp>>>
1076 XorBoolOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
1077
1078 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1079 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
1080 }
1081
1082 RangeT getODSOperands(unsigned index) {
1083 auto valueRange = getODSOperandIndexAndLength(index);
1084 return {std::next(odsOperands.begin(), valueRange.first),
1085 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
1086 }
1087
1088 ValueT getLhs() {
1089 return (*getODSOperands(0).begin());
1090 }
1091
1092 ValueT getRhs() {
1093 return (*getODSOperands(1).begin());
1094 }
1095
1096 RangeT getOperands() {
1097 return odsOperands;
1098 }
1099
1100private:
1101 RangeT odsOperands;
1102};
1103class XorBoolOpAdaptor : public XorBoolOpGenericAdaptor<::mlir::ValueRange> {
1104public:
1107
1108 ::llvm::LogicalResult verify(::mlir::Location loc);
1109};
1110class XorBoolOp : public ::mlir::Op<XorBoolOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::llzk::function::NotFieldNative, ::mlir::OpTrait::OpInvariants, ::mlir::OpTrait::IsCommutative, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
1111public:
1112 using Op::Op;
1113 using Op::print;
1115 template <typename RangeT>
1118 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
1119 return {};
1120 }
1121
1122 static constexpr ::llvm::StringLiteral getOperationName() {
1123 return ::llvm::StringLiteral("bool.xor");
1124 }
1125
1126 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1127 return {index, 1};
1128 }
1129
1130 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
1131 auto valueRange = getODSOperandIndexAndLength(index);
1132 return {std::next(getOperation()->operand_begin(), valueRange.first),
1133 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
1134 }
1135
1136 ::mlir::TypedValue<::mlir::Type> getLhs() {
1137 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
1138 }
1139
1140 ::mlir::TypedValue<::mlir::Type> getRhs() {
1141 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
1142 }
1143
1144 ::mlir::OpOperand &getLhsMutable() {
1145 auto range = getODSOperandIndexAndLength(0);
1146 return getOperation()->getOpOperand(range.first);
1147 }
1148
1149 ::mlir::OpOperand &getRhsMutable() {
1150 auto range = getODSOperandIndexAndLength(1);
1151 return getOperation()->getOpOperand(range.first);
1152 }
1153
1154 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
1155 return {index, 1};
1156 }
1157
1158 ::mlir::Operation::result_range getODSResults(unsigned index) {
1159 auto valueRange = getODSResultIndexAndLength(index);
1160 return {std::next(getOperation()->result_begin(), valueRange.first),
1161 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
1162 }
1163
1164 ::mlir::TypedValue<::mlir::IntegerType> getResult() {
1165 return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
1166 }
1167
1168 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
1169 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs);
1170 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
1171 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1172 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1173 ::llvm::LogicalResult verifyInvariantsImpl();
1174 ::llvm::LogicalResult verifyInvariants();
1175 ::mlir::OpFoldResult fold(FoldAdaptor adaptor);
1176 static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
1177 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
1178 void print(::mlir::OpAsmPrinter &_odsPrinter);
1179 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
1180public:
1181 private:
1182 static ::mlir::ParseResult parseInferredOrParsedType(
1183 ::mlir::OpAsmParser &parser, ::mlir::Type &opType, bool isFirst
1184 ) {
1185 if (mlir::succeeded(isFirst ? parser.parseOptionalColon() : parser.parseOptionalComma())) {
1186 // If there is a comma, parse the `opType`
1187 mlir::Type type;
1188 if (parser.parseCustomTypeWithFallback(type)) {
1189 return mlir::failure();
1190 }
1191 opType = type;
1192 } else {
1193 // Otherwise, build the default type
1194 opType =
1195 parser.getBuilder().getIntegerType(1);
1196 }
1197 return mlir::success();
1198 }
1199
1200 static void printInferredOrParsedType(::mlir::OpAsmPrinter &printer,
1201 ::mlir::Operation *op, ::mlir::Type opType, bool isFirst
1202 ) {
1203 printer << (isFirst ? " : " : ", ");
1204 printer.printStrippedAttrOrType(opType);
1205 }
1206};
1207} // namespace boolean
1208} // namespace llzk
1209MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::boolean::XorBoolOp)
1210
1211
1212#endif // GET_OP_CLASSES
1213
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:102
AndBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:79
AndBoolOpGenericAdaptor(RangeT values, const AndBoolOpGenericAdaptorBase &base)
Definition Ops.h.inc:83
AndBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:79
AndBoolOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:86
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:92
AndBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:81
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:88
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:140
::mlir::OpFoldResult fold(FoldAdaptor adaptor)
Definition Ops.cpp:66
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:106
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:168
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:260
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:193
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:127
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:248
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:146
::mlir::OpOperand & getLhsMutable()
Definition Ops.h.inc:154
AndBoolOpAdaptor Adaptor
Definition Ops.h.inc:124
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:205
AndBoolOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:126
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:150
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:197
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:136
::mlir::TypedValue<::mlir::IntegerType > getResult()
Definition Ops.h.inc:174
::mlir::OpOperand & getRhsMutable()
Definition Ops.h.inc:159
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:161
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:164
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:132
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:128
AssertOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:288
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:285
AssertOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:288
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:303
AssertOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:297
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:299
AssertOpGenericAdaptor(RangeT values, const AssertOpGenericAdaptorBase &base)
Definition Ops.h.inc:294
AssertOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:292
AssertOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:290
::mlir::TypedValue<::mlir::IntegerType > getCondition()
Definition Ops.h.inc:363
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:444
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:353
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:343
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition, ::mlir::StringAttr msg)
Definition Ops.cpp.inc:389
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:316
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:336
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:372
::mlir::StringAttr getMsgAttrName(::mlir::OperationName name)
Definition Ops.h.inc:345
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:363
::std::optional< ::llvm::StringRef > getMsg()
Definition Ops.cpp.inc:376
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:334
AssertOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:333
::mlir::StringAttr getMsgAttr()
Definition Ops.h.inc:391
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:349
void setMsg(::std::optional<::llvm::StringRef > attrValue)
Definition Ops.cpp.inc:381
void setMsgAttr(::mlir::StringAttr attr)
Definition Ops.h.inc:396
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:332
AssertOpAdaptor Adaptor
Definition Ops.h.inc:331
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:357
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:370
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:475
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:350
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:376
FoldAdaptor::Properties Properties
Definition Ops.h.inc:335
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:354
::mlir::OpOperand & getConditionMutable()
Definition Ops.h.inc:367
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:440
::mlir::Attribute removeMsgAttr()
Definition Ops.h.inc:401
::mlir::StringAttr getMsgAttrName()
Definition Ops.h.inc:341
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:423
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:293
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp:32
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:337
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:510
CmpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:501
CmpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:505
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:516
CmpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:501
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:512
CmpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:503
CmpOpGenericAdaptor(RangeT values, const CmpOpGenericAdaptorBase &base)
Definition Ops.h.inc:507
CmpOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:510
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:838
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::boolean::FeltCmpPredicateAttr predicate, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:610
::mlir::TypedValue<::llzk::felt::FeltType > getLhs()
Definition Ops.h.inc:580
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:598
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:576
::mlir::TypedValue<::mlir::IntegerType > getResult()
Definition Ops.h.inc:608
::mlir::StringAttr getPredicateAttrName()
Definition Ops.h.inc:558
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:566
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:602
CmpOpAdaptor Adaptor
Definition Ops.h.inc:548
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:754
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:766
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:563
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:551
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:542
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:570
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:580
::llzk::boolean::FeltCmpPredicate getPredicate()
Definition Ops.cpp.inc:601
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:719
::mlir::OpOperand & getRhsMutable()
Definition Ops.h.inc:593
void setPredicate(::llzk::boolean::FeltCmpPredicate attrValue)
Definition Ops.cpp.inc:606
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:553
::mlir::OpOperand & getLhsMutable()
Definition Ops.h.inc:588
::llzk::boolean::FeltCmpPredicateAttr getPredicateAttr()
Definition Ops.h.inc:621
CmpOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:550
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:758
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:574
FoldAdaptor::Properties Properties
Definition Ops.h.inc:552
void setPredicateAttr(::llzk::boolean::FeltCmpPredicateAttr attr)
Definition Ops.h.inc:626
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:823
::mlir::TypedValue<::llzk::felt::FeltType > getRhs()
Definition Ops.h.inc:584
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:596
::mlir::OpFoldResult fold(FoldAdaptor adaptor)
Definition Ops.cpp:135
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:558
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:569
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:589
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:519
::mlir::StringAttr getPredicateAttrName(::mlir::OperationName name)
Definition Ops.h.inc:562
NotBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:726
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:856
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:739
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:735
NotBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:726
NotBoolOpGenericAdaptor(RangeT values, const NotBoolOpGenericAdaptorBase &base)
Definition Ops.h.inc:730
NotBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:728
NotBoolOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:733
NotBoolOpAdaptor Adaptor
Definition Ops.h.inc:767
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:770
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:912
::mlir::TypedValue<::mlir::Type > getOperand()
Definition Ops.h.inc:789
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:974
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:948
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:936
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:982
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value operand)
Definition Ops.cpp.inc:860
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:771
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:775
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:798
NotBoolOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:769
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:940
::mlir::OpFoldResult fold(FoldAdaptor adaptor)
Definition Ops.cpp:105
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:783
::mlir::OpOperand & getOperandMutable()
Definition Ops.h.inc:793
::mlir::TypedValue<::mlir::IntegerType > getResult()
Definition Ops.h.inc:808
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:779
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:802
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1000
OrBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:891
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:904
OrBoolOpGenericAdaptor(RangeT values, const OrBoolOpGenericAdaptorBase &base)
Definition Ops.h.inc:895
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:900
OrBoolOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:898
OrBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:891
OrBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:893
OrBoolOpAdaptor Adaptor
Definition Ops.h.inc:936
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1059
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:952
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:939
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:1158
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1146
::mlir::OpFoldResult fold(FoldAdaptor adaptor)
Definition Ops.cpp:79
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:1095
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:958
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:1004
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:948
::mlir::OpOperand & getLhsMutable()
Definition Ops.h.inc:966
OrBoolOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:938
::mlir::OpOperand & getRhsMutable()
Definition Ops.h.inc:971
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1091
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1103
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:940
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:962
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:980
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:944
::mlir::TypedValue<::mlir::IntegerType > getResult()
Definition Ops.h.inc:986
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:976
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1176
XorBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1069
XorBoolOpGenericAdaptor(RangeT values, const XorBoolOpGenericAdaptorBase &base)
Definition Ops.h.inc:1073
XorBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1071
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1078
XorBoolOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:1076
XorBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1069
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:1082
::mlir::OpOperand & getLhsMutable()
Definition Ops.h.inc:1144
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:1117
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:1118
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1235
::mlir::TypedValue<::mlir::IntegerType > getResult()
Definition Ops.h.inc:1164
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1267
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1126
::mlir::OpOperand & getRhsMutable()
Definition Ops.h.inc:1149
XorBoolOpAdaptor Adaptor
Definition Ops.h.inc:1114
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:1154
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:1271
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1130
::mlir::OpFoldResult fold(FoldAdaptor adaptor)
Definition Ops.cpp:92
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:1158
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:1136
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1322
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:1140
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:1180
XorBoolOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:1116
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:1122
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:1334
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1279
AndBoolOpGenericAdaptorBase(::mlir::Operation *op)
Definition Ops.h.inc:62
AndBoolOpGenericAdaptorBase(::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:58
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:64
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:55
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:253
AssertOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:257
::std::optional< ::llvm::StringRef > getMsg()
Definition Ops.cpp.inc:277
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:263
::llzk::boolean::FeltCmpPredicateAttr getPredicateAttr()
Definition Ops.h.inc:488
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:466
CmpOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:470
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:476
::llzk::boolean::FeltCmpPredicate getPredicate()
Definition Ops.cpp.inc:502
NotBoolOpGenericAdaptorBase(::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:705
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:702
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:711
OrBoolOpGenericAdaptorBase(::mlir::Operation *op)
Definition Ops.h.inc:874
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:876
OrBoolOpGenericAdaptorBase(::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:870
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:867
XorBoolOpGenericAdaptorBase(::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1048
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:1054
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:1045
static FeltType get(::mlir::MLIRContext *context, ::mlir::StringAttr fieldName)
Definition Types.cpp.inc:67
void setMsg(const ::mlir::StringAttr &propValue)
Definition Ops.h.inc:239
::llzk::boolean::FeltCmpPredicateAttr predicateTy
Definition Ops.h.inc:445
void setPredicate(const ::llzk::boolean::FeltCmpPredicateAttr &propValue)
Definition Ops.h.inc:452