LLZK 3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
Ops.h.inc
Go to the documentation of this file.
1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* Op Declarations *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* From: Ops.td *|
7|* *|
8\*===----------------------------------------------------------------------===*/
9
10namespace llzk::cast {
11
32class FeltToIndexOp;
33
34} // namespace llzk::cast
35namespace llzk::cast {
36
64class IntToFeltOp;
65
66} // namespace llzk::cast
67#ifdef GET_OP_CLASSES
68#undef GET_OP_CLASSES
69
70namespace llzk::cast {
71
72
73//===----------------------------------------------------------------------===//
74// ::llzk::cast::FeltToIndexOp declarations
75//===----------------------------------------------------------------------===//
76
77namespace detail {
78
80public:
81 struct Properties {
82 using overflowTy = ::llzk::cast::OverflowSemanticsAttr;
84
85 auto getOverflow() const {
86 auto &propStorage = this->overflow;
87 return ::llvm::dyn_cast_or_null<::llzk::cast::OverflowSemanticsAttr>(propStorage);
88 }
89 void setOverflow(const ::llzk::cast::OverflowSemanticsAttr &propValue) {
90 this->overflow = propValue;
91 }
92 bool operator==(const Properties &rhs) const {
93 return
94 rhs.overflow == this->overflow &&
95 true;
96 }
97 bool operator!=(const Properties &rhs) const {
98 return !(*this == rhs);
99 }
100 };
101protected:
102 ::mlir::DictionaryAttr odsAttrs;
103 ::std::optional<::mlir::OperationName> odsOpName;
105 ::mlir::RegionRange odsRegions;
106public:
107 FeltToIndexOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
108 odsOpName.emplace("cast.toindex", odsAttrs.getContext());
109 }
110
112
113 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
114 return {index, 1};
115 }
116
118 return properties;
119 }
120
121 ::mlir::DictionaryAttr getAttributes() {
122 return odsAttrs;
123 }
124
125 ::llzk::cast::OverflowSemanticsAttr getOverflowAttr();
127};
128
129} // namespace detail
130template <typename RangeT>
132 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
134 static constexpr int odsIndex_value = 0;
135public:
136 FeltToIndexOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
137
138 FeltToIndexOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : FeltToIndexOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
139
140 FeltToIndexOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : FeltToIndexOpGenericAdaptor(values, attrs, Properties{}, {}) {}
141
142 FeltToIndexOpGenericAdaptor(RangeT values, const FeltToIndexOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
143
144 template <typename LateInst = FeltToIndexOp, typename = std::enable_if_t<std::is_same_v<LateInst, FeltToIndexOp>>>
145 FeltToIndexOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
146
147 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
148 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
149 }
150
151 RangeT getODSOperands(unsigned index) {
152 auto valueRange = getODSOperandIndexAndLength(index);
153 return {std::next(odsOperands.begin(), valueRange.first),
154 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
155 }
156
157 ValueT getValue() {
158 return (*getODSOperands(0).begin());
159 }
160
161 RangeT getOperands() {
162 return odsOperands;
163 }
164
165private:
166 RangeT odsOperands;
167};
168class FeltToIndexOpAdaptor : public FeltToIndexOpGenericAdaptor<::mlir::ValueRange> {
169public:
172
173 ::llvm::LogicalResult verify(::mlir::Location loc);
174};
175class FeltToIndexOp : public ::mlir::Op<FeltToIndexOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IndexType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::llzk::function::NotFieldNative, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::InferTypeOpInterface::Trait> {
176public:
177 using Op::Op;
178 using Op::print;
180 template <typename RangeT>
183 static constexpr int odsIndex_value = 0;
185 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
186 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("overflow")};
187 return ::llvm::ArrayRef(attrNames);
188 }
189
190 ::mlir::StringAttr getOverflowAttrName() {
191 return getAttributeNameForIndex(0);
192 }
193
194 static ::mlir::StringAttr getOverflowAttrName(::mlir::OperationName name) {
195 return getAttributeNameForIndex(name, 0);
196 }
197
198 static constexpr ::llvm::StringLiteral getOperationName() {
199 return ::llvm::StringLiteral("cast.toindex");
200 }
201
202 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
203 return {index, 1};
204 }
205
206 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
207 auto valueRange = getODSOperandIndexAndLength(index);
208 return {std::next(getOperation()->operand_begin(), valueRange.first),
209 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
210 }
211
212 ::mlir::TypedValue<::llzk::felt::FeltType> getValue() {
213 return ::llvm::cast<::mlir::TypedValue<::llzk::felt::FeltType>>(*getODSOperands(0).begin());
214 }
215
216 ::mlir::OpOperand &getValueMutable() {
217 auto range = getODSOperandIndexAndLength(0);
218 return getOperation()->getOpOperand(range.first);
219 }
220
221 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
222 return {index, 1};
223 }
224
225 ::mlir::Operation::result_range getODSResults(unsigned index) {
226 auto valueRange = getODSResultIndexAndLength(index);
227 return {std::next(getOperation()->result_begin(), valueRange.first),
228 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
229 }
230
231 ::mlir::TypedValue<::mlir::IndexType> getResult() {
232 return ::llvm::cast<::mlir::TypedValue<::mlir::IndexType>>(*getODSResults(0).begin());
233 }
234
235 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
236 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
237 static llvm::hash_code computePropertiesHash(const Properties &prop);
238 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
239 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
240 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
241 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
242 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
243 void writeProperties(::mlir::DialectBytecodeWriter &writer);
244 ::llzk::cast::OverflowSemanticsAttr getOverflowAttr() {
245 return ::llvm::dyn_cast_or_null<::llzk::cast::OverflowSemanticsAttr>(getProperties().overflow);
246 }
247
249 void setOverflowAttr(::llzk::cast::OverflowSemanticsAttr attr) {
250 getProperties().overflow = attr;
251 }
252
254 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
255 static FeltToIndexOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
256 static FeltToIndexOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
257 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
258 static FeltToIndexOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
259 static FeltToIndexOp create(::mlir::ImplicitLocOpBuilder &builder, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
260 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
261 static FeltToIndexOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
262 static FeltToIndexOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
263 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::cast::OverflowSemantics overflow, ::mlir::Value value);
264 static FeltToIndexOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::llzk::cast::OverflowSemantics overflow, ::mlir::Value value);
265 static FeltToIndexOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::llzk::cast::OverflowSemantics overflow, ::mlir::Value value);
266 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::cast::OverflowSemantics overflow, ::mlir::Value value);
267 static FeltToIndexOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llzk::cast::OverflowSemantics overflow, ::mlir::Value value);
268 static FeltToIndexOp create(::mlir::ImplicitLocOpBuilder &builder, ::llzk::cast::OverflowSemantics overflow, ::mlir::Value value);
269 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llzk::cast::OverflowSemantics overflow, ::mlir::Value value);
270 static FeltToIndexOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::llzk::cast::OverflowSemantics overflow, ::mlir::Value value);
271 static FeltToIndexOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::llzk::cast::OverflowSemantics overflow, ::mlir::Value value);
272 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
273 static FeltToIndexOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
274 static FeltToIndexOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
275 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
276 static FeltToIndexOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
277 static FeltToIndexOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
278 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
279 static FeltToIndexOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
280 static FeltToIndexOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
281 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
282 static FeltToIndexOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
283 static FeltToIndexOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
284 static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
285 ::llvm::LogicalResult verifyInvariantsImpl();
286 ::llvm::LogicalResult verifyInvariants();
287 ::mlir::OpFoldResult fold(FoldAdaptor adaptor);
288 static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
289 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
290 ::mlir::Speculation::Speculatability getSpeculatability();
291 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
292 void print(::mlir::OpAsmPrinter &_odsPrinter);
293private:
294 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
295 return getAttributeNameForIndex((*this)->getName(), index);
296 }
297
298 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
299 assert(index < 1 && "invalid attribute index");
300 assert(name.getStringRef() == getOperationName() && "invalid operation name");
301 assert(name.isRegistered() && "Operation isn't registered, missing a "
302 "dependent dialect loading?");
303 return name.getAttributeNames()[index];
304 }
305
306public:
307 static ::mlir::ParseResult parseOptionalOverflowSemantics(
308 ::mlir::OpAsmParser &parser, ::llzk::cast::OverflowSemanticsAttr &overflow
309 );
310
312 ::mlir::OpAsmPrinter &printer, FeltToIndexOp op,
313 ::llzk::cast::OverflowSemanticsAttr overflow
314 );
315
316 private:
317 static ::mlir::ParseResult parseInferredOrParsedType(
318 ::mlir::OpAsmParser &parser, ::mlir::Type &opType, bool isFirst
319 ) {
320 if (mlir::succeeded(isFirst ? parser.parseOptionalColon() : parser.parseOptionalComma())) {
321 // If there is a comma, parse the `opType`
322 mlir::Type type;
323 if (parser.parseCustomTypeWithFallback(type)) {
324 return mlir::failure();
325 }
326 opType = type;
327 } else {
328 // Otherwise, build the default type
329 opType =
330 ::llzk::felt::FeltType::get(parser.getBuilder().getContext());
331 }
332 return mlir::success();
333 }
334
335 static void printInferredOrParsedType(::mlir::OpAsmPrinter &printer,
336 ::mlir::Operation *op, ::mlir::Type opType, bool isFirst
337 ) {
338 printer << (isFirst ? " : " : ", ");
339 printer.printStrippedAttrOrType(opType);
340 }
341};
342
343} // namespace llzk::cast
344MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::cast::FeltToIndexOp)
346
347namespace llzk::cast {
348
349
350//===----------------------------------------------------------------------===//
351// ::llzk::cast::IntToFeltOp declarations
352//===----------------------------------------------------------------------===//
353
354namespace detail {
355
357public:
358 struct Properties {
359 using overflowTy = ::llzk::cast::OverflowSemanticsAttr;
361
362 auto getOverflow() const {
363 auto &propStorage = this->overflow;
364 return ::llvm::dyn_cast_or_null<::llzk::cast::OverflowSemanticsAttr>(propStorage);
365 }
366 void setOverflow(const ::llzk::cast::OverflowSemanticsAttr &propValue) {
367 this->overflow = propValue;
368 }
369 bool operator==(const Properties &rhs) const {
370 return
371 rhs.overflow == this->overflow &&
372 true;
373 }
374 bool operator!=(const Properties &rhs) const {
375 return !(*this == rhs);
376 }
377 };
378protected:
379 ::mlir::DictionaryAttr odsAttrs;
380 ::std::optional<::mlir::OperationName> odsOpName;
382 ::mlir::RegionRange odsRegions;
383public:
384 IntToFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
385 odsOpName.emplace("cast.tofelt", odsAttrs.getContext());
386 }
387
389
390 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
391 return {index, 1};
392 }
393
395 return properties;
396 }
397
398 ::mlir::DictionaryAttr getAttributes() {
399 return odsAttrs;
400 }
401
402 ::llzk::cast::OverflowSemanticsAttr getOverflowAttr();
404};
405
406} // namespace detail
407template <typename RangeT>
409 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
411 static constexpr int odsIndex_value = 0;
412public:
413 IntToFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
414
415 IntToFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : IntToFeltOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
416
417 IntToFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : IntToFeltOpGenericAdaptor(values, attrs, Properties{}, {}) {}
418
419 IntToFeltOpGenericAdaptor(RangeT values, const IntToFeltOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
420
421 template <typename LateInst = IntToFeltOp, typename = std::enable_if_t<std::is_same_v<LateInst, IntToFeltOp>>>
422 IntToFeltOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
423
424 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
425 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
426 }
427
428 RangeT getODSOperands(unsigned index) {
429 auto valueRange = getODSOperandIndexAndLength(index);
430 return {std::next(odsOperands.begin(), valueRange.first),
431 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
432 }
433
434 ValueT getValue() {
435 return (*getODSOperands(0).begin());
436 }
437
438 RangeT getOperands() {
439 return odsOperands;
440 }
441
442private:
443 RangeT odsOperands;
444};
445class IntToFeltOpAdaptor : public IntToFeltOpGenericAdaptor<::mlir::ValueRange> {
446public:
449
450 ::llvm::LogicalResult verify(::mlir::Location loc);
451};
452class IntToFeltOp : public ::mlir::Op<IntToFeltOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::llzk::felt::FeltType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait> {
453public:
454 using Op::Op;
455 using Op::print;
457 template <typename RangeT>
460 static constexpr int odsIndex_value = 0;
462 using ::mlir::InferTypeOpInterface::Trait<IntToFeltOp>::refineReturnTypes;
463 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
464 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("overflow")};
465 return ::llvm::ArrayRef(attrNames);
466 }
467
468 ::mlir::StringAttr getOverflowAttrName() {
469 return getAttributeNameForIndex(0);
470 }
471
472 static ::mlir::StringAttr getOverflowAttrName(::mlir::OperationName name) {
473 return getAttributeNameForIndex(name, 0);
474 }
475
476 static constexpr ::llvm::StringLiteral getOperationName() {
477 return ::llvm::StringLiteral("cast.tofelt");
478 }
479
480 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
481 return {index, 1};
482 }
483
484 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
485 auto valueRange = getODSOperandIndexAndLength(index);
486 return {std::next(getOperation()->operand_begin(), valueRange.first),
487 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
488 }
489
490 ::mlir::TypedValue<::mlir::Type> getValue() {
491 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
492 }
493
494 ::mlir::OpOperand &getValueMutable() {
495 auto range = getODSOperandIndexAndLength(0);
496 return getOperation()->getOpOperand(range.first);
497 }
498
499 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
500 return {index, 1};
501 }
502
503 ::mlir::Operation::result_range getODSResults(unsigned index) {
504 auto valueRange = getODSResultIndexAndLength(index);
505 return {std::next(getOperation()->result_begin(), valueRange.first),
506 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
507 }
508
509 ::mlir::TypedValue<::llzk::felt::FeltType> getResult() {
510 return ::llvm::cast<::mlir::TypedValue<::llzk::felt::FeltType>>(*getODSResults(0).begin());
511 }
512
513 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
514 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
515 static llvm::hash_code computePropertiesHash(const Properties &prop);
516 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
517 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
518 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
519 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
520 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
521 void writeProperties(::mlir::DialectBytecodeWriter &writer);
522 ::llzk::cast::OverflowSemanticsAttr getOverflowAttr() {
523 return ::llvm::dyn_cast_or_null<::llzk::cast::OverflowSemanticsAttr>(getProperties().overflow);
524 }
525
527 void setOverflowAttr(::llzk::cast::OverflowSemanticsAttr attr) {
528 getProperties().overflow = attr;
529 }
530
532 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
533 static IntToFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
534 static IntToFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
535 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
536 static IntToFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
537 static IntToFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
538 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
539 static IntToFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
540 static IntToFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
541 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::cast::OverflowSemantics overflow, ::mlir::Value value);
542 static IntToFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::llzk::cast::OverflowSemantics overflow, ::mlir::Value value);
543 static IntToFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::llzk::cast::OverflowSemantics overflow, ::mlir::Value value);
544 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::cast::OverflowSemantics overflow, ::mlir::Value value);
545 static IntToFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llzk::cast::OverflowSemantics overflow, ::mlir::Value value);
546 static IntToFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::llzk::cast::OverflowSemantics overflow, ::mlir::Value value);
547 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llzk::cast::OverflowSemantics overflow, ::mlir::Value value);
548 static IntToFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::llzk::cast::OverflowSemantics overflow, ::mlir::Value value);
549 static IntToFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::llzk::cast::OverflowSemantics overflow, ::mlir::Value value);
550 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
551 static IntToFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
552 static IntToFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
553 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
554 static IntToFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
555 static IntToFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
556 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
557 static IntToFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
558 static IntToFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
559 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
560 static IntToFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
561 static IntToFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
562 static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
563 ::llvm::LogicalResult verifyInvariantsImpl();
564 ::llvm::LogicalResult verifyInvariants();
565 ::mlir::OpFoldResult fold(FoldAdaptor adaptor);
566 static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
567 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
568 ::mlir::Speculation::Speculatability getSpeculatability();
569 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
570 void print(::mlir::OpAsmPrinter &_odsPrinter);
571private:
572 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
573 return getAttributeNameForIndex((*this)->getName(), index);
574 }
575
576 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
577 assert(index < 1 && "invalid attribute index");
578 assert(name.getStringRef() == getOperationName() && "invalid operation name");
579 assert(name.isRegistered() && "Operation isn't registered, missing a "
580 "dependent dialect loading?");
581 return name.getAttributeNames()[index];
582 }
583
584public:
585 static bool isCompatibleReturnTypes(::mlir::TypeRange lhs, ::mlir::TypeRange rhs);
586 static ::mlir::ParseResult parseOptionalOverflowSemantics(
587 ::mlir::OpAsmParser &parser, ::llzk::cast::OverflowSemanticsAttr &overflow
588 );
589
591 ::mlir::OpAsmPrinter &printer, IntToFeltOp op,
592 ::llzk::cast::OverflowSemanticsAttr overflow
593 );
594
595 private:
596 static ::mlir::ParseResult parseInferredOrParsedType(
597 ::mlir::OpAsmParser &parser, ::mlir::Type &opType, bool isFirst
598 ) {
599 if (mlir::succeeded(isFirst ? parser.parseOptionalColon() : parser.parseOptionalComma())) {
600 // If there is a comma, parse the `opType`
601 mlir::Type type;
602 if (parser.parseCustomTypeWithFallback(type)) {
603 return mlir::failure();
604 }
605 opType = type;
606 } else {
607 // Otherwise, build the default type
608 opType =
609 ::llzk::felt::FeltType::get(parser.getBuilder().getContext());
610 }
611 return mlir::success();
612 }
613
614 static void printInferredOrParsedType(::mlir::OpAsmPrinter &printer,
615 ::mlir::Operation *op, ::mlir::Type opType, bool isFirst
616 ) {
617 printer << (isFirst ? " : " : ", ");
618 printer.printStrippedAttrOrType(opType);
619 }
620};
621
622} // namespace llzk::cast
623MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::cast::IntToFeltOp)
625
626
627#endif // GET_OP_CLASSES
628
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:94
FeltToIndexOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:136
FeltToIndexOpAdaptor(FeltToIndexOp op)
Definition Ops.cpp.inc:92
FeltToIndexOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:145
FeltToIndexOpGenericAdaptor(RangeT values, const FeltToIndexOpGenericAdaptorBase &base)
Definition Ops.h.inc:142
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:147
FeltToIndexOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:138
FeltToIndexOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:140
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:151
FeltToIndexOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:136
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties)
Definition Ops.cpp.inc:452
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:160
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:484
::llzk::cast::OverflowSemantics getOverflow()
Definition Ops.cpp.inc:186
void setOverflowAttr(::llzk::cast::OverflowSemanticsAttr attr)
Definition Ops.h.inc:249
::mlir::OpFoldResult fold(FoldAdaptor adaptor)
Definition Ops.cpp:124
::mlir::StringAttr getOverflowAttrName(::mlir::OperationName name)
Definition Ops.h.inc:194
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:102
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:153
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:185
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Model possible assertion failure as program termination, like bool.assert.
Definition Ops.cpp.inc:550
static FeltToIndexOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value)
Definition Ops.cpp.inc:203
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:221
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value)
Definition Ops.cpp.inc:195
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:141
::mlir::OpOperand & getValueMutable()
Definition Ops.h.inc:216
::mlir::TypedValue<::llzk::felt::FeltType > getValue()
Definition Ops.h.inc:212
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:202
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:533
::mlir::StringAttr getOverflowAttrName()
Definition Ops.h.inc:190
::llzk::cast::OverflowSemanticsAttr getOverflowAttr()
Definition Ops.h.inc:244
FoldAdaptor::Properties Properties
Definition Ops.h.inc:184
::mlir::TypedValue<::mlir::IndexType > getResult()
Definition Ops.h.inc:231
static constexpr int odsIndex_value
Definition Ops.h.inc:183
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:225
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:180
FeltToIndexOpAdaptor Adaptor
Definition Ops.h.inc:179
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:173
FeltToIndexOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:181
::mlir::Speculation::Speculatability getSpeculatability()
Only infallible casts may execute on paths where they were not present.
Definition Ops.cpp.inc:559
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:182
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:488
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:125
static void printOptionalOverflowSemantics(::mlir::OpAsmPrinter &printer, FeltToIndexOp op, ::llzk::cast::OverflowSemanticsAttr overflow)
Definition Ops.cpp:148
void setOverflow(::llzk::cast::OverflowSemantics attrValue)
Definition Ops.cpp.inc:191
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:496
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:206
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:458
::mlir::ParseResult parseOptionalOverflowSemantics(::mlir::OpAsmParser &parser, ::llzk::cast::OverflowSemanticsAttr &overflow)
Definition Ops.cpp:142
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:198
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:164
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:147
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:594
IntToFeltOpAdaptor(IntToFeltOp op)
Definition Ops.cpp.inc:592
IntToFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:413
IntToFeltOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:422
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:424
IntToFeltOpGenericAdaptor(RangeT values, const IntToFeltOpGenericAdaptorBase &base)
Definition Ops.h.inc:419
IntToFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:415
IntToFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:413
IntToFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:417
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:428
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:664
::mlir::OpFoldResult fold(FoldAdaptor adaptor)
Definition Ops.cpp:96
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:459
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties)
Definition Ops.cpp.inc:952
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1043
void setOverflow(::llzk::cast::OverflowSemantics attrValue)
Definition Ops.cpp.inc:691
::mlir::StringAttr getOverflowAttrName(::mlir::OperationName name)
Definition Ops.h.inc:472
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:958
::llzk::cast::OverflowSemanticsAttr getOverflowAttr()
Definition Ops.h.inc:522
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:660
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:476
::mlir::StringAttr getOverflowAttrName()
Definition Ops.h.inc:468
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Model possible assertion failure as program termination, like bool.assert.
Definition Ops.cpp.inc:1069
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:480
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value)
Definition Ops.cpp.inc:695
void setOverflowAttr(::llzk::cast::OverflowSemanticsAttr attr)
Definition Ops.h.inc:527
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:625
static constexpr int odsIndex_value
Definition Ops.h.inc:460
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:602
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:463
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:499
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:641
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:647
FoldAdaptor::Properties Properties
Definition Ops.h.inc:461
IntToFeltOpAdaptor Adaptor
Definition Ops.h.inc:456
static void printOptionalOverflowSemantics(::mlir::OpAsmPrinter &printer, IntToFeltOp op, ::llzk::cast::OverflowSemanticsAttr overflow)
Definition Ops.cpp:118
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:484
::mlir::ParseResult parseOptionalOverflowSemantics(::mlir::OpAsmParser &parser, ::llzk::cast::OverflowSemanticsAttr &overflow)
Definition Ops.cpp:114
::mlir::TypedValue<::llzk::felt::FeltType > getResult()
Definition Ops.h.inc:509
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:996
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:673
IntToFeltOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:458
::llzk::cast::OverflowSemantics getOverflow()
Definition Ops.cpp.inc:686
::mlir::Speculation::Speculatability getSpeculatability()
Only infallible casts may execute on paths where they were not present.
Definition Ops.cpp.inc:1078
static IntToFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value)
Definition Ops.cpp.inc:703
static bool isCompatibleReturnTypes(::mlir::TypeRange lhs, ::mlir::TypeRange rhs)
Definition Ops.cpp:73
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:680
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:503
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:984
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:653
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:988
::mlir::TypedValue<::mlir::Type > getValue()
Definition Ops.h.inc:490
::mlir::OpOperand & getValueMutable()
Definition Ops.h.inc:494
FeltToIndexOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:107
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:103
::llzk::cast::OverflowSemanticsAttr getOverflowAttr()
Definition Ops.cpp.inc:80
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:113
::llzk::cast::OverflowSemantics getOverflow()
Definition Ops.cpp.inc:85
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:380
::llzk::cast::OverflowSemantics getOverflow()
Definition Ops.cpp.inc:585
::llzk::cast::OverflowSemanticsAttr getOverflowAttr()
Definition Ops.cpp.inc:580
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:390
IntToFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:384
static FeltType get(::mlir::MLIRContext *context, ::mlir::StringAttr fieldName)
Definition Types.cpp.inc:69
void setOverflow(const ::llzk::cast::OverflowSemanticsAttr &propValue)
Definition Ops.h.inc:89
void setOverflow(const ::llzk::cast::OverflowSemanticsAttr &propValue)
Definition Ops.h.inc:366