LLZK 0.1.0
Veridise's ZK Language IR
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 ArrayType cloneWith(std::optional<::llvm::ArrayRef<int64_t>> shape, ::mlir::Type elementType) const;
44
50 ArrayType cloneWith(::mlir::Type elementType, std::optional<::llvm::ArrayRef<::mlir::Attribute>> dimensions = std::nullopt) const;
51 static constexpr ::llvm::StringLiteral name = "array.type";
52 using Base::getChecked;
53 static ArrayType get(::mlir::Type elementType, ::llvm::ArrayRef<::mlir::Attribute> dimensionSizes);
54 static ArrayType getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::Type elementType, ::llvm::ArrayRef<::mlir::Attribute> dimensionSizes);
55 static ArrayType get(::mlir::Type elementType, ::llvm::ArrayRef<int64_t> shape);
56 static ArrayType getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::Type elementType, ::llvm::ArrayRef<int64_t> shape);
57 static ::mlir::LogicalResult verify(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::Type elementType, ::llvm::ArrayRef<::mlir::Attribute> dimensionSizes, ::llvm::ArrayRef<int64_t> shape);
58 static constexpr ::llvm::StringLiteral getMnemonic() {
59 return {"type"};
60 }
61
62 static ::mlir::Type parse(::mlir::AsmParser &odsParser);
63 void print(::mlir::AsmPrinter &odsPrinter) const;
64 ::mlir::Type getElementType() const;
65 ::llvm::ArrayRef<::mlir::Attribute> getDimensionSizes() const;
66 ::llvm::ArrayRef<int64_t> getShape() const;
67 ::std::optional<::llvm::DenseMap<::mlir::Attribute, ::mlir::Type>> getSubelementIndexMap() const;
68 ::mlir::Type getTypeAtIndex(::mlir::Attribute index) const;
69};
70} // namespace array
71} // namespace llzk
72MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::array::ArrayType)
73
74#endif // GET_TYPEDEF_CLASSES
75
::mlir::Type parse(::mlir::AsmParser &odsParser)
static constexpr ::llvm::StringLiteral getMnemonic()
Definition Types.h.inc:58
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.
Definition Types.h.inc:38
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:114
::mlir::Type getElementType() const
::std::optional<::llvm::DenseMap<::mlir::Attribute, ::mlir::Type > > getSubelementIndexMap() const
Required by DestructurableTypeInterface / SROA pass.
Definition Types.cpp:121
::mlir::Type getTypeAtIndex(::mlir::Attribute index) const
Required by DestructurableTypeInterface / SROA pass.
Definition Types.cpp:129
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:93
::mlir::LogicalResult verify(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::Type elementType, ::llvm::ArrayRef<::mlir::Attribute > dimensionSizes, ::llvm::ArrayRef< int64_t > shape)
Definition Types.cpp:76
::llvm::ArrayRef<::mlir::Attribute > getDimensionSizes() const
static constexpr ::llvm::StringLiteral name
Definition Types.h.inc:51