LLZK 3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
Attrs.h.inc
Go to the documentation of this file.
1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* AttrDef Declarations *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* *|
7\*===----------------------------------------------------------------------===*/
8
9#ifdef GET_ATTRDEF_CLASSES
10#undef GET_ATTRDEF_CLASSES
11
12
13namespace mlir {
14class AsmParser;
15class AsmPrinter;
16} // namespace mlir
17namespace llzk::felt {
18
32class FeltConstAttr;
56class FieldSpecAttr;
57namespace detail {
58
59struct FeltConstAttrStorage;
60
61} // namespace detail
62class FeltConstAttr : public ::mlir::Attribute::AttrBase<FeltConstAttr, ::mlir::Attribute, detail::FeltConstAttrStorage, ::mlir::TypedAttr::Trait> {
63public:
64 using Base::Base;
67 ::mlir::StringAttr getFieldName() const;
68
71 std::optional<::llvm::DynamicAPInt> getReducedValue() const;
72
75 ::llvm::DynamicAPInt getReducedValueOrRaw() const;
76 static constexpr ::llvm::StringLiteral name = "felt.const";
77 static constexpr ::llvm::StringLiteral dialectName = "felt";
78 static FeltConstAttr get(::mlir::MLIRContext *context, ::llzk::DynamicAPIntValue rawValue, FeltType type);
79 static FeltConstAttr get(::mlir::MLIRContext *context, const ::llvm::DynamicAPInt &rawValue, FeltType ty);
80 static FeltConstAttr get(::mlir::MLIRContext *context, const ::llvm::DynamicAPInt &rawValue);
81 static FeltConstAttr get(::mlir::MLIRContext *context, const ::llvm::DynamicAPInt &rawValue, ::llvm::StringRef fieldName);
82 static FeltConstAttr get(::mlir::MLIRContext *context, ::llvm::ArrayRef<uint64_t> parts, FeltType ty);
83 static FeltConstAttr get(::mlir::MLIRContext *context, ::llvm::ArrayRef<uint64_t> parts);
84 static FeltConstAttr get(::mlir::MLIRContext *context, ::llvm::ArrayRef<uint64_t> parts, ::llvm::StringRef fieldName);
85 static constexpr ::llvm::StringLiteral getMnemonic() {
86 return {"const"};
87 }
88
89 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
90 void print(::mlir::AsmPrinter &odsPrinter) const;
91 const ::llvm::DynamicAPInt &getRawValue() const;
92 FeltType getType() const;
93};
94namespace detail {
95
96struct FieldSpecAttrStorage;
97
98} // namespace detail
99class FieldSpecAttr : public ::mlir::Attribute::AttrBase<FieldSpecAttr, ::mlir::Attribute, detail::FieldSpecAttrStorage> {
100public:
101 using Base::Base;
102 static constexpr ::llvm::StringLiteral name = "felt.field";
103 static constexpr ::llvm::StringLiteral dialectName = "felt";
104 using Base::getChecked;
105 static FieldSpecAttr get(::mlir::MLIRContext *context, ::mlir::StringAttr fieldName, ::llzk::DynamicAPIntValue prime);
106 static FieldSpecAttr getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, ::mlir::StringAttr fieldName, ::llzk::DynamicAPIntValue prime);
107 static FieldSpecAttr get(::mlir::MLIRContext *context, ::mlir::StringAttr fieldName, const ::llvm::DynamicAPInt &prime);
108 static FieldSpecAttr getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, ::mlir::StringAttr fieldName, const ::llvm::DynamicAPInt &prime);
109 static FieldSpecAttr get(::mlir::MLIRContext *context, ::mlir::StringAttr fieldName, ::llvm::ArrayRef<uint64_t> parts);
110 static FieldSpecAttr getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, ::mlir::StringAttr fieldName, ::llvm::ArrayRef<uint64_t> parts);
111 static FieldSpecAttr get(::mlir::MLIRContext *context, ::llvm::StringRef fieldName, ::llvm::ArrayRef<uint64_t> parts);
112 static FieldSpecAttr getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, ::llvm::StringRef fieldName, ::llvm::ArrayRef<uint64_t> parts);
113 static ::llvm::LogicalResult verify(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::StringAttr fieldName, ::llzk::DynamicAPIntValue prime);
114 static ::llvm::LogicalResult verifyInvariants(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::StringAttr fieldName, ::llzk::DynamicAPIntValue prime);
115 static constexpr ::llvm::StringLiteral getMnemonic() {
116 return {"field"};
117 }
118
119 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
120 void print(::mlir::AsmPrinter &odsPrinter) const;
121 ::mlir::StringAttr getFieldName() const;
122 const ::llvm::DynamicAPInt &getPrime() const;
123};
124
125} // namespace llzk::felt
126MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::felt::FeltConstAttr)
127MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::felt::FieldSpecAttr)
128
129#endif // GET_ATTRDEF_CLASSES
130
Common interface for binary arithmetic operations on felts.