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, ::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() {
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;
53struct FieldSpecAttrStorage;
55class FieldSpecAttr :
public ::mlir::Attribute::AttrBase<FieldSpecAttr, ::mlir::Attribute, detail::FieldSpecAttrStorage> {
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() {
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;
74MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::felt::FeltConstAttr)
75MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::felt::FieldSpecAttr)