29 ::mlir::OpOperand &(*getPodRefMutable)(
const Concept *
impl, ::mlir::Operation *);
31 template<
typename ConcreteOp>
37 static inline ::mlir::TypedValue<::llzk::pod::PodType>
getPodRef(
const Concept *
impl, ::mlir::Operation *tablegen_opaque_val);
40 template<
typename ConcreteOp>
46 static inline ::mlir::TypedValue<::llzk::pod::PodType>
getPodRef(
const Concept *
impl, ::mlir::Operation *tablegen_opaque_val);
49 template<
typename ConcreteModel,
typename ConcreteOp>
55template <
typename ConcreteOp>
59class PodRefOpInterface :
public ::mlir::OpInterface<PodRefOpInterface, detail::PodRefOpInterfaceInterfaceTraits> {
61 using ::mlir::OpInterface<PodRefOpInterface, detail::PodRefOpInterfaceInterfaceTraits>::OpInterface;
62 template <
typename ConcreteOp>
66 ::mlir::TypedValue<::llzk::pod::PodType>
getPodRef();
90 assert(
implPodRefOpInterface &&
"`::llzk::pod::PodAccessOpInterface` expected its base interface `::llzk::pod::PodRefOpInterface` to be registered");
93 template<
typename ConcreteOp>
100 static inline bool isRead(
const Concept *
impl, ::mlir::Operation *tablegen_opaque_val);
102 template<
typename ConcreteOp>
111 template<
typename ConcreteModel,
typename ConcreteOp>
117template <
typename ConcreteOp>
121class PodAccessOpInterface :
public ::mlir::OpInterface<PodAccessOpInterface, detail::PodAccessOpInterfaceInterfaceTraits> {
123 using ::mlir::OpInterface<PodAccessOpInterface, detail::PodAccessOpInterfaceInterfaceTraits>::OpInterface;
124 template <
typename ConcreteOp>
134 bool canRewire(const ::mlir::DestructurableMemorySlot &slot,
135 ::llvm::SmallPtrSetImpl<::mlir::Attribute> &usedIndices,
136 ::mlir::SmallVectorImpl<::mlir::MemorySlot> &mustBeSafelyUsed,
137 const ::mlir::DataLayout &dataLayout);
140 ::mlir::DeletionKind
rewire(const ::mlir::DestructurableMemorySlot &slot,
141 ::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot> &subslots,
142 ::mlir::OpBuilder &builder, const ::mlir::DataLayout &dataLayout);
147 operator ::llzk::pod::PodRefOpInterface ()
const {
148 if (!*
this)
return nullptr;
149 return ::llzk::pod::PodRefOpInterface(*
this, getImpl()->implPodRefOpInterface);
154 ::mlir::TypedValue<::llzk::pod::PodType>
getPodRef();
166 template <
typename ConcreteOp>
167 struct PodRefOpInterfaceTrait :
public ::mlir::OpInterface<PodRefOpInterface, detail::PodRefOpInterfaceInterfaceTraits>::Trait<ConcreteOp> {
173 template <
typename ConcreteOp>
174 struct PodAccessOpInterfaceTrait :
public ::mlir::OpInterface<PodAccessOpInterface, detail::PodAccessOpInterfaceInterfaceTraits>::Trait<ConcreteOp> {
180template<
typename ConcreteOp>
182 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getPodRef();
184template<
typename ConcreteOp>
186 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getPodRefMutable();
188template<
typename ConcreteOp>
190 return static_cast<const ConcreteOp *
>(
impl)->
getPodRef(tablegen_opaque_val);
192template<
typename ConcreteOp>
200template<
typename ConcreteOp>
202 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getRecordNameAttr();
204template<
typename ConcreteOp>
206 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).isRead();
208template<
typename ConcreteOp>
212template<
typename ConcreteOp>
214 return static_cast<const ConcreteOp *
>(
impl)->
isRead(tablegen_opaque_val);
::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.
::mlir::StringAttr getRecordNameAttr()
Gets the record name attribute from the pod access op.
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::StringAttr getRecordNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static bool isRead(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::mlir::StringAttr getRecordNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
::llzk::pod::PodAccessOpInterface Interface
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)
Common interface for operations that reference a plain-old-data struct value.
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::StringAttr(* getRecordNameAttr)(const Concept *impl, ::mlir::Operation *)
The methods defined by the interface.
::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.