LLZK 3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
Ops.cpp.inc
Go to the documentation of this file.
1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* Op Definitions *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* From: Ops.td *|
7|* *|
8\*===----------------------------------------------------------------------===*/
9
10#ifdef GET_OP_LIST
11#undef GET_OP_LIST
12
22#endif // GET_OP_LIST
23
24#ifdef GET_OP_CLASSES
25#undef GET_OP_CLASSES
26
27
28//===----------------------------------------------------------------------===//
29// Local Utility Method Definitions
30//===----------------------------------------------------------------------===//
31
32namespace llzk {
33namespace boolean {
34
35static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops1(
36 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
37 unsigned valueIndex) {
38 if (!((::llvm::isa<::llzk::array::ArrayType>(type)))) {
39 return op->emitOpError(valueKind) << " #" << valueIndex
40 << " must be n-dimensional array, but got " << type;
41 }
42 return ::mlir::success();
43}
44
45static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops2(
46 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
47 unsigned valueIndex) {
48 if (!((type.isSignlessInteger(1)))) {
49 return op->emitOpError(valueKind) << " #" << valueIndex
50 << " must be 1-bit signless integer, but got " << type;
51 }
52 return ::mlir::success();
53}
54
55static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops3(
56 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
57 unsigned valueIndex) {
58 if (!((::llvm::isa<llzk::polymorphic::TypeVarType,::mlir::IntegerType>(type)))) {
59 return op->emitOpError(valueKind) << " #" << valueIndex
60 << " must be 1-bit signless integer or type variable, but got " << type;
61 }
62 return ::mlir::success();
63}
64
65static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops4(
66 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
67 unsigned valueIndex) {
68 if (!((::llvm::isa<::llzk::felt::FeltType>(type)))) {
69 return op->emitOpError(valueKind) << " #" << valueIndex
70 << " must be finite field element, but got " << type;
71 }
72 return ::mlir::success();
73}
74
75static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops1(
76 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
77 if (attr && !((::llvm::isa<::mlir::StringAttr>(attr))))
78 return emitError() << "attribute '" << attrName
79 << "' failed to satisfy constraint: string attribute";
80 return ::mlir::success();
81}
82static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops1(
83 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
84 return __mlir_ods_local_attr_constraint_Ops1(attr, attrName, [op]() {
85 return op->emitOpError();
86 });
87}
88
89static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops2(
90 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
91 if (attr && !((::llvm::isa<::llzk::boolean::FeltCmpPredicateAttr>(attr))))
92 return emitError() << "attribute '" << attrName
93 << "' failed to satisfy constraint: Field element comparison predicate";
94 return ::mlir::success();
95}
96static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops2(
97 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
98 return __mlir_ods_local_attr_constraint_Ops2(attr, attrName, [op]() {
99 return op->emitOpError();
100 });
101}
102
103static ::llvm::LogicalResult __mlir_ods_local_region_constraint_Ops1(
104 ::mlir::Operation *op, ::mlir::Region &region, ::llvm::StringRef regionName,
105 unsigned regionIndex) {
106 if (!((::llvm::hasNItems(region, 1)))) {
107 return op->emitOpError("region #") << regionIndex
108 << (regionName.empty() ? " " : " ('" + regionName + "') ")
109 << "failed to verify constraint: region with 1 blocks";
110 }
111 return ::mlir::success();
112}
113} // namespace boolean
114} // namespace llzk
115namespace llzk {
116namespace boolean {
117
118//===----------------------------------------------------------------------===//
119// ::llzk::boolean::ExistsOp definitions
120//===----------------------------------------------------------------------===//
121
122namespace detail {
123} // namespace detail
125
126::llvm::LogicalResult ExistsOpAdaptor::verify(::mlir::Location loc) {
127 return ::mlir::success();
128}
129
130void ExistsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value sort) {
131 odsState.addOperands(sort);
132 (void)odsState.addRegion();
133 odsState.addTypes(result);
134}
135
136void ExistsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value sort) {
137 odsState.addOperands(sort);
138 (void)odsState.addRegion();
139
140 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
141 if (::mlir::succeeded(ExistsOp::inferReturnTypes(odsBuilder.getContext(),
142 odsState.location, odsState.operands,
143 odsState.attributes.getDictionary(odsState.getContext()),
144 odsState.getRawProperties(),
145 odsState.regions, inferredReturnTypes)))
146 odsState.addTypes(inferredReturnTypes);
147 else
148 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
149
150}
151
152void ExistsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value sort) {
153 odsState.addOperands(sort);
154 (void)odsState.addRegion();
155 assert(resultTypes.size() == 1u && "mismatched number of results");
156 odsState.addTypes(resultTypes);
157}
158
159void ExistsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
160 assert(operands.size() == 1u && "mismatched number of parameters");
161 odsState.addOperands(operands);
162 odsState.addAttributes(attributes);
163 for (unsigned i = 0; i != 1; ++i)
164 (void)odsState.addRegion();
165 assert(resultTypes.size() == 1u && "mismatched number of return types");
166 odsState.addTypes(resultTypes);
167}
168
169void ExistsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
170 assert(operands.size() == 1u && "mismatched number of parameters");
171 odsState.addOperands(operands);
172 odsState.addAttributes(attributes);
173 for (unsigned i = 0; i != 1; ++i)
174 (void)odsState.addRegion();
175
176 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
177 if (::mlir::succeeded(ExistsOp::inferReturnTypes(odsBuilder.getContext(),
178 odsState.location, operands,
179 odsState.attributes.getDictionary(odsState.getContext()),
180 odsState.getRawProperties(),
181 odsState.regions, inferredReturnTypes))) {
182 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
183 odsState.addTypes(inferredReturnTypes);
184 } else {
185 ::llvm::report_fatal_error("Failed to infer result type(s).");
186 }
187}
188
189::llvm::LogicalResult ExistsOp::verifyInvariantsImpl() {
190 {
191 unsigned index = 0; (void)index;
192 auto valueGroup0 = getODSOperands(0);
193
194 for (auto v : valueGroup0) {
195 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
196 return ::mlir::failure();
197 }
198 }
199 {
200 unsigned index = 0; (void)index;
201 auto valueGroup0 = getODSResults(0);
202
203 for (auto v : valueGroup0) {
204 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "result", index++)))
205 return ::mlir::failure();
206 }
207 }
208 {
209 unsigned index = 0; (void)index;
210
211 for (auto &region : ::llvm::MutableArrayRef((*this)->getRegion(0)))
212 if (::mlir::failed(__mlir_ods_local_region_constraint_Ops1(*this, region, "region", index++)))
213 return ::mlir::failure();
214 }
215 return ::mlir::success();
216}
217
218::llvm::LogicalResult ExistsOp::verifyInvariants() {
219 if(::mlir::succeeded(verifyInvariantsImpl()) && ::mlir::succeeded(verify()))
220 return ::mlir::success();
221 return ::mlir::failure();
222}
223
224::llvm::LogicalResult ExistsOp::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) {
225 inferredReturnTypes.resize(1);
226 ::mlir::Builder odsBuilder(context);
227 ::mlir::Type odsInferredType0 = odsBuilder.getIntegerType(1);
228 inferredReturnTypes[0] = odsInferredType0;
229 return ::mlir::success();
230}
231
232void ExistsOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
233}
234
235} // namespace boolean
236} // namespace llzk
237MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::boolean::ExistsOp)
238
239namespace llzk {
240namespace boolean {
241
242//===----------------------------------------------------------------------===//
243// ::llzk::boolean::ForAllOp definitions
244//===----------------------------------------------------------------------===//
245
246namespace detail {
247} // namespace detail
249
250::llvm::LogicalResult ForAllOpAdaptor::verify(::mlir::Location loc) {
251 return ::mlir::success();
252}
253
254void ForAllOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value sort) {
255 odsState.addOperands(sort);
256 (void)odsState.addRegion();
257 odsState.addTypes(result);
258}
259
260void ForAllOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value sort) {
261 odsState.addOperands(sort);
262 (void)odsState.addRegion();
263
264 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
265 if (::mlir::succeeded(ForAllOp::inferReturnTypes(odsBuilder.getContext(),
266 odsState.location, odsState.operands,
267 odsState.attributes.getDictionary(odsState.getContext()),
268 odsState.getRawProperties(),
269 odsState.regions, inferredReturnTypes)))
270 odsState.addTypes(inferredReturnTypes);
271 else
272 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
273
274}
275
276void ForAllOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value sort) {
277 odsState.addOperands(sort);
278 (void)odsState.addRegion();
279 assert(resultTypes.size() == 1u && "mismatched number of results");
280 odsState.addTypes(resultTypes);
281}
282
283void ForAllOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
284 assert(operands.size() == 1u && "mismatched number of parameters");
285 odsState.addOperands(operands);
286 odsState.addAttributes(attributes);
287 for (unsigned i = 0; i != 1; ++i)
288 (void)odsState.addRegion();
289 assert(resultTypes.size() == 1u && "mismatched number of return types");
290 odsState.addTypes(resultTypes);
291}
292
293void ForAllOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
294 assert(operands.size() == 1u && "mismatched number of parameters");
295 odsState.addOperands(operands);
296 odsState.addAttributes(attributes);
297 for (unsigned i = 0; i != 1; ++i)
298 (void)odsState.addRegion();
299
300 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
301 if (::mlir::succeeded(ForAllOp::inferReturnTypes(odsBuilder.getContext(),
302 odsState.location, operands,
303 odsState.attributes.getDictionary(odsState.getContext()),
304 odsState.getRawProperties(),
305 odsState.regions, inferredReturnTypes))) {
306 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
307 odsState.addTypes(inferredReturnTypes);
308 } else {
309 ::llvm::report_fatal_error("Failed to infer result type(s).");
310 }
311}
312
313::llvm::LogicalResult ForAllOp::verifyInvariantsImpl() {
314 {
315 unsigned index = 0; (void)index;
316 auto valueGroup0 = getODSOperands(0);
317
318 for (auto v : valueGroup0) {
319 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*this, v.getType(), "operand", index++)))
320 return ::mlir::failure();
321 }
322 }
323 {
324 unsigned index = 0; (void)index;
325 auto valueGroup0 = getODSResults(0);
326
327 for (auto v : valueGroup0) {
328 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "result", index++)))
329 return ::mlir::failure();
330 }
331 }
332 {
333 unsigned index = 0; (void)index;
334
335 for (auto &region : ::llvm::MutableArrayRef((*this)->getRegion(0)))
336 if (::mlir::failed(__mlir_ods_local_region_constraint_Ops1(*this, region, "region", index++)))
337 return ::mlir::failure();
338 }
339 return ::mlir::success();
340}
341
342::llvm::LogicalResult ForAllOp::verifyInvariants() {
343 if(::mlir::succeeded(verifyInvariantsImpl()) && ::mlir::succeeded(verify()))
344 return ::mlir::success();
345 return ::mlir::failure();
346}
347
348::llvm::LogicalResult ForAllOp::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) {
349 inferredReturnTypes.resize(1);
350 ::mlir::Builder odsBuilder(context);
351 ::mlir::Type odsInferredType0 = odsBuilder.getIntegerType(1);
352 inferredReturnTypes[0] = odsInferredType0;
353 return ::mlir::success();
354}
355
356void ForAllOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
357}
358
359} // namespace boolean
360} // namespace llzk
361MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::boolean::ForAllOp)
362
363namespace llzk {
364namespace boolean {
365
366//===----------------------------------------------------------------------===//
367// ::llzk::boolean::AndBoolOp definitions
368//===----------------------------------------------------------------------===//
369
370namespace detail {
371} // namespace detail
373
374::llvm::LogicalResult AndBoolOpAdaptor::verify(::mlir::Location loc) {
375 return ::mlir::success();
376}
377
378void AndBoolOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
379 odsState.addOperands(lhs);
380 odsState.addOperands(rhs);
381 odsState.addTypes(result);
382}
383
384void AndBoolOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
385 odsState.addOperands(lhs);
386 odsState.addOperands(rhs);
387
388 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
389 if (::mlir::succeeded(AndBoolOp::inferReturnTypes(odsBuilder.getContext(),
390 odsState.location, odsState.operands,
391 odsState.attributes.getDictionary(odsState.getContext()),
392 odsState.getRawProperties(),
393 odsState.regions, inferredReturnTypes)))
394 odsState.addTypes(inferredReturnTypes);
395 else
396 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
397
398}
399
400void AndBoolOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
401 odsState.addOperands(lhs);
402 odsState.addOperands(rhs);
403 assert(resultTypes.size() == 1u && "mismatched number of results");
404 odsState.addTypes(resultTypes);
405}
406
407void AndBoolOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
408 assert(operands.size() == 2u && "mismatched number of parameters");
409 odsState.addOperands(operands);
410 odsState.addAttributes(attributes);
411 assert(resultTypes.size() == 1u && "mismatched number of return types");
412 odsState.addTypes(resultTypes);
413}
414
415void AndBoolOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
416 assert(operands.size() == 2u && "mismatched number of parameters");
417 odsState.addOperands(operands);
418 odsState.addAttributes(attributes);
419
420 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
421 if (::mlir::succeeded(AndBoolOp::inferReturnTypes(odsBuilder.getContext(),
422 odsState.location, operands,
423 odsState.attributes.getDictionary(odsState.getContext()),
424 odsState.getRawProperties(),
425 odsState.regions, inferredReturnTypes))) {
426 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
427 odsState.addTypes(inferredReturnTypes);
428 } else {
429 ::llvm::report_fatal_error("Failed to infer result type(s).");
430 }
431}
432
433::llvm::LogicalResult AndBoolOp::verifyInvariantsImpl() {
434 {
435 unsigned index = 0; (void)index;
436 auto valueGroup0 = getODSOperands(0);
437
438 for (auto v : valueGroup0) {
439 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*this, v.getType(), "operand", index++)))
440 return ::mlir::failure();
441 }
442 auto valueGroup1 = getODSOperands(1);
443
444 for (auto v : valueGroup1) {
445 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*this, v.getType(), "operand", index++)))
446 return ::mlir::failure();
447 }
448 }
449 {
450 unsigned index = 0; (void)index;
451 auto valueGroup0 = getODSResults(0);
452
453 for (auto v : valueGroup0) {
454 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "result", index++)))
455 return ::mlir::failure();
456 }
457 }
458 if (!((::llzk::typesUnify((*this->getODSOperands(0).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
459 return emitOpError("failed to verify that result type matches with lhs type");
460 if (!((::llzk::typesUnify((*this->getODSOperands(1).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
461 return emitOpError("failed to verify that result type matches with rhs type");
462 return ::mlir::success();
463}
464
465::llvm::LogicalResult AndBoolOp::verifyInvariants() {
466 return verifyInvariantsImpl();
467}
468
469::llvm::LogicalResult AndBoolOp::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) {
470 inferredReturnTypes.resize(1);
471 ::mlir::Builder odsBuilder(context);
472 ::mlir::Type odsInferredType0 = odsBuilder.getIntegerType(1);
473 inferredReturnTypes[0] = odsInferredType0;
474 return ::mlir::success();
475}
476
477::mlir::ParseResult AndBoolOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
478 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
479 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
480 (void)lhsOperandsLoc;
481 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
482 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
483 (void)rhsOperandsLoc;
484 ::mlir::Type lhsRawType{};
485 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
486 ::mlir::Type rhsRawType{};
487 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
488
489 lhsOperandsLoc = parser.getCurrentLocation();
490 if (parser.parseOperand(lhsRawOperand))
491 return ::mlir::failure();
492 if (parser.parseComma())
493 return ::mlir::failure();
494
495 rhsOperandsLoc = parser.getCurrentLocation();
496 if (parser.parseOperand(rhsRawOperand))
497 return ::mlir::failure();
498 {
499 auto odsResult = parseInferredOrParsedType(parser, lhsRawType, true);
500 if (odsResult) return ::mlir::failure();
501 }
502 {
503 auto odsResult = parseInferredOrParsedType(parser, rhsRawType, false);
504 if (odsResult) return ::mlir::failure();
505 }
506 {
507 auto loc = parser.getCurrentLocation();(void)loc;
508 if (parser.parseOptionalAttrDict(result.attributes))
509 return ::mlir::failure();
510 }
511 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
512 result.addTypes(odsBuildableType0);
513 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
514 return ::mlir::failure();
515 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
516 return ::mlir::failure();
517 return ::mlir::success();
518}
519
520void AndBoolOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
521 _odsPrinter << ' ';
522 _odsPrinter << getLhs();
523 _odsPrinter << ",";
524 _odsPrinter << ' ';
525 _odsPrinter << getRhs();
526 printInferredOrParsedType(_odsPrinter, *this, getLhs().getType(), true);
527 printInferredOrParsedType(_odsPrinter, *this, getRhs().getType(), false);
528 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
529 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
530}
531
532void AndBoolOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
533}
534
535} // namespace boolean
536} // namespace llzk
537MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::boolean::AndBoolOp)
538
539namespace llzk {
540namespace boolean {
541
542//===----------------------------------------------------------------------===//
543// ::llzk::boolean::AssertOp definitions
544//===----------------------------------------------------------------------===//
545
546namespace detail {
547AssertOpGenericAdaptorBase::AssertOpGenericAdaptorBase(AssertOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
548
549::std::optional< ::llvm::StringRef > AssertOpGenericAdaptorBase::getMsg() {
550 auto attr = getMsgAttr();
551 return attr ? ::std::optional< ::llvm::StringRef >(attr.getValue()) : (::std::nullopt);
552}
553
554} // namespace detail
556
557::llvm::LogicalResult AssertOpAdaptor::verify(::mlir::Location loc) {
558 auto tblgen_msg = getProperties().msg; (void)tblgen_msg;
559
560 if (tblgen_msg && !((::llvm::isa<::mlir::StringAttr>(tblgen_msg))))
561 return emitError(loc, "'bool.assert' op ""attribute 'msg' failed to satisfy constraint: string attribute");
562 return ::mlir::success();
563}
564
565::llvm::LogicalResult AssertOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
566 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
567 if (!dict) {
568 emitError() << "expected DictionaryAttr to set properties";
569 return ::mlir::failure();
570 }
571
572 {
573 auto &propStorage = prop.msg;
574 auto attr = dict.get("msg");
575 if (attr) {
576 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
577 if (convertedAttr) {
578 propStorage = convertedAttr;
579 } else {
580 emitError() << "Invalid attribute `msg` in property conversion: " << attr;
581 return ::mlir::failure();
582 }
583 }
584 }
585 return ::mlir::success();
586}
587
588::mlir::Attribute AssertOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
589 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
590 ::mlir::Builder odsBuilder{ctx};
591
592 {
593 const auto &propStorage = prop.msg;
594 if (propStorage)
595 attrs.push_back(odsBuilder.getNamedAttr("msg",
596 propStorage));
597 }
598
599 if (!attrs.empty())
600 return odsBuilder.getDictionaryAttr(attrs);
601 return {};
602}
603
604llvm::hash_code AssertOp::computePropertiesHash(const Properties &prop) {
605 return llvm::hash_combine(
606 llvm::hash_value(prop.msg.getAsOpaquePointer()));
607}
608
609std::optional<mlir::Attribute> AssertOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
610 if (name == "msg")
611 return prop.msg;
612 return std::nullopt;
613}
614
615void AssertOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
616 if (name == "msg") {
617 prop.msg = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.msg)>>(value);
618 return;
619 }
620}
621
622void AssertOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
623 if (prop.msg) attrs.append("msg", prop.msg);
624}
625
626::llvm::LogicalResult AssertOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
627 {
628 ::mlir::Attribute attr = attrs.get(getMsgAttrName(opName));
629 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(attr, "msg", emitError)))
630 return ::mlir::failure();
631 }
632 return ::mlir::success();
633}
634
635::llvm::LogicalResult AssertOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
636 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
637 if (::mlir::failed(reader.readOptionalAttribute(prop.msg)))
638 return ::mlir::failure();
639 return ::mlir::success();
640}
641
642void AssertOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
643 auto &prop = getProperties(); (void)prop;
644
645 writer.writeOptionalAttribute(prop.msg);
646}
647
648::std::optional< ::llvm::StringRef > AssertOp::getMsg() {
649 auto attr = getMsgAttr();
650 return attr ? ::std::optional< ::llvm::StringRef >(attr.getValue()) : (::std::nullopt);
651}
652
653void AssertOp::setMsg(::std::optional<::llvm::StringRef> attrValue) {
654 auto &odsProp = getProperties().msg;
655 if (attrValue)
656 odsProp = ::mlir::Builder((*this)->getContext()).getStringAttr(*attrValue);
657 else
658 odsProp = nullptr;
659}
660
661void AssertOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition, /*optional*/::mlir::StringAttr msg) {
662 odsState.addOperands(condition);
663 if (msg) {
664 odsState.getOrAddProperties<Properties>().msg = msg;
665 }
666}
667
668void AssertOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition, /*optional*/::mlir::StringAttr msg) {
669 odsState.addOperands(condition);
670 if (msg) {
671 odsState.getOrAddProperties<Properties>().msg = msg;
672 }
673 assert(resultTypes.size() == 0u && "mismatched number of results");
674 odsState.addTypes(resultTypes);
675}
676
677void AssertOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
678 assert(operands.size() == 1u && "mismatched number of parameters");
679 odsState.addOperands(operands);
680 odsState.addAttributes(attributes);
681 assert(resultTypes.size() == 0u && "mismatched number of return types");
682 odsState.addTypes(resultTypes);
683
684 if (!attributes.empty()) {
685 ::mlir::OpaqueProperties properties =
686 &odsState.getOrAddProperties<AssertOp::Properties>();
687 std::optional<::mlir::RegisteredOperationName> info =
688 odsState.name.getRegisteredInfo();
689 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
690 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
691 ::llvm::report_fatal_error("Property conversion failed.");
692 }
693}
694
695::llvm::LogicalResult AssertOp::verifyInvariantsImpl() {
696 auto tblgen_msg = getProperties().msg; (void)tblgen_msg;
697
698 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(*this, tblgen_msg, "msg")))
699 return ::mlir::failure();
700 {
701 unsigned index = 0; (void)index;
702 auto valueGroup0 = getODSOperands(0);
703
704 for (auto v : valueGroup0) {
705 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "operand", index++)))
706 return ::mlir::failure();
707 }
708 }
709 return ::mlir::success();
710}
711
712::llvm::LogicalResult AssertOp::verifyInvariants() {
713 return verifyInvariantsImpl();
714}
715
716::mlir::ParseResult AssertOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
717 ::mlir::OpAsmParser::UnresolvedOperand conditionRawOperand{};
718 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> conditionOperands(&conditionRawOperand, 1); ::llvm::SMLoc conditionOperandsLoc;
719 (void)conditionOperandsLoc;
720 ::mlir::StringAttr msgAttr;
721
722 conditionOperandsLoc = parser.getCurrentLocation();
723 if (parser.parseOperand(conditionRawOperand))
724 return ::mlir::failure();
725 if (::mlir::succeeded(parser.parseOptionalComma())) {
726
727 if (parser.parseCustomAttributeWithFallback(msgAttr, parser.getBuilder().getType<::mlir::NoneType>())) {
728 return ::mlir::failure();
729 }
730 if (msgAttr) result.getOrAddProperties<AssertOp::Properties>().msg = msgAttr;
731 }
732 {
733 auto loc = parser.getCurrentLocation();(void)loc;
734 if (parser.parseOptionalAttrDict(result.attributes))
735 return ::mlir::failure();
736 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
737 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
738 })))
739 return ::mlir::failure();
740 }
741 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
742 if (parser.resolveOperands(conditionOperands, odsBuildableType0, conditionOperandsLoc, result.operands))
743 return ::mlir::failure();
744 return ::mlir::success();
745}
746
747void AssertOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
748 _odsPrinter << ' ';
749 _odsPrinter << getCondition();
750 if (getMsgAttr()) {
751 _odsPrinter << ",";
752 _odsPrinter << ' ';
753 _odsPrinter.printAttributeWithoutType(getMsgAttr());
754 }
755 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
756 elidedAttrs.push_back("msg");
757 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
758}
759
760} // namespace boolean
761} // namespace llzk
762MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::boolean::AssertOp)
763
764namespace llzk {
765namespace boolean {
766
767//===----------------------------------------------------------------------===//
768// ::llzk::boolean::CmpOp definitions
769//===----------------------------------------------------------------------===//
770
771namespace detail {
772CmpOpGenericAdaptorBase::CmpOpGenericAdaptorBase(CmpOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
773
778
779} // namespace detail
781
782::llvm::LogicalResult CmpOpAdaptor::verify(::mlir::Location loc) {
783 auto tblgen_predicate = getProperties().predicate; (void)tblgen_predicate;
784 if (!tblgen_predicate) return emitError(loc, "'bool.cmp' op ""requires attribute 'predicate'");
785
786 if (tblgen_predicate && !((::llvm::isa<::llzk::boolean::FeltCmpPredicateAttr>(tblgen_predicate))))
787 return emitError(loc, "'bool.cmp' op ""attribute 'predicate' failed to satisfy constraint: Field element comparison predicate");
788 return ::mlir::success();
789}
790
791::llvm::LogicalResult CmpOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
792 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
793 if (!dict) {
794 emitError() << "expected DictionaryAttr to set properties";
795 return ::mlir::failure();
796 }
797
798 {
799 auto &propStorage = prop.predicate;
800 auto attr = dict.get("predicate");
801 if (attr) {
802 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
803 if (convertedAttr) {
804 propStorage = convertedAttr;
805 } else {
806 emitError() << "Invalid attribute `predicate` in property conversion: " << attr;
807 return ::mlir::failure();
808 }
809 }
810 }
811 return ::mlir::success();
812}
813
814::mlir::Attribute CmpOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
815 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
816 ::mlir::Builder odsBuilder{ctx};
817
818 {
819 const auto &propStorage = prop.predicate;
820 if (propStorage)
821 attrs.push_back(odsBuilder.getNamedAttr("predicate",
822 propStorage));
823 }
824
825 if (!attrs.empty())
826 return odsBuilder.getDictionaryAttr(attrs);
827 return {};
828}
829
830llvm::hash_code CmpOp::computePropertiesHash(const Properties &prop) {
831 return llvm::hash_combine(
832 llvm::hash_value(prop.predicate.getAsOpaquePointer()));
833}
834
835std::optional<mlir::Attribute> CmpOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
836 if (name == "predicate")
837 return prop.predicate;
838 return std::nullopt;
839}
840
841void CmpOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
842 if (name == "predicate") {
843 prop.predicate = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.predicate)>>(value);
844 return;
845 }
846}
847
848void CmpOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
849 if (prop.predicate) attrs.append("predicate", prop.predicate);
850}
851
852::llvm::LogicalResult CmpOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
853 {
854 ::mlir::Attribute attr = attrs.get(getPredicateAttrName(opName));
855 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(attr, "predicate", emitError)))
856 return ::mlir::failure();
857 }
858 return ::mlir::success();
859}
860
861::llvm::LogicalResult CmpOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
862 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
863 if (::mlir::failed(reader.readAttribute(prop.predicate)))
864 return ::mlir::failure();
865 return ::mlir::success();
866}
867
868void CmpOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
869 auto &prop = getProperties(); (void)prop;
870 writer.writeAttribute(prop.predicate);
871}
872
874 auto attr = getPredicateAttr();
875 return attr.getValue();
876}
877
879 getProperties().predicate = ::llzk::boolean::FeltCmpPredicateAttr::get(::mlir::Builder((*this)->getContext()).getContext(), attrValue);
880}
881
882void CmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::boolean::FeltCmpPredicateAttr predicate, ::mlir::Value lhs, ::mlir::Value rhs) {
883 odsState.addOperands(lhs);
884 odsState.addOperands(rhs);
885 odsState.getOrAddProperties<Properties>().predicate = predicate;
886 odsState.addTypes(result);
887}
888
889void CmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::boolean::FeltCmpPredicateAttr predicate, ::mlir::Value lhs, ::mlir::Value rhs) {
890 odsState.addOperands(lhs);
891 odsState.addOperands(rhs);
892 odsState.getOrAddProperties<Properties>().predicate = predicate;
893
894 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
895 if (::mlir::succeeded(CmpOp::inferReturnTypes(odsBuilder.getContext(),
896 odsState.location, odsState.operands,
897 odsState.attributes.getDictionary(odsState.getContext()),
898 odsState.getRawProperties(),
899 odsState.regions, inferredReturnTypes)))
900 odsState.addTypes(inferredReturnTypes);
901 else
902 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
903
904}
905
906void CmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llzk::boolean::FeltCmpPredicateAttr predicate, ::mlir::Value lhs, ::mlir::Value rhs) {
907 odsState.addOperands(lhs);
908 odsState.addOperands(rhs);
909 odsState.getOrAddProperties<Properties>().predicate = predicate;
910 assert(resultTypes.size() == 1u && "mismatched number of results");
911 odsState.addTypes(resultTypes);
912}
913
914void CmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::boolean::FeltCmpPredicate predicate, ::mlir::Value lhs, ::mlir::Value rhs) {
915 odsState.addOperands(lhs);
916 odsState.addOperands(rhs);
917 odsState.getOrAddProperties<Properties>().predicate = ::llzk::boolean::FeltCmpPredicateAttr::get(odsBuilder.getContext(), predicate);
918 odsState.addTypes(result);
919}
920
921void CmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::boolean::FeltCmpPredicate predicate, ::mlir::Value lhs, ::mlir::Value rhs) {
922 odsState.addOperands(lhs);
923 odsState.addOperands(rhs);
924 odsState.getOrAddProperties<Properties>().predicate = ::llzk::boolean::FeltCmpPredicateAttr::get(odsBuilder.getContext(), predicate);
925
926 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
927 if (::mlir::succeeded(CmpOp::inferReturnTypes(odsBuilder.getContext(),
928 odsState.location, odsState.operands,
929 odsState.attributes.getDictionary(odsState.getContext()),
930 odsState.getRawProperties(),
931 odsState.regions, inferredReturnTypes)))
932 odsState.addTypes(inferredReturnTypes);
933 else
934 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
935
936}
937
938void CmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llzk::boolean::FeltCmpPredicate predicate, ::mlir::Value lhs, ::mlir::Value rhs) {
939 odsState.addOperands(lhs);
940 odsState.addOperands(rhs);
941 odsState.getOrAddProperties<Properties>().predicate = ::llzk::boolean::FeltCmpPredicateAttr::get(odsBuilder.getContext(), predicate);
942 assert(resultTypes.size() == 1u && "mismatched number of results");
943 odsState.addTypes(resultTypes);
944}
945
946void CmpOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
947 assert(operands.size() == 2u && "mismatched number of parameters");
948 odsState.addOperands(operands);
949 odsState.addAttributes(attributes);
950 assert(resultTypes.size() == 1u && "mismatched number of return types");
951 odsState.addTypes(resultTypes);
952
953 if (!attributes.empty()) {
954 ::mlir::OpaqueProperties properties =
955 &odsState.getOrAddProperties<CmpOp::Properties>();
956 std::optional<::mlir::RegisteredOperationName> info =
957 odsState.name.getRegisteredInfo();
958 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
959 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
960 ::llvm::report_fatal_error("Property conversion failed.");
961 }
962}
963
964void CmpOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
965 assert(operands.size() == 2u && "mismatched number of parameters");
966 odsState.addOperands(operands);
967 odsState.addAttributes(attributes);
968
969 if (!attributes.empty()) {
970 ::mlir::OpaqueProperties properties =
971 &odsState.getOrAddProperties<CmpOp::Properties>();
972 std::optional<::mlir::RegisteredOperationName> info =
973 odsState.name.getRegisteredInfo();
974 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
975 odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
976 ::llvm::report_fatal_error("Property conversion failed.");
977 }
978 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
979 if (::mlir::succeeded(CmpOp::inferReturnTypes(odsBuilder.getContext(),
980 odsState.location, operands,
981 odsState.attributes.getDictionary(odsState.getContext()),
982 odsState.getRawProperties(),
983 odsState.regions, inferredReturnTypes))) {
984 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
985 odsState.addTypes(inferredReturnTypes);
986 } else {
987 ::llvm::report_fatal_error("Failed to infer result type(s).");
988 }
989}
990
991::llvm::LogicalResult CmpOp::verifyInvariantsImpl() {
992 auto tblgen_predicate = getProperties().predicate; (void)tblgen_predicate;
993 if (!tblgen_predicate) return emitOpError("requires attribute 'predicate'");
994
995 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(*this, tblgen_predicate, "predicate")))
996 return ::mlir::failure();
997 {
998 unsigned index = 0; (void)index;
999 auto valueGroup0 = getODSOperands(0);
1000
1001 for (auto v : valueGroup0) {
1002 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops4(*this, v.getType(), "operand", index++)))
1003 return ::mlir::failure();
1004 }
1005 auto valueGroup1 = getODSOperands(1);
1006
1007 for (auto v : valueGroup1) {
1008 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops4(*this, v.getType(), "operand", index++)))
1009 return ::mlir::failure();
1010 }
1011 }
1012 {
1013 unsigned index = 0; (void)index;
1014 auto valueGroup0 = getODSResults(0);
1015
1016 for (auto v : valueGroup0) {
1017 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "result", index++)))
1018 return ::mlir::failure();
1019 }
1020 }
1021 if (!((::llzk::typesUnify((*this->getODSOperands(0).begin()).getType(), (*this->getODSOperands(1).begin()).getType()))))
1022 return emitOpError("failed to verify that rhs type matches with lhs type");
1023 return ::mlir::success();
1024}
1025
1026::llvm::LogicalResult CmpOp::verifyInvariants() {
1027 return verifyInvariantsImpl();
1028}
1029
1030::llvm::LogicalResult CmpOp::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) {
1031 inferredReturnTypes.resize(1);
1032 ::mlir::Builder odsBuilder(context);
1033 ::mlir::Type odsInferredType0 = odsBuilder.getIntegerType(1);
1034 inferredReturnTypes[0] = odsInferredType0;
1035 return ::mlir::success();
1036}
1037
1038::mlir::ParseResult CmpOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1039 ::llzk::boolean::FeltCmpPredicateAttr predicateAttr;
1040 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
1041 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
1042 (void)lhsOperandsLoc;
1043 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
1044 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
1045 (void)rhsOperandsLoc;
1046 ::mlir::Type lhsRawType{};
1047 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
1048 ::mlir::Type rhsRawType{};
1049 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
1050
1051 if (parser.parseCustomAttributeWithFallback(predicateAttr, ::mlir::Type{})) {
1052 return ::mlir::failure();
1053 }
1054 if (predicateAttr) result.getOrAddProperties<CmpOp::Properties>().predicate = predicateAttr;
1055 if (parser.parseLParen())
1056 return ::mlir::failure();
1057
1058 lhsOperandsLoc = parser.getCurrentLocation();
1059 if (parser.parseOperand(lhsRawOperand))
1060 return ::mlir::failure();
1061 if (parser.parseComma())
1062 return ::mlir::failure();
1063
1064 rhsOperandsLoc = parser.getCurrentLocation();
1065 if (parser.parseOperand(rhsRawOperand))
1066 return ::mlir::failure();
1067 if (parser.parseRParen())
1068 return ::mlir::failure();
1069 {
1070 auto odsResult = parseInferredOrParsedType(parser, lhsRawType, true);
1071 if (odsResult) return ::mlir::failure();
1072 }
1073 {
1074 auto odsResult = parseInferredOrParsedType(parser, rhsRawType, false);
1075 if (odsResult) return ::mlir::failure();
1076 }
1077 {
1078 auto loc = parser.getCurrentLocation();(void)loc;
1079 if (parser.parseOptionalAttrDict(result.attributes))
1080 return ::mlir::failure();
1081 if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
1082 return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
1083 })))
1084 return ::mlir::failure();
1085 }
1086 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
1087 result.addTypes(odsBuildableType0);
1088 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
1089 return ::mlir::failure();
1090 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
1091 return ::mlir::failure();
1092 return ::mlir::success();
1093}
1094
1095void CmpOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
1096_odsPrinter.printStrippedAttrOrType(getPredicateAttr());
1097 _odsPrinter << "(";
1098 _odsPrinter << getLhs();
1099 _odsPrinter << ",";
1100 _odsPrinter << ' ';
1101 _odsPrinter << getRhs();
1102 _odsPrinter << ")";
1103 printInferredOrParsedType(_odsPrinter, *this, getLhs().getType(), true);
1104 printInferredOrParsedType(_odsPrinter, *this, getRhs().getType(), false);
1105 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1106 elidedAttrs.push_back("predicate");
1107 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1108}
1109
1110void CmpOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1111}
1112
1113} // namespace boolean
1114} // namespace llzk
1115MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::boolean::CmpOp)
1116
1117namespace llzk {
1118namespace boolean {
1119
1120//===----------------------------------------------------------------------===//
1121// ::llzk::boolean::NotBoolOp definitions
1122//===----------------------------------------------------------------------===//
1123
1124namespace detail {
1125} // namespace detail
1127
1128::llvm::LogicalResult NotBoolOpAdaptor::verify(::mlir::Location loc) {
1129 return ::mlir::success();
1130}
1131
1132void NotBoolOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value operand) {
1133 odsState.addOperands(operand);
1134 odsState.addTypes(result);
1135}
1136
1137void NotBoolOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value operand) {
1138 odsState.addOperands(operand);
1139
1140 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1141 if (::mlir::succeeded(NotBoolOp::inferReturnTypes(odsBuilder.getContext(),
1142 odsState.location, odsState.operands,
1143 odsState.attributes.getDictionary(odsState.getContext()),
1144 odsState.getRawProperties(),
1145 odsState.regions, inferredReturnTypes)))
1146 odsState.addTypes(inferredReturnTypes);
1147 else
1148 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1149
1150}
1151
1152void NotBoolOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value operand) {
1153 odsState.addOperands(operand);
1154 assert(resultTypes.size() == 1u && "mismatched number of results");
1155 odsState.addTypes(resultTypes);
1156}
1157
1158void NotBoolOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1159 assert(operands.size() == 1u && "mismatched number of parameters");
1160 odsState.addOperands(operands);
1161 odsState.addAttributes(attributes);
1162 assert(resultTypes.size() == 1u && "mismatched number of return types");
1163 odsState.addTypes(resultTypes);
1164}
1165
1166void NotBoolOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1167 assert(operands.size() == 1u && "mismatched number of parameters");
1168 odsState.addOperands(operands);
1169 odsState.addAttributes(attributes);
1170
1171 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1172 if (::mlir::succeeded(NotBoolOp::inferReturnTypes(odsBuilder.getContext(),
1173 odsState.location, operands,
1174 odsState.attributes.getDictionary(odsState.getContext()),
1175 odsState.getRawProperties(),
1176 odsState.regions, inferredReturnTypes))) {
1177 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
1178 odsState.addTypes(inferredReturnTypes);
1179 } else {
1180 ::llvm::report_fatal_error("Failed to infer result type(s).");
1181 }
1182}
1183
1184::llvm::LogicalResult NotBoolOp::verifyInvariantsImpl() {
1185 {
1186 unsigned index = 0; (void)index;
1187 auto valueGroup0 = getODSOperands(0);
1188
1189 for (auto v : valueGroup0) {
1190 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*this, v.getType(), "operand", index++)))
1191 return ::mlir::failure();
1192 }
1193 }
1194 {
1195 unsigned index = 0; (void)index;
1196 auto valueGroup0 = getODSResults(0);
1197
1198 for (auto v : valueGroup0) {
1199 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "result", index++)))
1200 return ::mlir::failure();
1201 }
1202 }
1203 if (!((::llzk::typesUnify((*this->getODSOperands(0).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
1204 return emitOpError("failed to verify that result type matches with operand type");
1205 return ::mlir::success();
1206}
1207
1208::llvm::LogicalResult NotBoolOp::verifyInvariants() {
1209 return verifyInvariantsImpl();
1210}
1211
1212::llvm::LogicalResult NotBoolOp::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) {
1213 inferredReturnTypes.resize(1);
1214 ::mlir::Builder odsBuilder(context);
1215 ::mlir::Type odsInferredType0 = odsBuilder.getIntegerType(1);
1216 inferredReturnTypes[0] = odsInferredType0;
1217 return ::mlir::success();
1218}
1219
1220::mlir::ParseResult NotBoolOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1221 ::mlir::OpAsmParser::UnresolvedOperand operandRawOperand{};
1222 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> operandOperands(&operandRawOperand, 1); ::llvm::SMLoc operandOperandsLoc;
1223 (void)operandOperandsLoc;
1224 ::mlir::Type operandRawType{};
1225 ::llvm::ArrayRef<::mlir::Type> operandTypes(&operandRawType, 1);
1226
1227 operandOperandsLoc = parser.getCurrentLocation();
1228 if (parser.parseOperand(operandRawOperand))
1229 return ::mlir::failure();
1230 {
1231 auto odsResult = parseInferredOrParsedType(parser, operandRawType, true);
1232 if (odsResult) return ::mlir::failure();
1233 }
1234 {
1235 auto loc = parser.getCurrentLocation();(void)loc;
1236 if (parser.parseOptionalAttrDict(result.attributes))
1237 return ::mlir::failure();
1238 }
1239 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
1240 result.addTypes(odsBuildableType0);
1241 if (parser.resolveOperands(operandOperands, operandTypes, operandOperandsLoc, result.operands))
1242 return ::mlir::failure();
1243 return ::mlir::success();
1244}
1245
1246void NotBoolOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
1247 _odsPrinter << ' ';
1248 _odsPrinter << getOperand();
1249 printInferredOrParsedType(_odsPrinter, *this, getOperand().getType(), true);
1250 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1251 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1252}
1253
1254void NotBoolOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1255}
1256
1257} // namespace boolean
1258} // namespace llzk
1259MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::boolean::NotBoolOp)
1260
1261namespace llzk {
1262namespace boolean {
1263
1264//===----------------------------------------------------------------------===//
1265// ::llzk::boolean::OrBoolOp definitions
1266//===----------------------------------------------------------------------===//
1267
1268namespace detail {
1269} // namespace detail
1271
1272::llvm::LogicalResult OrBoolOpAdaptor::verify(::mlir::Location loc) {
1273 return ::mlir::success();
1274}
1275
1276void OrBoolOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
1277 odsState.addOperands(lhs);
1278 odsState.addOperands(rhs);
1279 odsState.addTypes(result);
1280}
1281
1282void OrBoolOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
1283 odsState.addOperands(lhs);
1284 odsState.addOperands(rhs);
1285
1286 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1287 if (::mlir::succeeded(OrBoolOp::inferReturnTypes(odsBuilder.getContext(),
1288 odsState.location, odsState.operands,
1289 odsState.attributes.getDictionary(odsState.getContext()),
1290 odsState.getRawProperties(),
1291 odsState.regions, inferredReturnTypes)))
1292 odsState.addTypes(inferredReturnTypes);
1293 else
1294 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1295
1296}
1297
1298void OrBoolOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
1299 odsState.addOperands(lhs);
1300 odsState.addOperands(rhs);
1301 assert(resultTypes.size() == 1u && "mismatched number of results");
1302 odsState.addTypes(resultTypes);
1303}
1304
1305void OrBoolOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1306 assert(operands.size() == 2u && "mismatched number of parameters");
1307 odsState.addOperands(operands);
1308 odsState.addAttributes(attributes);
1309 assert(resultTypes.size() == 1u && "mismatched number of return types");
1310 odsState.addTypes(resultTypes);
1311}
1312
1313void OrBoolOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1314 assert(operands.size() == 2u && "mismatched number of parameters");
1315 odsState.addOperands(operands);
1316 odsState.addAttributes(attributes);
1317
1318 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1319 if (::mlir::succeeded(OrBoolOp::inferReturnTypes(odsBuilder.getContext(),
1320 odsState.location, operands,
1321 odsState.attributes.getDictionary(odsState.getContext()),
1322 odsState.getRawProperties(),
1323 odsState.regions, inferredReturnTypes))) {
1324 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
1325 odsState.addTypes(inferredReturnTypes);
1326 } else {
1327 ::llvm::report_fatal_error("Failed to infer result type(s).");
1328 }
1329}
1330
1331::llvm::LogicalResult OrBoolOp::verifyInvariantsImpl() {
1332 {
1333 unsigned index = 0; (void)index;
1334 auto valueGroup0 = getODSOperands(0);
1335
1336 for (auto v : valueGroup0) {
1337 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*this, v.getType(), "operand", index++)))
1338 return ::mlir::failure();
1339 }
1340 auto valueGroup1 = getODSOperands(1);
1341
1342 for (auto v : valueGroup1) {
1343 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*this, v.getType(), "operand", index++)))
1344 return ::mlir::failure();
1345 }
1346 }
1347 {
1348 unsigned index = 0; (void)index;
1349 auto valueGroup0 = getODSResults(0);
1350
1351 for (auto v : valueGroup0) {
1352 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "result", index++)))
1353 return ::mlir::failure();
1354 }
1355 }
1356 if (!((::llzk::typesUnify((*this->getODSOperands(0).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
1357 return emitOpError("failed to verify that result type matches with lhs type");
1358 if (!((::llzk::typesUnify((*this->getODSOperands(1).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
1359 return emitOpError("failed to verify that result type matches with rhs type");
1360 return ::mlir::success();
1361}
1362
1363::llvm::LogicalResult OrBoolOp::verifyInvariants() {
1364 return verifyInvariantsImpl();
1365}
1366
1367::llvm::LogicalResult OrBoolOp::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) {
1368 inferredReturnTypes.resize(1);
1369 ::mlir::Builder odsBuilder(context);
1370 ::mlir::Type odsInferredType0 = odsBuilder.getIntegerType(1);
1371 inferredReturnTypes[0] = odsInferredType0;
1372 return ::mlir::success();
1373}
1374
1375::mlir::ParseResult OrBoolOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1376 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
1377 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
1378 (void)lhsOperandsLoc;
1379 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
1380 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
1381 (void)rhsOperandsLoc;
1382 ::mlir::Type lhsRawType{};
1383 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
1384 ::mlir::Type rhsRawType{};
1385 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
1386
1387 lhsOperandsLoc = parser.getCurrentLocation();
1388 if (parser.parseOperand(lhsRawOperand))
1389 return ::mlir::failure();
1390 if (parser.parseComma())
1391 return ::mlir::failure();
1392
1393 rhsOperandsLoc = parser.getCurrentLocation();
1394 if (parser.parseOperand(rhsRawOperand))
1395 return ::mlir::failure();
1396 {
1397 auto odsResult = parseInferredOrParsedType(parser, lhsRawType, true);
1398 if (odsResult) return ::mlir::failure();
1399 }
1400 {
1401 auto odsResult = parseInferredOrParsedType(parser, rhsRawType, false);
1402 if (odsResult) return ::mlir::failure();
1403 }
1404 {
1405 auto loc = parser.getCurrentLocation();(void)loc;
1406 if (parser.parseOptionalAttrDict(result.attributes))
1407 return ::mlir::failure();
1408 }
1409 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
1410 result.addTypes(odsBuildableType0);
1411 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
1412 return ::mlir::failure();
1413 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
1414 return ::mlir::failure();
1415 return ::mlir::success();
1416}
1417
1418void OrBoolOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
1419 _odsPrinter << ' ';
1420 _odsPrinter << getLhs();
1421 _odsPrinter << ",";
1422 _odsPrinter << ' ';
1423 _odsPrinter << getRhs();
1424 printInferredOrParsedType(_odsPrinter, *this, getLhs().getType(), true);
1425 printInferredOrParsedType(_odsPrinter, *this, getRhs().getType(), false);
1426 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1427 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1428}
1429
1430void OrBoolOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1431}
1432
1433} // namespace boolean
1434} // namespace llzk
1435MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::boolean::OrBoolOp)
1436
1437namespace llzk {
1438namespace boolean {
1439
1440//===----------------------------------------------------------------------===//
1441// ::llzk::boolean::XorBoolOp definitions
1442//===----------------------------------------------------------------------===//
1443
1444namespace detail {
1445} // namespace detail
1447
1448::llvm::LogicalResult XorBoolOpAdaptor::verify(::mlir::Location loc) {
1449 return ::mlir::success();
1450}
1451
1452void XorBoolOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs) {
1453 odsState.addOperands(lhs);
1454 odsState.addOperands(rhs);
1455 odsState.addTypes(result);
1456}
1457
1458void XorBoolOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs) {
1459 odsState.addOperands(lhs);
1460 odsState.addOperands(rhs);
1461
1462 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1463 if (::mlir::succeeded(XorBoolOp::inferReturnTypes(odsBuilder.getContext(),
1464 odsState.location, odsState.operands,
1465 odsState.attributes.getDictionary(odsState.getContext()),
1466 odsState.getRawProperties(),
1467 odsState.regions, inferredReturnTypes)))
1468 odsState.addTypes(inferredReturnTypes);
1469 else
1470 ::mlir::detail::reportFatalInferReturnTypesError(odsState);
1471
1472}
1473
1474void XorBoolOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs) {
1475 odsState.addOperands(lhs);
1476 odsState.addOperands(rhs);
1477 assert(resultTypes.size() == 1u && "mismatched number of results");
1478 odsState.addTypes(resultTypes);
1479}
1480
1481void XorBoolOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1482 assert(operands.size() == 2u && "mismatched number of parameters");
1483 odsState.addOperands(operands);
1484 odsState.addAttributes(attributes);
1485 assert(resultTypes.size() == 1u && "mismatched number of return types");
1486 odsState.addTypes(resultTypes);
1487}
1488
1489void XorBoolOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1490 assert(operands.size() == 2u && "mismatched number of parameters");
1491 odsState.addOperands(operands);
1492 odsState.addAttributes(attributes);
1493
1494 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1495 if (::mlir::succeeded(XorBoolOp::inferReturnTypes(odsBuilder.getContext(),
1496 odsState.location, operands,
1497 odsState.attributes.getDictionary(odsState.getContext()),
1498 odsState.getRawProperties(),
1499 odsState.regions, inferredReturnTypes))) {
1500 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
1501 odsState.addTypes(inferredReturnTypes);
1502 } else {
1503 ::llvm::report_fatal_error("Failed to infer result type(s).");
1504 }
1505}
1506
1507::llvm::LogicalResult XorBoolOp::verifyInvariantsImpl() {
1508 {
1509 unsigned index = 0; (void)index;
1510 auto valueGroup0 = getODSOperands(0);
1511
1512 for (auto v : valueGroup0) {
1513 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*this, v.getType(), "operand", index++)))
1514 return ::mlir::failure();
1515 }
1516 auto valueGroup1 = getODSOperands(1);
1517
1518 for (auto v : valueGroup1) {
1519 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*this, v.getType(), "operand", index++)))
1520 return ::mlir::failure();
1521 }
1522 }
1523 {
1524 unsigned index = 0; (void)index;
1525 auto valueGroup0 = getODSResults(0);
1526
1527 for (auto v : valueGroup0) {
1528 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "result", index++)))
1529 return ::mlir::failure();
1530 }
1531 }
1532 if (!((::llzk::typesUnify((*this->getODSOperands(0).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
1533 return emitOpError("failed to verify that result type matches with lhs type");
1534 if (!((::llzk::typesUnify((*this->getODSOperands(1).begin()).getType(), (*this->getODSResults(0).begin()).getType()))))
1535 return emitOpError("failed to verify that result type matches with rhs type");
1536 return ::mlir::success();
1537}
1538
1539::llvm::LogicalResult XorBoolOp::verifyInvariants() {
1540 return verifyInvariantsImpl();
1541}
1542
1543::llvm::LogicalResult XorBoolOp::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) {
1544 inferredReturnTypes.resize(1);
1545 ::mlir::Builder odsBuilder(context);
1546 ::mlir::Type odsInferredType0 = odsBuilder.getIntegerType(1);
1547 inferredReturnTypes[0] = odsInferredType0;
1548 return ::mlir::success();
1549}
1550
1551::mlir::ParseResult XorBoolOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1552 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
1553 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
1554 (void)lhsOperandsLoc;
1555 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
1556 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
1557 (void)rhsOperandsLoc;
1558 ::mlir::Type lhsRawType{};
1559 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
1560 ::mlir::Type rhsRawType{};
1561 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
1562
1563 lhsOperandsLoc = parser.getCurrentLocation();
1564 if (parser.parseOperand(lhsRawOperand))
1565 return ::mlir::failure();
1566 if (parser.parseComma())
1567 return ::mlir::failure();
1568
1569 rhsOperandsLoc = parser.getCurrentLocation();
1570 if (parser.parseOperand(rhsRawOperand))
1571 return ::mlir::failure();
1572 {
1573 auto odsResult = parseInferredOrParsedType(parser, lhsRawType, true);
1574 if (odsResult) return ::mlir::failure();
1575 }
1576 {
1577 auto odsResult = parseInferredOrParsedType(parser, rhsRawType, false);
1578 if (odsResult) return ::mlir::failure();
1579 }
1580 {
1581 auto loc = parser.getCurrentLocation();(void)loc;
1582 if (parser.parseOptionalAttrDict(result.attributes))
1583 return ::mlir::failure();
1584 }
1585 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
1586 result.addTypes(odsBuildableType0);
1587 if (parser.resolveOperands(lhsOperands, lhsTypes, lhsOperandsLoc, result.operands))
1588 return ::mlir::failure();
1589 if (parser.resolveOperands(rhsOperands, rhsTypes, rhsOperandsLoc, result.operands))
1590 return ::mlir::failure();
1591 return ::mlir::success();
1592}
1593
1594void XorBoolOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
1595 _odsPrinter << ' ';
1596 _odsPrinter << getLhs();
1597 _odsPrinter << ",";
1598 _odsPrinter << ' ';
1599 _odsPrinter << getRhs();
1600 printInferredOrParsedType(_odsPrinter, *this, getLhs().getType(), true);
1601 printInferredOrParsedType(_odsPrinter, *this, getRhs().getType(), false);
1602 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1603 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1604}
1605
1606void XorBoolOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1607}
1608
1609} // namespace boolean
1610} // namespace llzk
1611MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::boolean::XorBoolOp)
1612
1613namespace llzk {
1614namespace boolean {
1615
1616//===----------------------------------------------------------------------===//
1617// ::llzk::boolean::YieldOp definitions
1618//===----------------------------------------------------------------------===//
1619
1620namespace detail {
1621} // namespace detail
1623
1624::llvm::LogicalResult YieldOpAdaptor::verify(::mlir::Location loc) {
1625 return ::mlir::success();
1626}
1627
1628void YieldOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value) {
1629 odsState.addOperands(value);
1630}
1631
1632void YieldOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value value) {
1633 odsState.addOperands(value);
1634 assert(resultTypes.size() == 0u && "mismatched number of results");
1635 odsState.addTypes(resultTypes);
1636}
1637
1638void YieldOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1639 assert(operands.size() == 1u && "mismatched number of parameters");
1640 odsState.addOperands(operands);
1641 odsState.addAttributes(attributes);
1642 assert(resultTypes.size() == 0u && "mismatched number of return types");
1643 odsState.addTypes(resultTypes);
1644}
1645
1646::llvm::LogicalResult YieldOp::verifyInvariantsImpl() {
1647 {
1648 unsigned index = 0; (void)index;
1649 auto valueGroup0 = getODSOperands(0);
1650
1651 for (auto v : valueGroup0) {
1652 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*this, v.getType(), "operand", index++)))
1653 return ::mlir::failure();
1654 }
1655 }
1656 return ::mlir::success();
1657}
1658
1659::llvm::LogicalResult YieldOp::verifyInvariants() {
1660 return verifyInvariantsImpl();
1661}
1662
1663::mlir::ParseResult YieldOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1664 ::mlir::OpAsmParser::UnresolvedOperand valueRawOperand{};
1665 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> valueOperands(&valueRawOperand, 1); ::llvm::SMLoc valueOperandsLoc;
1666 (void)valueOperandsLoc;
1667
1668 valueOperandsLoc = parser.getCurrentLocation();
1669 if (parser.parseOperand(valueRawOperand))
1670 return ::mlir::failure();
1671 {
1672 auto loc = parser.getCurrentLocation();(void)loc;
1673 if (parser.parseOptionalAttrDict(result.attributes))
1674 return ::mlir::failure();
1675 }
1676 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
1677 if (parser.resolveOperands(valueOperands, odsBuildableType0, valueOperandsLoc, result.operands))
1678 return ::mlir::failure();
1679 return ::mlir::success();
1680}
1681
1682void YieldOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
1683 _odsPrinter << ' ';
1684 _odsPrinter << getValue();
1685 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1686 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1687}
1688
1689::mlir::MutableOperandRange YieldOp::getMutableSuccessorOperands(
1690 ::mlir::RegionBranchPoint point) {
1691 return ::mlir::MutableOperandRange(*this);
1692}
1693
1694} // namespace boolean
1695} // namespace llzk
1696MLIR_DEFINE_EXPLICIT_TYPE_ID(::llzk::boolean::YieldOp)
1697
1698
1699#endif // GET_OP_CLASSES
1700
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:374
AndBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:398
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:459
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:378
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:487
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:532
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:465
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:520
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:465
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:477
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:469
::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:469
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:433
AssertOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:607
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:557
::mlir::TypedValue<::mlir::IntegerType > getCondition()
Definition Ops.h.inc:682
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:716
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:615
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition, ::mlir::StringAttr msg)
Definition Ops.cpp.inc:661
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:588
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:635
::std::optional< ::llvm::StringRef > getMsg()
Definition Ops.cpp.inc:648
::mlir::StringAttr getMsgAttr()
Definition Ops.h.inc:710
void setMsg(::std::optional<::llvm::StringRef > attrValue)
Definition Ops.cpp.inc:653
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:604
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:676
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:642
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:747
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:622
FoldAdaptor::Properties Properties
Definition Ops.h.inc:654
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:626
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:712
::mlir::StringAttr getMsgAttrName()
Definition Ops.h.inc:660
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:695
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:565
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:609
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:782
CmpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:820
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:1110
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:882
::mlir::TypedValue<::llzk::felt::FeltType > getLhs()
Definition Ops.h.inc:899
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:848
::mlir::StringAttr getPredicateAttrName()
Definition Ops.h.inc:877
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:921
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1026
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1038
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:835
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:814
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:852
::llzk::boolean::FeltCmpPredicate getPredicate()
Definition Ops.cpp.inc:873
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:991
void setPredicate(::llzk::boolean::FeltCmpPredicate attrValue)
Definition Ops.cpp.inc:878
::llzk::boolean::FeltCmpPredicateAttr getPredicateAttr()
Definition Ops.h.inc:940
::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:1030
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:893
FoldAdaptor::Properties Properties
Definition Ops.h.inc:871
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1095
::mlir::TypedValue<::llzk::felt::FeltType > getRhs()
Definition Ops.h.inc:903
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:868
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:830
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:841
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:861
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:791
ExistsOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:102
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:126
::llvm::LogicalResult verify()
Definition Ops.cpp:277
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:218
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:232
::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:224
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:178
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:189
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:159
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value sort)
Definition Ops.cpp.inc:130
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:250
ForAllOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:254
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:342
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:330
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value sort)
Definition Ops.cpp.inc:254
::llvm::LogicalResult verify()
Definition Ops.cpp:265
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:313
::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:348
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:311
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:356
NotBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1045
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1128
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1184
::mlir::TypedValue<::mlir::Type > getOperand()
Definition Ops.h.inc:1108
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1246
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1220
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1208
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:1254
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value operand)
Definition Ops.cpp.inc:1132
::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:1212
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1102
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:1121
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1272
OrBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1210
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1331
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1271
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:1430
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1418
::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:1367
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:1277
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:1276
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1363
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1375
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:1281
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:1299
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1448
XorBoolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1388
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1507
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1539
::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:1543
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1449
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:1477
::mlir::TypedValue<::mlir::Type > getLhs()
Definition Ops.h.inc:1455
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1594
::mlir::TypedValue<::mlir::Type > getRhs()
Definition Ops.h.inc:1459
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs)
Definition Ops.cpp.inc:1452
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:1606
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1551
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1624
YieldOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1566
::mlir::TypedValue<::mlir::IntegerType > getValue()
Definition Ops.h.inc:1629
::mlir::MutableOperandRange getMutableSuccessorOperands(::mlir::RegionBranchPoint point)
Definition Ops.cpp.inc:1689
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1663
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1623
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1646
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value)
Definition Ops.cpp.inc:1628
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1682
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1659
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:572
AssertOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:576
::std::optional< ::llvm::StringRef > getMsg()
Definition Ops.cpp.inc:549
::llzk::boolean::FeltCmpPredicateAttr getPredicateAttr()
Definition Ops.h.inc:807
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:785
CmpOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:789
::llzk::boolean::FeltCmpPredicate getPredicate()
Definition Ops.cpp.inc:774
bool typesUnify(Type lhs, Type rhs, ArrayRef< StringRef > rhsReversePrefix, UnificationMap *unifications)