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 {
18namespace array {
19class ArrayType;
20namespace detail {
21struct ArrayTypeStorage;
22} // namespace detail
23class ArrayType : public ::mlir::Type::TypeBase<ArrayType, ::mlir::Type, detail::ArrayTypeStorage, ::mlir::ShapedType::Trait, ::mlir::DestructurableTypeInterface::Trait> {
24public:
25 using Base::Base;
26 private:
29 bool collectIndices(::llvm::function_ref<void(::mlir::ArrayAttr)>) const;
30
31 public:
33 std::optional<::llvm::SmallVector<::mlir::ArrayAttr>> getSubelementIndices() const;
34
38 inline bool hasRank() const { return true; }
39
43 ::mlir::Type getSelectionType(size_t numIndices) const;
44
48 ArrayType cloneWith(std::optional<::llvm::ArrayRef<int64_t>> shape, ::mlir::Type elementType) const;
49
55 ArrayType cloneWith(::mlir::Type elementType, std::optional<::llvm::ArrayRef<::mlir::Attribute>> dimensions = std::nullopt) const;
56 static constexpr ::llvm::StringLiteral name = "array.type";
57 static constexpr ::llvm::StringLiteral dialectName = "array";
58 using Base::getChecked;
59 static ArrayType get(::mlir::Type elementType, ::llvm::ArrayRef<::mlir::Attribute> dimensionSizes);
60 static ArrayType getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::Type elementType, ::llvm::ArrayRef<::mlir::Attribute> dimensionSizes);
61 static ArrayType get(::mlir::Type elementType, ::llvm::ArrayRef<int64_t> shape);
62 static ArrayType getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::Type elementType, ::llvm::ArrayRef<int64_t> shape);
63 static ::llvm::LogicalResult verify(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::Type elementType, ::llvm::ArrayRef<::mlir::Attribute> dimensionSizes, ::llvm::ArrayRef<int64_t> shape);
64 static ::llvm::LogicalResult verifyInvariants(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::Type elementType, ::llvm::ArrayRef<::mlir::Attribute> dimensionSizes, ::llvm::ArrayRef<int64_t> shape);
65 static constexpr ::llvm::StringLiteral getMnemonic() {
66 return {"type"};
67 }
68
69 static ::mlir::Type parse(::mlir::AsmParser &odsParser);
70 void print(::mlir::AsmPrinter &odsPrinter) const;
71 ::mlir::Type getElementType() const;
72 ::llvm::ArrayRef<::mlir::Attribute> getDimensionSizes() const;
73 ::llvm::ArrayRef<int64_t> getShape() const;
74 ::std::optional<::llvm::DenseMap<::mlir::Attribute, ::mlir::Type>> getSubelementIndexMap() const;
75 ::mlir::Type getTypeAtIndex(::mlir::Attribute index) const;
76};
77} // namespace array
78} // namespace llzk
79MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::array::ArrayType)
80
81#endif // GET_TYPEDEF_CLASSES
82
::mlir::Type parse(::mlir::AsmParser &odsParser)
static constexpr ::llvm::StringLiteral getMnemonic()
Definition Types.h.inc:65
::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:38
::llvm::LogicalResult verify(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::Type elementType, ::llvm::ArrayRef<::mlir::Attribute > dimensionSizes, ::llvm::ArrayRef< int64_t > shape)
static constexpr ::llvm::StringLiteral dialectName
Definition Types.h.inc:57
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:83
static ArrayType getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::Type elementType, ::llvm::ArrayRef<::mlir::Attribute > dimensionSizes)
Definition Types.cpp.inc:96
::llvm::ArrayRef<::mlir::Attribute > getDimensionSizes() const
static constexpr ::llvm::StringLiteral name
Definition Types.h.inc:56