9#ifdef GET_ATTRDEF_CLASSES
10#undef GET_ATTRDEF_CLASSES
22struct FeltConstAttrStorage;
24class FeltConstAttr :
public ::mlir::Attribute::AttrBase<FeltConstAttr, ::mlir::Attribute, detail::FeltConstAttrStorage, ::mlir::TypedAttr::Trait> {
27 operator ::llvm::APInt()
const {
return getValue(); }
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() {
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;
54struct FieldSpecAttrStorage;
56class FieldSpecAttr :
public ::mlir::Attribute::AttrBase<FieldSpecAttr, ::mlir::Attribute, detail::FieldSpecAttrStorage> {
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() {
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;
76MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::felt::FeltConstAttr)
77MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::felt::FieldSpecAttr)