LLZK 2.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 {
18namespace felt {
19class FeltConstAttr;
20class FieldSpecAttr;
21namespace detail {
22struct FeltConstAttrStorage;
23} // namespace detail
24class FeltConstAttr : public ::mlir::Attribute::AttrBase<FeltConstAttr, ::mlir::Attribute, detail::FeltConstAttrStorage, ::mlir::TypedAttr::Trait> {
25public:
26 using Base::Base;
27 operator ::llvm::APInt() const { return getValue(); }
28
31 ::mlir::StringAttr getFieldName() const;
32 static constexpr ::llvm::StringLiteral name = "felt.const";
33 static constexpr ::llvm::StringLiteral dialectName = "felt";
34 static FeltConstAttr get(::mlir::MLIRContext *context, ::llvm::APInt value, FeltType type);
35 static FeltConstAttr get(::mlir::MLIRContext *context, unsigned numBits, ::llvm::StringRef str, FeltType ty);
36 static FeltConstAttr get(::mlir::MLIRContext *context, unsigned numBits, ::llvm::ArrayRef<uint64_t> parts, FeltType ty);
37 static FeltConstAttr get(::mlir::MLIRContext *context, ::llvm::APInt value);
38 static FeltConstAttr get(::mlir::MLIRContext *context, unsigned numBits, ::llvm::StringRef str);
39 static FeltConstAttr get(::mlir::MLIRContext *context, unsigned numBits, ::llvm::ArrayRef<uint64_t> parts);
40 static FeltConstAttr get(::mlir::MLIRContext *context, ::llvm::APInt value, ::llvm::StringRef fieldName);
41 static FeltConstAttr get(::mlir::MLIRContext *context, unsigned numBits, ::llvm::StringRef str, ::llvm::StringRef fieldName);
42 static FeltConstAttr get(::mlir::MLIRContext *context, unsigned numBits, ::llvm::ArrayRef<uint64_t> parts, ::llvm::StringRef fieldName);
43 static constexpr ::llvm::StringLiteral getMnemonic() {
44 return {"const"};
45 }
46
47 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
48 void print(::mlir::AsmPrinter &odsPrinter) const;
49 ::llvm::APInt getValue() const;
50 FeltType getType() const;
51};
52namespace detail {
53struct FieldSpecAttrStorage;
54} // namespace detail
55class FieldSpecAttr : public ::mlir::Attribute::AttrBase<FieldSpecAttr, ::mlir::Attribute, detail::FieldSpecAttrStorage> {
56public:
57 using Base::Base;
58 static constexpr ::llvm::StringLiteral name = "felt.field";
59 static constexpr ::llvm::StringLiteral dialectName = "felt";
60 static FieldSpecAttr get(::mlir::MLIRContext *context, ::mlir::StringAttr fieldName, ::llvm::APInt prime);
61 static FieldSpecAttr get(::mlir::MLIRContext *context, ::llvm::StringRef fieldName, unsigned numBits, ::llvm::StringRef primeStr);
62 static FieldSpecAttr get(::mlir::MLIRContext *context, ::llvm::StringRef fieldName, unsigned numBits, ::llvm::ArrayRef<uint64_t> parts);
63 static constexpr ::llvm::StringLiteral getMnemonic() {
64 return {"field"};
65 }
66
67 static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
68 void print(::mlir::AsmPrinter &odsPrinter) const;
69 ::mlir::StringAttr getFieldName() const;
70 ::llvm::APInt getPrime() const;
71};
72} // namespace felt
73} // namespace llzk
74MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::felt::FeltConstAttr)
75MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::felt::FieldSpecAttr)
76
77#endif // GET_ATTRDEF_CLASSES
78