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