LLZK 0.1.0
Veridise's ZK Language IR
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::WitnessGen, ::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 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);
186 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
187 void print(::mlir::OpAsmPrinter &_odsPrinter);
188 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
189public:
190 static ::mlir::ParseResult parseInferredOrParsedType(
191 ::mlir::OpAsmParser &parser, ::mlir::Type &opType, bool isFirst
192 ) {
193 if (mlir::succeeded(isFirst ? parser.parseOptionalColon() : parser.parseOptionalComma())) {
194 // If there is a comma, parse the `opType`
195 mlir::Type type;
196 if (parser.parseCustomTypeWithFallback(type)) {
197 return mlir::failure();
198 }
199 opType = type;
200 } else {
201 // Otherwise, build the default type
202 opType =
203 parser.getBuilder().getIntegerType(1);
204 }
205 return mlir::success();
206 }
207
208 static void printInferredOrParsedType(::mlir::OpAsmPrinter &printer,
209 ::mlir::Operation *op, ::mlir::Type opType, bool isFirst
210 ) {
211 printer << (isFirst ? " : " : ", ");
212 printer.printStrippedAttrOrType(opType);
213 }
214};
215} // namespace boolean
216} // namespace llzk
217MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::boolean::AndBoolOp)
218
219namespace llzk {
220namespace boolean {
221
222//===----------------------------------------------------------------------===//
223// ::llzk::boolean::AssertOp declarations
224//===----------------------------------------------------------------------===//
225
226namespace detail {
228public:
229 struct Properties {
230 using msgTy = ::mlir::StringAttr;
232
233 auto getMsg() {
234 auto &propStorage = this->msg;
235 return ::llvm::dyn_cast_or_null<::mlir::StringAttr>(propStorage);
236 }
237 void setMsg(const ::mlir::StringAttr &propValue) {
238 this->msg = propValue;
239 }
240 bool operator==(const Properties &rhs) const {
241 return
242 rhs.msg == this->msg &&
243 true;
244 }
245 bool operator!=(const Properties &rhs) const {
246 return !(*this == rhs);
247 }
248 };
249protected:
250 ::mlir::DictionaryAttr odsAttrs;
251 ::std::optional<::mlir::OperationName> odsOpName;
253 ::mlir::RegionRange odsRegions;
254public:
255 AssertOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
256 odsOpName.emplace("bool.assert", odsAttrs.getContext());
257 }
258
260
261 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
262 return {index, 1};
263 }
264
266 return properties;
267 }
268
269 ::mlir::DictionaryAttr getAttributes() {
270 return odsAttrs;
271 }
272
273 ::mlir::StringAttr getMsgAttr() {
274 auto attr = ::llvm::dyn_cast_or_null<::mlir::StringAttr>(getProperties().msg);
275 return attr;
276 }
277
278 ::std::optional< ::llvm::StringRef > getMsg();
279};
280} // namespace detail
281template <typename RangeT>
283 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
285public:
286 AssertOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
287
288 AssertOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : AssertOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
289
290 AssertOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : AssertOpGenericAdaptor(values, attrs, Properties{}, {}) {}
291
292 AssertOpGenericAdaptor(RangeT values, const AssertOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
293
294 template <typename LateInst = AssertOp, typename = std::enable_if_t<std::is_same_v<LateInst, AssertOp>>>
295 AssertOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
296
297 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
298 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
299 }
300
301 RangeT getODSOperands(unsigned index) {
302 auto valueRange = getODSOperandIndexAndLength(index);
303 return {std::next(odsOperands.begin(), valueRange.first),
304 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
305 }
306
307 ValueT getCondition() {
308 return (*getODSOperands(0).begin());
309 }
310
311 RangeT getOperands() {
312 return odsOperands;
313 }
314
315private:
316 RangeT odsOperands;
317};
318class AssertOpAdaptor : public AssertOpGenericAdaptor<::mlir::ValueRange> {
319public:
322
323 ::llvm::LogicalResult verify(::mlir::Location loc);
324};
325class 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> {
326public:
327 using Op::Op;
328 using Op::print;
330 template <typename RangeT>
334 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
335 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("msg")};
336 return ::llvm::ArrayRef(attrNames);
337 }
338
339 ::mlir::StringAttr getMsgAttrName() {
340 return getAttributeNameForIndex(0);
341 }
342
343 static ::mlir::StringAttr getMsgAttrName(::mlir::OperationName name) {
344 return getAttributeNameForIndex(name, 0);
345 }
346
347 static constexpr ::llvm::StringLiteral getOperationName() {
348 return ::llvm::StringLiteral("bool.assert");
349 }
350
351 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
352 return {index, 1};
353 }
354
355 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
356 auto valueRange = getODSOperandIndexAndLength(index);
357 return {std::next(getOperation()->operand_begin(), valueRange.first),
358 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
359 }
360
361 ::mlir::TypedValue<::mlir::IntegerType> getCondition() {
362 return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(0).begin());
363 }
364
365 ::mlir::OpOperand &getConditionMutable() {
366 auto range = getODSOperandIndexAndLength(0);
367 return getOperation()->getOpOperand(range.first);
368 }
369
370 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
371 return {index, 1};
372 }
373
374 ::mlir::Operation::result_range getODSResults(unsigned index) {
375 auto valueRange = getODSResultIndexAndLength(index);
376 return {std::next(getOperation()->result_begin(), valueRange.first),
377 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
378 }
379
380 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
381 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
382 static llvm::hash_code computePropertiesHash(const Properties &prop);
383 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
384 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
385 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
386 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
387 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
388 void writeProperties(::mlir::DialectBytecodeWriter &writer);
389 ::mlir::StringAttr getMsgAttr() {
390 return ::llvm::dyn_cast_or_null<::mlir::StringAttr>(getProperties().msg);
391 }
392
393 ::std::optional< ::llvm::StringRef > getMsg();
394 void setMsgAttr(::mlir::StringAttr attr) {
395 getProperties().msg = attr;
396 }
397
398 void setMsg(::std::optional<::llvm::StringRef> attrValue);
399 ::mlir::Attribute removeMsgAttr() {
400 auto &attr = getProperties().msg;
401 attr = {};
402 return attr;
403 }
404
405 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition, /*optional*/::mlir::StringAttr msg);
406 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition, /*optional*/::mlir::StringAttr msg);
407 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
408 ::llvm::LogicalResult verifyInvariantsImpl();
409 ::llvm::LogicalResult verifyInvariants();
410 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
411 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
412 void print(::mlir::OpAsmPrinter &_odsPrinter);
413private:
414 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
415 return getAttributeNameForIndex((*this)->getName(), index);
416 }
417
418 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
419 assert(index < 1 && "invalid attribute index");
420 assert(name.getStringRef() == getOperationName() && "invalid operation name");
421 assert(name.isRegistered() && "Operation isn't registered, missing a "
422 "dependent dialect loading?");
423 return name.getAttributeNames()[index];
424 }
425
426public:
427};
428} // namespace boolean
429} // namespace llzk
430MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::boolean::AssertOp)
431
432namespace llzk {
433namespace boolean {
434
435//===----------------------------------------------------------------------===//
436// ::llzk::boolean::CmpOp declarations
437//===----------------------------------------------------------------------===//
438
439namespace detail {
441public:
442 struct Properties {
443 using predicateTy = ::llzk::boolean::FeltCmpPredicateAttr;
445
447 auto &propStorage = this->predicate;
448 return ::llvm::cast<::llzk::boolean::FeltCmpPredicateAttr>(propStorage);
449 }
450 void setPredicate(const ::llzk::boolean::FeltCmpPredicateAttr &propValue) {
451 this->predicate = propValue;
452 }
453 bool operator==(const Properties &rhs) const {
454 return
455 rhs.predicate == this->predicate &&
456 true;
457 }
458 bool operator!=(const Properties &rhs) const {
459 return !(*this == rhs);
460 }
461 };
462protected:
463 ::mlir::DictionaryAttr odsAttrs;
464 ::std::optional<::mlir::OperationName> odsOpName;
466 ::mlir::RegionRange odsRegions;
467public:
468 CmpOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
469 odsOpName.emplace("bool.cmp", odsAttrs.getContext());
470 }
471
473
474 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
475 return {index, 1};
476 }
477
479 return properties;
480 }
481
482 ::mlir::DictionaryAttr getAttributes() {
483 return odsAttrs;
484 }
485
486 ::llzk::boolean::FeltCmpPredicateAttr getPredicateAttr() {
487 auto attr = ::llvm::cast<::llzk::boolean::FeltCmpPredicateAttr>(getProperties().predicate);
488 return attr;
489 }
490
492};
493} // namespace detail
494template <typename RangeT>
496 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
498public:
499 CmpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
500
501 CmpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : CmpOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
502
503 CmpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : CmpOpGenericAdaptor(values, attrs, Properties{}, {}) {}
504
505 CmpOpGenericAdaptor(RangeT values, const CmpOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
506
507 template <typename LateInst = CmpOp, typename = std::enable_if_t<std::is_same_v<LateInst, CmpOp>>>
508 CmpOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
509
510 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
511 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
512 }
513
514 RangeT getODSOperands(unsigned index) {
515 auto valueRange = getODSOperandIndexAndLength(index);
516 return {std::next(odsOperands.begin(), valueRange.first),
517 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
518 }
519
520 ValueT getLhs() {
521 return (*getODSOperands(0).begin());
522 }
523
524 ValueT getRhs() {
525 return (*getODSOperands(1).begin());
526 }
527
528 RangeT getOperands() {
529 return odsOperands;
530 }
531
532private:
533 RangeT odsOperands;
534};
535class CmpOpAdaptor : public CmpOpGenericAdaptor<::mlir::ValueRange> {
536public:
539
540 ::llvm::LogicalResult verify(::mlir::Location loc);
541};
542class 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> {
543public:
544 using Op::Op;
545 using Op::print;
547 template <typename RangeT>
551 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
552 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("predicate")};
553 return ::llvm::ArrayRef(attrNames);
554 }
555
556 ::mlir::StringAttr getPredicateAttrName() {
557 return getAttributeNameForIndex(0);
558 }
559
560 static ::mlir::StringAttr getPredicateAttrName(::mlir::OperationName name) {
561 return getAttributeNameForIndex(name, 0);
562 }
563
564 static constexpr ::llvm::StringLiteral getOperationName() {
565 return ::llvm::StringLiteral("bool.cmp");
566 }
567
568 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
569 return {index, 1};
570 }
571
572 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
573 auto valueRange = getODSOperandIndexAndLength(index);
574 return {std::next(getOperation()->operand_begin(), valueRange.first),
575 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
576 }
577
578 ::mlir::TypedValue<::llzk::felt::FeltType> getLhs() {
579 return ::llvm::cast<::mlir::TypedValue<::llzk::felt::FeltType>>(*getODSOperands(0).begin());
580 }
581
582 ::mlir::TypedValue<::llzk::felt::FeltType> getRhs() {
583 return ::llvm::cast<::mlir::TypedValue<::llzk::felt::FeltType>>(*getODSOperands(1).begin());
584 }
585
586 ::mlir::OpOperand &getLhsMutable() {
587 auto range = getODSOperandIndexAndLength(0);
588 return getOperation()->getOpOperand(range.first);
589 }
590
591 ::mlir::OpOperand &getRhsMutable() {
592 auto range = getODSOperandIndexAndLength(1);
593 return getOperation()->getOpOperand(range.first);
594 }
595
596 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
597 return {index, 1};
598 }
599
600 ::mlir::Operation::result_range getODSResults(unsigned index) {
601 auto valueRange = getODSResultIndexAndLength(index);
602 return {std::next(getOperation()->result_begin(), valueRange.first),
603 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
604 }
605
606 ::mlir::TypedValue<::mlir::IntegerType> getResult() {
607 return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
608 }
609
610 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
611 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
612 static llvm::hash_code computePropertiesHash(const Properties &prop);
613 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
614 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
615 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
616 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
617 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
618 void writeProperties(::mlir::DialectBytecodeWriter &writer);
619 ::llzk::boolean::FeltCmpPredicateAttr getPredicateAttr() {
620 return ::llvm::cast<::llzk::boolean::FeltCmpPredicateAttr>(getProperties().predicate);
621 }
622
624 void setPredicateAttr(::llzk::boolean::FeltCmpPredicateAttr attr) {
625 getProperties().predicate = attr;
626 }
627
629 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::boolean::FeltCmpPredicateAttr predicate, ::mlir::Value lhs, ::mlir::Value rhs);
630 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::boolean::FeltCmpPredicateAttr predicate, ::mlir::Value lhs, ::mlir::Value rhs);
631 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llzk::boolean::FeltCmpPredicateAttr predicate, ::mlir::Value lhs, ::mlir::Value rhs);
632 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::boolean::FeltCmpPredicate predicate, ::mlir::Value lhs, ::mlir::Value rhs);
633 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::boolean::FeltCmpPredicate predicate, ::mlir::Value lhs, ::mlir::Value rhs);
634 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llzk::boolean::FeltCmpPredicate predicate, ::mlir::Value lhs, ::mlir::Value rhs);
635 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
636 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
637 ::llvm::LogicalResult verifyInvariantsImpl();
638 ::llvm::LogicalResult verifyInvariants();
639 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);
640 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
641 void print(::mlir::OpAsmPrinter &_odsPrinter);
642 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
643private:
644 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
645 return getAttributeNameForIndex((*this)->getName(), index);
646 }
647
648 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
649 assert(index < 1 && "invalid attribute index");
650 assert(name.getStringRef() == getOperationName() && "invalid operation name");
651 assert(name.isRegistered() && "Operation isn't registered, missing a "
652 "dependent dialect loading?");
653 return name.getAttributeNames()[index];
654 }
655
656public:
657};
658} // namespace boolean
659} // namespace llzk
660MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::boolean::CmpOp)
661
662namespace llzk {
663namespace boolean {
664
665//===----------------------------------------------------------------------===//
666// ::llzk::boolean::NotBoolOp declarations
667//===----------------------------------------------------------------------===//
668
669namespace detail {
671public:
672protected:
673 ::mlir::DictionaryAttr odsAttrs;
674 ::std::optional<::mlir::OperationName> odsOpName;
675 ::mlir::RegionRange odsRegions;
676public:
677 NotBoolOpGenericAdaptorBase(::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), odsRegions(regions) { if (odsAttrs)
678 odsOpName.emplace("bool.not", odsAttrs.getContext());
679 }
680
681 NotBoolOpGenericAdaptorBase(::mlir::Operation *op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), odsRegions(op->getRegions()) {}
682
683 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
684 return {index, 1};
685 }
686
687 ::mlir::DictionaryAttr getAttributes() {
688 return odsAttrs;
689 }
690
691};
692} // namespace detail
693template <typename RangeT>
695 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
697public:
698 NotBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
699
700 NotBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : NotBoolOpGenericAdaptor(values, attrs, (properties ? *properties.as<::mlir::EmptyProperties *>() : ::mlir::EmptyProperties{}), regions) {}
701
702 NotBoolOpGenericAdaptor(RangeT values, const NotBoolOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
703
704 template <typename LateInst = NotBoolOp, typename = std::enable_if_t<std::is_same_v<LateInst, NotBoolOp>>>
705 NotBoolOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
706
707 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
708 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
709 }
710
711 RangeT getODSOperands(unsigned index) {
712 auto valueRange = getODSOperandIndexAndLength(index);
713 return {std::next(odsOperands.begin(), valueRange.first),
714 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
715 }
716
717 ValueT getOperand() {
718 return (*getODSOperands(0).begin());
719 }
720
721 RangeT getOperands() {
722 return odsOperands;
723 }
724
725private:
726 RangeT odsOperands;
727};
728class NotBoolOpAdaptor : public NotBoolOpGenericAdaptor<::mlir::ValueRange> {
729public:
732
733 ::llvm::LogicalResult verify(::mlir::Location loc);
734};
735class 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::WitnessGen, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
736public:
737 using Op::Op;
738 using Op::print;
740 template <typename RangeT>
743 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
744 return {};
745 }
746
747 static constexpr ::llvm::StringLiteral getOperationName() {
748 return ::llvm::StringLiteral("bool.not");
749 }
750
751 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
752 return {index, 1};
753 }
754
755 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
756 auto valueRange = getODSOperandIndexAndLength(index);
757 return {std::next(getOperation()->operand_begin(), valueRange.first),
758 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
759 }
760
761 ::mlir::TypedValue<::mlir::Type> getOperand() {
762 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
763 }
764
765 ::mlir::OpOperand &getOperandMutable() {
766 auto range = getODSOperandIndexAndLength(0);
767 return getOperation()->getOpOperand(range.first);
768 }
769
770 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
771 return {index, 1};
772 }
773
774 ::mlir::Operation::result_range getODSResults(unsigned index) {
775 auto valueRange = getODSResultIndexAndLength(index);
776 return {std::next(getOperation()->result_begin(), valueRange.first),
777 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
778 }
779
780 ::mlir::TypedValue<::mlir::IntegerType> getResult() {
781 return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
782 }
783
784 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value operand);
785 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value operand);
786 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value operand);
787 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
788 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
789 ::llvm::LogicalResult verifyInvariantsImpl();
790 ::llvm::LogicalResult verifyInvariants();
791 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);
792 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
793 void print(::mlir::OpAsmPrinter &_odsPrinter);
794 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
795public:
796 static ::mlir::ParseResult parseInferredOrParsedType(
797 ::mlir::OpAsmParser &parser, ::mlir::Type &opType, bool isFirst
798 ) {
799 if (mlir::succeeded(isFirst ? parser.parseOptionalColon() : parser.parseOptionalComma())) {
800 // If there is a comma, parse the `opType`
801 mlir::Type type;
802 if (parser.parseCustomTypeWithFallback(type)) {
803 return mlir::failure();
804 }
805 opType = type;
806 } else {
807 // Otherwise, build the default type
808 opType =
809 parser.getBuilder().getIntegerType(1);
810 }
811 return mlir::success();
812 }
813
814 static void printInferredOrParsedType(::mlir::OpAsmPrinter &printer,
815 ::mlir::Operation *op, ::mlir::Type opType, bool isFirst
816 ) {
817 printer << (isFirst ? " : " : ", ");
818 printer.printStrippedAttrOrType(opType);
819 }
820};
821} // namespace boolean
822} // namespace llzk
823MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::boolean::NotBoolOp)
824
825namespace llzk {
826namespace boolean {
827
828//===----------------------------------------------------------------------===//
829// ::llzk::boolean::OrBoolOp declarations
830//===----------------------------------------------------------------------===//
831
832namespace detail {
834public:
835protected:
836 ::mlir::DictionaryAttr odsAttrs;
837 ::std::optional<::mlir::OperationName> odsOpName;
838 ::mlir::RegionRange odsRegions;
839public:
840 OrBoolOpGenericAdaptorBase(::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), odsRegions(regions) { if (odsAttrs)
841 odsOpName.emplace("bool.or", odsAttrs.getContext());
842 }
843
844 OrBoolOpGenericAdaptorBase(::mlir::Operation *op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), odsRegions(op->getRegions()) {}
845
846 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
847 return {index, 1};
848 }
849
850 ::mlir::DictionaryAttr getAttributes() {
851 return odsAttrs;
852 }
853
854};
855} // namespace detail
856template <typename RangeT>
858 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
860public:
861 OrBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
862
863 OrBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : OrBoolOpGenericAdaptor(values, attrs, (properties ? *properties.as<::mlir::EmptyProperties *>() : ::mlir::EmptyProperties{}), regions) {}
864
865 OrBoolOpGenericAdaptor(RangeT values, const OrBoolOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
866
867 template <typename LateInst = OrBoolOp, typename = std::enable_if_t<std::is_same_v<LateInst, OrBoolOp>>>
868 OrBoolOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
869
870 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
871 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
872 }
873
874 RangeT getODSOperands(unsigned index) {
875 auto valueRange = getODSOperandIndexAndLength(index);
876 return {std::next(odsOperands.begin(), valueRange.first),
877 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
878 }
879
880 ValueT getLhs() {
881 return (*getODSOperands(0).begin());
882 }
883
884 ValueT getRhs() {
885 return (*getODSOperands(1).begin());
886 }
887
888 RangeT getOperands() {
889 return odsOperands;
890 }
891
892private:
893 RangeT odsOperands;
894};
895class OrBoolOpAdaptor : public OrBoolOpGenericAdaptor<::mlir::ValueRange> {
896public:
899
900 ::llvm::LogicalResult verify(::mlir::Location loc);
901};
902class 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::WitnessGen, ::mlir::OpTrait::OpInvariants, ::mlir::OpTrait::IsCommutative, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
903public:
904 using Op::Op;
905 using Op::print;
907 template <typename RangeT>
910 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
911 return {};
912 }
913
914 static constexpr ::llvm::StringLiteral getOperationName() {
915 return ::llvm::StringLiteral("bool.or");
916 }
917
918 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
919 return {index, 1};
920 }
921
922 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
923 auto valueRange = getODSOperandIndexAndLength(index);
924 return {std::next(getOperation()->operand_begin(), valueRange.first),
925 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
926 }
927
928 ::mlir::TypedValue<::mlir::Type> getLhs() {
929 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
930 }
931
932 ::mlir::TypedValue<::mlir::Type> getRhs() {
933 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
934 }
935
936 ::mlir::OpOperand &getLhsMutable() {
937 auto range = getODSOperandIndexAndLength(0);
938 return getOperation()->getOpOperand(range.first);
939 }
940
941 ::mlir::OpOperand &getRhsMutable() {
942 auto range = getODSOperandIndexAndLength(1);
943 return getOperation()->getOpOperand(range.first);
944 }
945
946 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
947 return {index, 1};
948 }
949
950 ::mlir::Operation::result_range getODSResults(unsigned index) {
951 auto valueRange = getODSResultIndexAndLength(index);
952 return {std::next(getOperation()->result_begin(), valueRange.first),
953 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
954 }
955
956 ::mlir::TypedValue<::mlir::IntegerType> getResult() {
957 return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
958 }
959
960 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
961 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs);
962 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
963 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
964 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
965 ::llvm::LogicalResult verifyInvariantsImpl();
966 ::llvm::LogicalResult verifyInvariants();
967 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);
968 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
969 void print(::mlir::OpAsmPrinter &_odsPrinter);
970 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
971public:
972 static ::mlir::ParseResult parseInferredOrParsedType(
973 ::mlir::OpAsmParser &parser, ::mlir::Type &opType, bool isFirst
974 ) {
975 if (mlir::succeeded(isFirst ? parser.parseOptionalColon() : parser.parseOptionalComma())) {
976 // If there is a comma, parse the `opType`
977 mlir::Type type;
978 if (parser.parseCustomTypeWithFallback(type)) {
979 return mlir::failure();
980 }
981 opType = type;
982 } else {
983 // Otherwise, build the default type
984 opType =
985 parser.getBuilder().getIntegerType(1);
986 }
987 return mlir::success();
988 }
989
990 static void printInferredOrParsedType(::mlir::OpAsmPrinter &printer,
991 ::mlir::Operation *op, ::mlir::Type opType, bool isFirst
992 ) {
993 printer << (isFirst ? " : " : ", ");
994 printer.printStrippedAttrOrType(opType);
995 }
996};
997} // namespace boolean
998} // namespace llzk
999MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::boolean::OrBoolOp)
1000
1001namespace llzk {
1002namespace boolean {
1003
1004//===----------------------------------------------------------------------===//
1005// ::llzk::boolean::XorBoolOp declarations
1006//===----------------------------------------------------------------------===//
1007
1008namespace detail {
1010public:
1011protected:
1012 ::mlir::DictionaryAttr odsAttrs;
1013 ::std::optional<::mlir::OperationName> odsOpName;
1014 ::mlir::RegionRange odsRegions;
1015public:
1016 XorBoolOpGenericAdaptorBase(::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), odsRegions(regions) { if (odsAttrs)
1017 odsOpName.emplace("bool.xor", odsAttrs.getContext());
1018 }
1019
1020 XorBoolOpGenericAdaptorBase(::mlir::Operation *op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), odsRegions(op->getRegions()) {}
1021
1022 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
1023 return {index, 1};
1024 }
1025
1026 ::mlir::DictionaryAttr getAttributes() {
1027 return odsAttrs;
1028 }
1029
1030};
1031} // namespace detail
1032template <typename RangeT>
1034 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
1036public:
1037 XorBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
1038
1039 XorBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : XorBoolOpGenericAdaptor(values, attrs, (properties ? *properties.as<::mlir::EmptyProperties *>() : ::mlir::EmptyProperties{}), regions) {}
1040
1041 XorBoolOpGenericAdaptor(RangeT values, const XorBoolOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
1042
1043 template <typename LateInst = XorBoolOp, typename = std::enable_if_t<std::is_same_v<LateInst, XorBoolOp>>>
1044 XorBoolOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
1045
1046 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1047 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
1048 }
1049
1050 RangeT getODSOperands(unsigned index) {
1051 auto valueRange = getODSOperandIndexAndLength(index);
1052 return {std::next(odsOperands.begin(), valueRange.first),
1053 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
1054 }
1055
1056 ValueT getLhs() {
1057 return (*getODSOperands(0).begin());
1058 }
1059
1060 ValueT getRhs() {
1061 return (*getODSOperands(1).begin());
1062 }
1063
1064 RangeT getOperands() {
1065 return odsOperands;
1066 }
1067
1068private:
1069 RangeT odsOperands;
1070};
1071class XorBoolOpAdaptor : public XorBoolOpGenericAdaptor<::mlir::ValueRange> {
1072public:
1075
1076 ::llvm::LogicalResult verify(::mlir::Location loc);
1077};
1078class 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::WitnessGen, ::mlir::OpTrait::OpInvariants, ::mlir::OpTrait::IsCommutative, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
1079public:
1080 using Op::Op;
1081 using Op::print;
1083 template <typename RangeT>
1086 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
1087 return {};
1088 }
1089
1090 static constexpr ::llvm::StringLiteral getOperationName() {
1091 return ::llvm::StringLiteral("bool.xor");
1092 }
1093
1094 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1095 return {index, 1};
1096 }
1097
1098 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
1099 auto valueRange = getODSOperandIndexAndLength(index);
1100 return {std::next(getOperation()->operand_begin(), valueRange.first),
1101 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
1102 }
1103
1104 ::mlir::TypedValue<::mlir::Type> getLhs() {
1105 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
1106 }
1107
1108 ::mlir::TypedValue<::mlir::Type> getRhs() {
1109 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
1110 }
1111
1112 ::mlir::OpOperand &getLhsMutable() {
1113 auto range = getODSOperandIndexAndLength(0);
1114 return getOperation()->getOpOperand(range.first);
1115 }
1116
1117 ::mlir::OpOperand &getRhsMutable() {
1118 auto range = getODSOperandIndexAndLength(1);
1119 return getOperation()->getOpOperand(range.first);
1120 }
1121
1122 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
1123 return {index, 1};
1124 }
1125
1126 ::mlir::Operation::result_range getODSResults(unsigned index) {
1127 auto valueRange = getODSResultIndexAndLength(index);
1128 return {std::next(getOperation()->result_begin(), valueRange.first),
1129 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
1130 }
1131
1132 ::mlir::TypedValue<::mlir::IntegerType> getResult() {
1133 return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
1134 }
1135
1136 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs);
1137 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs);
1138 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs);
1139 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1140 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1141 ::llvm::LogicalResult verifyInvariantsImpl();
1142 ::llvm::LogicalResult verifyInvariants();
1143 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);
1144 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
1145 void print(::mlir::OpAsmPrinter &_odsPrinter);
1146 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
1147public:
1148 static ::mlir::ParseResult parseInferredOrParsedType(
1149 ::mlir::OpAsmParser &parser, ::mlir::Type &opType, bool isFirst
1150 ) {
1151 if (mlir::succeeded(isFirst ? parser.parseOptionalColon() : parser.parseOptionalComma())) {
1152 // If there is a comma, parse the `opType`
1153 mlir::Type type;
1154 if (parser.parseCustomTypeWithFallback(type)) {
1155 return mlir::failure();
1156 }
1157 opType = type;
1158 } else {
1159 // Otherwise, build the default type
1160 opType =
1161 parser.getBuilder().getIntegerType(1);
1162 }
1163 return mlir::success();
1164 }
1165
1166 static void printInferredOrParsedType(::mlir::OpAsmPrinter &printer,
1167 ::mlir::Operation *op, ::mlir::Type opType, bool isFirst
1168 ) {
1169 printer << (isFirst ? " : " : ", ");
1170 printer.printStrippedAttrOrType(opType);
1171 }
1172};
1173} // namespace boolean
1174} // namespace llzk
1175MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::boolean::XorBoolOp)
1176
1177
1178#endif // GET_OP_CLASSES
1179
MlirStringRef name
Definition Poly.cpp:48
::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
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
::mlir::ParseResult parseInferredOrParsedType(::mlir::OpAsmParser &parser, ::mlir::Type &opType, bool isFirst)
Definition Ops.h.inc:190
::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
static void printInferredOrParsedType(::mlir::OpAsmPrinter &printer, ::mlir::Operation *op, ::mlir::Type opType, bool isFirst)
Definition Ops.h.inc:208
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:286
::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:286
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:301
AssertOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:295
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:297
AssertOpGenericAdaptor(RangeT values, const AssertOpGenericAdaptorBase &base)
Definition Ops.h.inc:292
AssertOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:290
AssertOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:288
::mlir::TypedValue<::mlir::IntegerType > getCondition()
Definition Ops.h.inc:361
::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:351
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:334
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:370
::mlir::StringAttr getMsgAttrName(::mlir::OperationName name)
Definition Ops.h.inc:343
::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:332
AssertOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:331
::mlir::StringAttr getMsgAttr()
Definition Ops.h.inc:389
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:347
void setMsg(::std::optional<::llvm::StringRef > attrValue)
Definition Ops.cpp.inc:381
void setMsgAttr(::mlir::StringAttr attr)
Definition Ops.h.inc:394
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:332
AssertOpAdaptor Adaptor
Definition Ops.h.inc:329
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:355
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:374
FoldAdaptor::Properties Properties
Definition Ops.h.inc:333
::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:365
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:440
::mlir::Attribute removeMsgAttr()
Definition Ops.h.inc:399
::mlir::StringAttr getMsgAttrName()
Definition Ops.h.inc:339
::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:28
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:499
CmpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:503
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:514
CmpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:499
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:510
CmpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:501
CmpOpGenericAdaptor(RangeT values, const CmpOpGenericAdaptorBase &base)
Definition Ops.h.inc:505
CmpOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:508
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:823
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:578
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:596
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:606
::mlir::StringAttr getPredicateAttrName()
Definition Ops.h.inc:556
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:564
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:600
CmpOpAdaptor Adaptor
Definition Ops.h.inc:546
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:752
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:764
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:549
::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:568
::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:591
void setPredicate(::llzk::boolean::FeltCmpPredicate attrValue)
Definition Ops.cpp.inc:606
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:551
::mlir::OpOperand & getLhsMutable()
Definition Ops.h.inc:586
::llzk::boolean::FeltCmpPredicateAttr getPredicateAttr()
Definition Ops.h.inc:619
CmpOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:548
::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:756
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:572
FoldAdaptor::Properties Properties
Definition Ops.h.inc:550
void setPredicateAttr(::llzk::boolean::FeltCmpPredicateAttr attr)
Definition Ops.h.inc:624
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:810
::mlir::TypedValue<::llzk::felt::FeltType > getRhs()
Definition Ops.h.inc:582
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:596
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:560
NotBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:698
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:841
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:711
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:707
NotBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:698
NotBoolOpGenericAdaptor(RangeT values, const NotBoolOpGenericAdaptorBase &base)
Definition Ops.h.inc:702
NotBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:700
NotBoolOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:705
NotBoolOpAdaptor Adaptor
Definition Ops.h.inc:739
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:742
static void printInferredOrParsedType(::mlir::OpAsmPrinter &printer, ::mlir::Operation *op, ::mlir::Type opType, bool isFirst)
Definition Ops.h.inc:814
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:897
::mlir::TypedValue<::mlir::Type > getOperand()
Definition Ops.h.inc:761
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:959
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:933
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:921
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:967
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value operand)
Definition Ops.cpp.inc:845
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:743
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:747
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:770
::mlir::ParseResult parseInferredOrParsedType(::mlir::OpAsmParser &parser, ::mlir::Type &opType, bool isFirst)
Definition Ops.h.inc:796
NotBoolOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:741
::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:925
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:755
::mlir::OpOperand & getOperandMutable()
Definition Ops.h.inc:765
::mlir::TypedValue<::mlir::IntegerType > getResult()
Definition Ops.h.inc:780
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:751
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:774
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:985
OrBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:861
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:874
OrBoolOpGenericAdaptor(RangeT values, const OrBoolOpGenericAdaptorBase &base)
Definition Ops.h.inc:865
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:870
OrBoolOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:868
OrBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:861
OrBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:863
OrBoolOpAdaptor Adaptor
Definition Ops.h.inc:906
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1044
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:922
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:909
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:1143
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1131
static void printInferredOrParsedType(::mlir::OpAsmPrinter &printer, ::mlir::Operation *op, ::mlir::Type opType, bool isFirst)
Definition Ops.h.inc:990
::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:1080
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:928
::mlir::ParseResult parseInferredOrParsedType(::mlir::OpAsmParser &parser, ::mlir::Type &opType, bool isFirst)
Definition Ops.h.inc:972
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:989
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:918
::mlir::OpOperand & getLhsMutable()
Definition Ops.h.inc:936
OrBoolOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:908
::mlir::OpOperand & getRhsMutable()
Definition Ops.h.inc:941
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1076
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1088
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:910
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:932
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:950
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:914
::mlir::TypedValue<::mlir::IntegerType > getResult()
Definition Ops.h.inc:956
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:946
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1161
XorBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1037
XorBoolOpGenericAdaptor(RangeT values, const XorBoolOpGenericAdaptorBase &base)
Definition Ops.h.inc:1041
XorBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1039
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1046
XorBoolOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:1044
XorBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1037
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:1050
::mlir::OpOperand & getLhsMutable()
Definition Ops.h.inc:1112
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:1085
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:1086
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1220
::mlir::TypedValue<::mlir::IntegerType > getResult()
Definition Ops.h.inc:1132
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1252
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1094
::mlir::OpOperand & getRhsMutable()
Definition Ops.h.inc:1117
XorBoolOpAdaptor Adaptor
Definition Ops.h.inc:1082
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:1122
::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:1256
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1098
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:1126
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:1104
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1307
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:1108
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:1165
XorBoolOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:1084
static void printInferredOrParsedType(::mlir::OpAsmPrinter &printer, ::mlir::Operation *op, ::mlir::Type opType, bool isFirst)
Definition Ops.h.inc:1166
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:1090
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:1319
::mlir::ParseResult parseInferredOrParsedType(::mlir::OpAsmParser &parser, ::mlir::Type &opType, bool isFirst)
Definition Ops.h.inc:1148
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1264
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:251
AssertOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:255
::std::optional< ::llvm::StringRef > getMsg()
Definition Ops.cpp.inc:277
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:261
::llzk::boolean::FeltCmpPredicateAttr getPredicateAttr()
Definition Ops.h.inc:486
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:464
CmpOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:468
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:474
::llzk::boolean::FeltCmpPredicate getPredicate()
Definition Ops.cpp.inc:502
NotBoolOpGenericAdaptorBase(::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:677
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:674
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:683
OrBoolOpGenericAdaptorBase(::mlir::Operation *op)
Definition Ops.h.inc:844
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:846
OrBoolOpGenericAdaptorBase(::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:840
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:837
XorBoolOpGenericAdaptorBase(::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1016
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:1022
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:1013
void setMsg(const ::mlir::StringAttr &propValue)
Definition Ops.h.inc:237
::llzk::boolean::FeltCmpPredicateAttr predicateTy
Definition Ops.h.inc:443
void setPredicate(const ::llzk::boolean::FeltCmpPredicateAttr &propValue)
Definition Ops.h.inc:450