LLZK 3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
Types.h.inc
Go to the documentation of this file.
1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* TypeDef Declarations *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* *|
7\*===----------------------------------------------------------------------===*/
8
9#ifdef GET_TYPEDEF_CLASSES
10#undef GET_TYPEDEF_CLASSES
11
12
13namespace mlir {
14class AsmParser;
15class AsmPrinter;
16} // namespace mlir
17namespace llzk::array {
18
42class ArrayType;
43namespace detail {
44
45struct ArrayTypeStorage;
46
47} // namespace detail
48class ArrayType : public ::mlir::Type::TypeBase<ArrayType, ::mlir::Type, detail::ArrayTypeStorage, ::mlir::ShapedType::Trait, ::mlir::DestructurableTypeInterface::Trait> {
49public:
50 using Base::Base;
51 private:
54 bool collectIndices(::llvm::function_ref<void(::mlir::ArrayAttr)>) const;
55
56 public:
58 std::optional<::llvm::SmallVector<::mlir::ArrayAttr>> getSubelementIndices() const;
59
63 inline bool hasRank() const { return true; }
64
68 ::mlir::Type getSelectionType(size_t numIndices) const;
69
73 ArrayType cloneWith(std::optional<::llvm::ArrayRef<int64_t>> shape, ::mlir::Type elementType) const;
74
80 ArrayType cloneWith(::mlir::Type elementType, std::optional<::llvm::ArrayRef<::mlir::Attribute>> dimensions = std::nullopt) const;
81 static constexpr ::llvm::StringLiteral name = "array.type";
82 static constexpr ::llvm::StringLiteral dialectName = "array";
83 using Base::getChecked;
84 static ArrayType get(::mlir::Type elementType, ::llvm::ArrayRef<::mlir::Attribute> dimensionSizes);
85 static ArrayType getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::Type elementType, ::llvm::ArrayRef<::mlir::Attribute> dimensionSizes);
86 static ArrayType get(::mlir::Type elementType, ::llvm::ArrayRef<int64_t> shape);
87 static ArrayType getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::Type elementType, ::llvm::ArrayRef<int64_t> shape);
88 static ::llvm::LogicalResult verify(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::Type elementType, ::llvm::ArrayRef<::mlir::Attribute> dimensionSizes, ::llvm::ArrayRef<int64_t> shape);
89 static ::llvm::LogicalResult verifyInvariants(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::Type elementType, ::llvm::ArrayRef<::mlir::Attribute> dimensionSizes, ::llvm::ArrayRef<int64_t> shape);
90 static constexpr ::llvm::StringLiteral getMnemonic() {
91 return {"type"};
92 }
93
94 static ::mlir::Type parse(::mlir::AsmParser &odsParser);
95 void print(::mlir::AsmPrinter &odsPrinter) const;
96 ::mlir::Type getElementType() const;
97 ::llvm::ArrayRef<::mlir::Attribute> getDimensionSizes() const;
98 ::llvm::ArrayRef<int64_t> getShape() const;
99 ::std::optional<::llvm::DenseMap<::mlir::Attribute, ::mlir::Type>> getSubelementIndexMap() const;
100 ::mlir::Type getTypeAtIndex(::mlir::Attribute index) const;
101};
102
103} // namespace llzk::array
104MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::array::ArrayType)
105
106#endif // GET_TYPEDEF_CLASSES
107
::mlir::Type parse(::mlir::AsmParser &odsParser)
static constexpr ::llvm::StringLiteral getMnemonic()
Definition Types.h.inc:90
::llvm::LogicalResult verifyInvariants(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::Type elementType, ::llvm::ArrayRef<::mlir::Attribute > dimensionSizes, ::llvm::ArrayRef< int64_t > shape)
void print(::mlir::AsmPrinter &odsPrinter) const
::llvm::ArrayRef< int64_t > getShape() const
ArrayType cloneWith(std::optional<::llvm::ArrayRef< int64_t > > shape, ::mlir::Type elementType) const
Clone this type with the given shape and element type.
bool hasRank() const
Returns if this type is ranked, i.e., it has a known number of dimensions.
Definition Types.h.inc:63
static constexpr ::llvm::StringLiteral dialectName
Definition Types.h.inc:82
ArrayType cloneWith(::mlir::Type elementType, std::optional<::llvm::ArrayRef<::mlir::Attribute > > dimensions=std::nullopt) const
Clone this type with the given dimensions and element type.
std::optional<::llvm::SmallVector<::mlir::ArrayAttr > > getSubelementIndices() const
Return a list of all valid indices for this ArrayType.
Definition Types.cpp:113
::mlir::Type getElementType() const
::std::optional<::llvm::DenseMap<::mlir::Attribute, ::mlir::Type > > getSubelementIndexMap() const
Required by DestructurableTypeInterface / SROA pass.
Definition Types.cpp:120
::mlir::Type getSelectionType(size_t numIndices) const
Return the type produced by selecting/removing numIndices leading dimensions.
Definition Types.cpp:145
::mlir::Type getTypeAtIndex(::mlir::Attribute index) const
Required by DestructurableTypeInterface / SROA pass.
Definition Types.cpp:128
static ArrayType get(::mlir::Type elementType, ::llvm::ArrayRef<::mlir::Attribute > dimensionSizes)
Definition Types.cpp.inc:85
static ArrayType getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::Type elementType, ::llvm::ArrayRef<::mlir::Attribute > dimensionSizes)
Definition Types.cpp.inc:98
::llvm::LogicalResult verify(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::Type elementType, ::llvm::ArrayRef<::mlir::Attribute > dimensionSizes, ::llvm::ArrayRef< int64_t > shape)
Definition Types.cpp:75
::llvm::ArrayRef<::mlir::Attribute > getDimensionSizes() const
static constexpr ::llvm::StringLiteral name
Definition Types.h.inc:81
Common interface for operations that reference an array value.