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