17 ::mlir::OpOperand &(*getPodRefMutable)(
const Concept *
impl, ::mlir::Operation *);
19 template<
typename ConcreteOp>
25 static inline ::mlir::TypedValue<::llzk::pod::PodType>
getPodRef(
const Concept *
impl, ::mlir::Operation *tablegen_opaque_val);
28 template<
typename ConcreteOp>
34 static inline ::mlir::TypedValue<::llzk::pod::PodType>
getPodRef(
const Concept *
impl, ::mlir::Operation *tablegen_opaque_val);
37 template<
typename ConcreteModel,
typename ConcreteOp>
43template <
typename ConcreteOp>
47class PodRefOpInterface :
public ::mlir::OpInterface<PodRefOpInterface, detail::PodRefOpInterfaceInterfaceTraits> {
49 using ::mlir::OpInterface<PodRefOpInterface, detail::PodRefOpInterfaceInterfaceTraits>::OpInterface;
50 template <
typename ConcreteOp>
53 ::mlir::TypedValue<::llzk::pod::PodType>
getPodRef();
61 template <
typename ConcreteOp>
62 struct PodRefOpInterfaceTrait :
public ::mlir::OpInterface<PodRefOpInterface, detail::PodRefOpInterfaceInterfaceTraits>::Trait<ConcreteOp> {
69class PodAccessOpInterface;
81 assert(
implPodRefOpInterface &&
"`::llzk::pod::PodAccessOpInterface` expected its base interface `::llzk::pod::PodRefOpInterface` to be registered");
84 template<
typename ConcreteOp>
91 static inline bool isRead(
const Concept *
impl, ::mlir::Operation *tablegen_opaque_val);
93 template<
typename ConcreteOp>
102 template<
typename ConcreteModel,
typename ConcreteOp>
108template <
typename ConcreteOp>
112class PodAccessOpInterface :
public ::mlir::OpInterface<PodAccessOpInterface, detail::PodAccessOpInterfaceInterfaceTraits> {
114 using ::mlir::OpInterface<PodAccessOpInterface, detail::PodAccessOpInterfaceInterfaceTraits>::OpInterface;
115 template <
typename ConcreteOp>
128 bool canRewire(const ::mlir::DestructurableMemorySlot &slot,
129 ::llvm::SmallPtrSetImpl<::mlir::Attribute> &usedIndices,
130 ::mlir::SmallVectorImpl<::mlir::MemorySlot> &mustBeSafelyUsed,
131 const ::mlir::DataLayout &dataLayout);
134 ::mlir::DeletionKind
rewire(const ::mlir::DestructurableMemorySlot &slot,
135 ::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot> &subslots,
136 ::mlir::OpBuilder &builder, const ::mlir::DataLayout &dataLayout);
141 operator ::llzk::pod::PodRefOpInterface ()
const {
142 if (!*
this)
return nullptr;
143 return ::llzk::pod::PodRefOpInterface(*
this, getImpl()->implPodRefOpInterface);
147 ::mlir::TypedValue<::llzk::pod::PodType>
getPodRef();
155 template <
typename ConcreteOp>
156 struct PodAccessOpInterfaceTrait :
public ::mlir::OpInterface<PodAccessOpInterface, detail::PodAccessOpInterfaceInterfaceTraits>::Trait<ConcreteOp> {
163template<
typename ConcreteOp>
165 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getPodRef();
167template<
typename ConcreteOp>
169 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getPodRefMutable();
171template<
typename ConcreteOp>
173 return static_cast<const ConcreteOp *
>(
impl)->
getPodRef(tablegen_opaque_val);
175template<
typename ConcreteOp>
183template<
typename ConcreteOp>
185 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getRecordNameAttr();
187template<
typename ConcreteOp>
189 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).isRead();
191template<
typename ConcreteOp>
195template<
typename ConcreteOp>
197 return static_cast<const ConcreteOp *
>(
impl)->
isRead(tablegen_opaque_val);
::mlir::FlatSymbolRefAttr getRecordNameAttr()
Gets the record name attribute from the pod access op.
::mlir::OpOperand & getPodRefMutable()
Gets the mutable operand slot holding the SSA Value for the referenced pod.
::mlir::TypedValue<::llzk::pod::PodType > getPodRef()
Gets the SSA Value for the referenced pod.
inline ::llzk::pod::PodType getPodRefType()
Gets the type of the referenced pod.
::mlir::DeletionKind rewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot > &subslots, ::mlir::OpBuilder &builder, const ::mlir::DataLayout &dataLayout)
Required by companion interface DestructurableAccessorOpInterface / SROA pass.
inline ::mlir::StringAttr getRecordNameAsStringAttr()
Gets the record name as an attribute suitable for destructuring indices.
bool canRewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::SmallPtrSetImpl<::mlir::Attribute > &usedIndices, ::mlir::SmallVectorImpl<::mlir::MemorySlot > &mustBeSafelyUsed, const ::mlir::DataLayout &dataLayout)
Required by companion interface DestructurableAccessorOpInterface / SROA pass.
bool isRead()
Return true if the op is a read, false if it's a write.
inline ::llzk::pod::PodType getPodRefType()
Gets the type of the referenced pod.
::mlir::OpOperand & getPodRefMutable()
Gets the mutable operand slot holding the SSA Value for the referenced pod.
::mlir::TypedValue<::llzk::pod::PodType > getPodRef()
Gets the SSA Value for the referenced pod.
ConcreteOp ConcreteEntity
::llzk::pod::PodAccessOpInterface Interface
static inline ::mlir::FlatSymbolRefAttr getRecordNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static bool isRead(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
::llzk::pod::PodAccessOpInterface Interface
static inline ::mlir::FlatSymbolRefAttr getRecordNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static bool isRead(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
ConcreteOp ConcreteEntity
::llzk::pod::PodRefOpInterface Interface
static inline ::mlir::TypedValue<::llzk::pod::PodType > getPodRef(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::mlir::OpOperand & getPodRefMutable(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
::llzk::pod::PodRefOpInterface Interface
static inline ::mlir::TypedValue<::llzk::pod::PodType > getPodRef(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::mlir::OpOperand & getPodRefMutable(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
::mlir::FlatSymbolRefAttr(* getRecordNameAttr)(const Concept *impl, ::mlir::Operation *)
The methods defined by the interface.
void initializeInterfaceConcept(::mlir::detail::InterfaceMap &interfaceMap)
const ::llzk::pod::PodRefOpInterface::Concept * implPodRefOpInterface
The base classes of this interface.
bool(* isRead)(const Concept *impl, ::mlir::Operation *)
::mlir::OpOperand &(* getPodRefMutable)(const Concept *impl, ::mlir::Operation *)
::mlir::TypedValue<::llzk::pod::PodType >(* getPodRef)(const Concept *impl, ::mlir::Operation *)
The methods defined by the interface.