17 ::mlir::OpOperand &(*getArrRefMutable)(
const Concept *
impl, ::mlir::Operation *);
19 template<
typename ConcreteOp>
25 static inline ::mlir::TypedValue<::llzk::array::ArrayType>
getArrRef(
const Concept *
impl, ::mlir::Operation *tablegen_opaque_val);
28 template<
typename ConcreteOp>
34 static inline ::mlir::TypedValue<::llzk::array::ArrayType>
getArrRef(
const Concept *
impl, ::mlir::Operation *tablegen_opaque_val);
37 template<
typename ConcreteModel,
typename ConcreteOp>
42};
template <
typename ConcreteOp>
46class ArrayRefOpInterface :
public ::mlir::OpInterface<ArrayRefOpInterface, detail::ArrayRefOpInterfaceInterfaceTraits> {
48 using ::mlir::OpInterface<ArrayRefOpInterface, detail::ArrayRefOpInterfaceInterfaceTraits>::OpInterface;
49 template <
typename ConcreteOp>
52 ::mlir::TypedValue<::llzk::array::ArrayType>
getArrRef();
60 template <
typename ConcreteOp>
61 struct ArrayRefOpInterfaceTrait :
public ::mlir::OpInterface<ArrayRefOpInterface, detail::ArrayRefOpInterfaceInterfaceTraits>::Trait<ConcreteOp> {
68class ArrayAccessOpInterface;
81 assert(
implArrayRefOpInterface &&
"`::llzk::array::ArrayAccessOpInterface` expected its base interface `::llzk::array::ArrayRefOpInterface` to be registered");
84 template<
typename ConcreteOp>
90 static inline ::mlir::Operation::operand_range
getIndices(
const Concept *
impl, ::mlir::Operation *tablegen_opaque_val);
92 static inline bool isRead(
const Concept *
impl, ::mlir::Operation *tablegen_opaque_val);
94 template<
typename ConcreteOp>
100 static inline ::mlir::Operation::operand_range
getIndices(
const Concept *
impl, ::mlir::Operation *tablegen_opaque_val);
104 template<
typename ConcreteModel,
typename ConcreteOp>
109};
template <
typename ConcreteOp>
113class ArrayAccessOpInterface :
public ::mlir::OpInterface<ArrayAccessOpInterface, detail::ArrayAccessOpInterfaceInterfaceTraits> {
115 using ::mlir::OpInterface<ArrayAccessOpInterface, detail::ArrayAccessOpInterfaceInterfaceTraits>::OpInterface;
116 template <
typename ConcreteOp>
119 ::mlir::Operation::operand_range
getIndices();
137 bool canRewire(const ::mlir::DestructurableMemorySlot &slot,
138 ::llvm::SmallPtrSetImpl<::mlir::Attribute> &usedIndices,
139 ::mlir::SmallVectorImpl<::mlir::MemorySlot> &mustBeSafelyUsed);
142 ::mlir::DeletionKind
rewire(const ::mlir::DestructurableMemorySlot &slot,
143 ::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot> &subslots,
144 ::mlir::RewriterBase &rewriter);
149 operator ::llzk::array::ArrayRefOpInterface ()
const {
150 if (!*
this)
return nullptr;
151 return ::llzk::array::ArrayRefOpInterface(*
this, getImpl()->implArrayRefOpInterface);
155 ::mlir::TypedValue<::llzk::array::ArrayType>
getArrRef();
163 template <
typename ConcreteOp>
164 struct ArrayAccessOpInterfaceTrait :
public ::mlir::OpInterface<ArrayAccessOpInterface, detail::ArrayAccessOpInterfaceInterfaceTraits>::Trait<ConcreteOp> {
171template<
typename ConcreteOp>
173 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getArrRef();
175template<
typename ConcreteOp>
177 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getArrRefMutable();
179template<
typename ConcreteOp>
181 return static_cast<const ConcreteOp *
>(
impl)->
getArrRef(tablegen_opaque_val);
183template<
typename ConcreteOp>
191template<
typename ConcreteOp>
193 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getIndices();
195template<
typename ConcreteOp>
197 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getIndicesMutable();
199template<
typename ConcreteOp>
201 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).isRead();
203template<
typename ConcreteOp>
205 return static_cast<const ConcreteOp *
>(
impl)->
getIndices(tablegen_opaque_val);
207template<
typename ConcreteOp>
211template<
typename ConcreteOp>
213 return static_cast<const ConcreteOp *
>(
impl)->
isRead(tablegen_opaque_val);
::mlir::Operation::operand_range getIndices()
Gets the operand range containing the index for each dimension.
::mlir::OpOperand & getArrRefMutable()
Gets the mutable operand slot holding the SSA Value for the referenced array.
bool isRead()
Return true if the op is a read, false if it's a write.
inline ::mlir::ArrayRef<::mlir::Attribute > getValueOperandDims()
Compute the dimensions of the read/write value.
bool canRewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::SmallPtrSetImpl<::mlir::Attribute > &usedIndices, ::mlir::SmallVectorImpl<::mlir::MemorySlot > &mustBeSafelyUsed)
Required by companion interface DestructurableAccessorOpInterface / SROA pass.
::mlir::DeletionKind rewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot > &subslots, ::mlir::RewriterBase &rewriter)
Required by companion interface DestructurableAccessorOpInterface / SROA pass.
::mlir::ArrayAttr indexOperandsToAttributeArray()
Returns the multi-dimensional indices of the array access as an Attribute array or a null pointer if ...
::mlir::TypedValue<::llzk::array::ArrayType > getArrRef()
Gets the SSA Value for the referenced array.
inline ::llzk::array::ArrayType getArrRefType()
Gets the type of the referenced array.
::mlir::MutableOperandRange getIndicesMutable()
Gets the mutable operand range containing the index for each dimension.
::mlir::OpOperand & getArrRefMutable()
Gets the mutable operand slot holding the SSA Value for the referenced array.
::mlir::TypedValue<::llzk::array::ArrayType > getArrRef()
Gets the SSA Value for the referenced array.
inline ::llzk::array::ArrayType getArrRefType()
Gets the type of the referenced array.
::llvm::ArrayRef<::mlir::Attribute > getDimensionSizes() const
ConcreteOp ConcreteEntity
static bool isRead(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
::llzk::array::ArrayAccessOpInterface Interface
static inline ::mlir::MutableOperandRange getIndicesMutable(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::mlir::Operation::operand_range getIndices(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::mlir::MutableOperandRange getIndicesMutable(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::mlir::Operation::operand_range getIndices(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
::llzk::array::ArrayAccessOpInterface Interface
static bool isRead(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
ConcreteOp ConcreteEntity
::llzk::array::ArrayRefOpInterface Interface
static inline ::mlir::OpOperand & getArrRefMutable(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::mlir::TypedValue<::llzk::array::ArrayType > getArrRef(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::mlir::OpOperand & getArrRefMutable(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::mlir::TypedValue<::llzk::array::ArrayType > getArrRef(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
::llzk::array::ArrayRefOpInterface Interface
void initializeInterfaceConcept(::mlir::detail::InterfaceMap &interfaceMap)
bool(* isRead)(const Concept *impl, ::mlir::Operation *)
::mlir::Operation::operand_range(* getIndices)(const Concept *impl, ::mlir::Operation *)
The methods defined by the interface.
::mlir::MutableOperandRange(* getIndicesMutable)(const Concept *impl, ::mlir::Operation *)
const ::llzk::array::ArrayRefOpInterface::Concept * implArrayRefOpInterface
The base classes of this interface.
::mlir::TypedValue<::llzk::array::ArrayType >(* getArrRef)(const Concept *impl, ::mlir::Operation *)
The methods defined by the interface.
::mlir::OpOperand &(* getArrRefMutable)(const Concept *impl, ::mlir::Operation *)