LLZK 0.1.0
Veridise's ZK Language IR
Loading...
Searching...
No Matches
OpInterfaces.h.inc
Go to the documentation of this file.
1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* Interface Declarations *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* *|
7\*===----------------------------------------------------------------------===*/
8
9namespace llzk {
10namespace component {
12namespace detail {
14 struct Concept {
16 ::mlir::Value (*getVal)(const Concept *impl, ::mlir::Operation *);
17 ::mlir::TypedValue<::llzk::component::StructType> (*getComponent)(const Concept *impl, ::mlir::Operation *);
18 ::mlir::OpOperand &(*getComponentMutable)(const Concept *impl, ::mlir::Operation *);
19 ::llvm::StringRef (*getFieldName)(const Concept *impl, ::mlir::Operation *);
20 ::mlir::FlatSymbolRefAttr (*getFieldNameAttr)(const Concept *impl, ::mlir::Operation *);
21 void (*setFieldName)(const Concept *impl, ::mlir::Operation *, ::llvm::StringRef);
22 void (*setFieldNameAttr)(const Concept *impl, ::mlir::Operation *, ::mlir::FlatSymbolRefAttr);
23 ::llzk::component::StructType (*getStructType)(const Concept *impl, ::mlir::Operation *);
24 bool (*isRead)(const Concept *impl, ::mlir::Operation *);
25 };
26 template<typename ConcreteOp>
27 class Model : public Concept {
28 public:
31
32 static inline ::mlir::Value getVal(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
33 static inline ::mlir::TypedValue<::llzk::component::StructType> getComponent(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
34 static inline ::mlir::OpOperand &getComponentMutable(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
35 static inline ::llvm::StringRef getFieldName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
36 static inline ::mlir::FlatSymbolRefAttr getFieldNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
37 static inline void setFieldName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::llvm::StringRef attrValue);
38 static inline void setFieldNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::FlatSymbolRefAttr attr);
39 static inline ::llzk::component::StructType getStructType(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
40 static inline bool isRead(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
41 };
42 template<typename ConcreteOp>
43 class FallbackModel : public Concept {
44 public:
47
48 static inline ::mlir::Value getVal(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
49 static inline ::mlir::TypedValue<::llzk::component::StructType> getComponent(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
50 static inline ::mlir::OpOperand &getComponentMutable(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
51 static inline ::llvm::StringRef getFieldName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
52 static inline ::mlir::FlatSymbolRefAttr getFieldNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
53 static inline void setFieldName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::llvm::StringRef attrValue);
54 static inline void setFieldNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::FlatSymbolRefAttr attr);
55 static inline ::llzk::component::StructType getStructType(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
56 static inline bool isRead(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
57 };
58 template<typename ConcreteModel, typename ConcreteOp>
59 class ExternalModel : public FallbackModel<ConcreteModel> {
60 public:
61 using ConcreteEntity = ConcreteOp;
62 };
63};
64template <typename ConcreteOp>
66
67} // namespace detail
68class FieldRefOpInterface : public ::mlir::OpInterface<FieldRefOpInterface, detail::FieldRefOpInterfaceInterfaceTraits> {
69public:
70 using ::mlir::OpInterface<FieldRefOpInterface, detail::FieldRefOpInterfaceInterfaceTraits>::OpInterface;
71 template <typename ConcreteOp>
72 struct Trait : public detail::FieldRefOpInterfaceTrait<ConcreteOp> {};
74 ::mlir::Value getVal();
76 ::mlir::TypedValue<::llzk::component::StructType> getComponent();
78 ::mlir::OpOperand &getComponentMutable();
80 ::llvm::StringRef getFieldName();
82 ::mlir::FlatSymbolRefAttr getFieldNameAttr();
84 void setFieldName(::llvm::StringRef attrValue);
86 void setFieldNameAttr(::mlir::FlatSymbolRefAttr attr);
90 bool isRead();
91
93 ::mlir::FailureOr<SymbolLookupResult<FieldDefOp>> getFieldDefOp(::mlir::SymbolTableCollection &tables);
94};
95namespace detail {
96 template <typename ConcreteOp>
97 struct FieldRefOpInterfaceTrait : public ::mlir::OpInterface<FieldRefOpInterface, detail::FieldRefOpInterfaceInterfaceTraits>::Trait<ConcreteOp> {
98 };
99}// namespace detail
100} // namespace component
101} // namespace llzk
102namespace llzk {
103namespace component {
104template<typename ConcreteOp>
105::mlir::Value detail::FieldRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::getVal(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
106 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getVal();
107}
108template<typename ConcreteOp>
109::mlir::TypedValue<::llzk::component::StructType> detail::FieldRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::getComponent(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
110 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getComponent();
111}
112template<typename ConcreteOp>
113::mlir::OpOperand &detail::FieldRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::getComponentMutable(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
114 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getComponentMutable();
115}
116template<typename ConcreteOp>
117::llvm::StringRef detail::FieldRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::getFieldName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
118 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getFieldName();
119}
120template<typename ConcreteOp>
121::mlir::FlatSymbolRefAttr detail::FieldRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::getFieldNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
122 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getFieldNameAttr();
123}
124template<typename ConcreteOp>
125void detail::FieldRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::setFieldName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::llvm::StringRef attrValue) {
126 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).setFieldName(attrValue);
127}
128template<typename ConcreteOp>
129void detail::FieldRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::setFieldNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::FlatSymbolRefAttr attr) {
130 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).setFieldNameAttr(attr);
131}
132template<typename ConcreteOp>
134 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getComponent().getType();
135}
136template<typename ConcreteOp>
137bool detail::FieldRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::isRead(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
138 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).isRead();
139}
140template<typename ConcreteOp>
141::mlir::Value detail::FieldRefOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getVal(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
142 return static_cast<const ConcreteOp *>(impl)->getVal(tablegen_opaque_val);
143}
144template<typename ConcreteOp>
145::mlir::TypedValue<::llzk::component::StructType> detail::FieldRefOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getComponent(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
146 return static_cast<const ConcreteOp *>(impl)->getComponent(tablegen_opaque_val);
147}
148template<typename ConcreteOp>
149::mlir::OpOperand &detail::FieldRefOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getComponentMutable(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
150 return static_cast<const ConcreteOp *>(impl)->getComponentMutable(tablegen_opaque_val);
151}
152template<typename ConcreteOp>
153::llvm::StringRef detail::FieldRefOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getFieldName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
154 return static_cast<const ConcreteOp *>(impl)->getFieldName(tablegen_opaque_val);
155}
156template<typename ConcreteOp>
157::mlir::FlatSymbolRefAttr detail::FieldRefOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getFieldNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
158 return static_cast<const ConcreteOp *>(impl)->getFieldNameAttr(tablegen_opaque_val);
159}
160template<typename ConcreteOp>
161void detail::FieldRefOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::setFieldName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::llvm::StringRef attrValue) {
162 return static_cast<const ConcreteOp *>(impl)->setFieldName(tablegen_opaque_val, attrValue);
163}
164template<typename ConcreteOp>
165void detail::FieldRefOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::setFieldNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::FlatSymbolRefAttr attr) {
166 return static_cast<const ConcreteOp *>(impl)->setFieldNameAttr(tablegen_opaque_val, attr);
167}
168template<typename ConcreteOp>
170 return static_cast<const ConcreteOp *>(impl)->getStructType(tablegen_opaque_val);
171}
172template<typename ConcreteOp>
174 return static_cast<const ConcreteOp *>(impl)->isRead(tablegen_opaque_val);
175}
176} // namespace component
177} // namespace llzk
void setFieldNameAttr(::mlir::FlatSymbolRefAttr attr)
Sets the field name attribute in the FieldRefOp.
::mlir::FailureOr< SymbolLookupResult< FieldDefOp > > getFieldDefOp(::mlir::SymbolTableCollection &tables)
Gets the definition for the field referenced in this op.
Definition Ops.cpp:593
void setFieldName(::llvm::StringRef attrValue)
Sets the field name attribute value in the FieldRefOp.
::llzk::component::StructType getStructType()
Gets the struct type of the target component.
::mlir::OpOperand & getComponentMutable()
Gets the SSA value with the target component from the FieldRefOp.
bool isRead()
Return true if the op is a read, false if it's a write.
::llvm::StringRef getFieldName()
Gets the field name attribute value from the FieldRefOp.
::mlir::FlatSymbolRefAttr getFieldNameAttr()
Gets the field name attribute from the FieldRefOp.
::mlir::Value getVal()
Gets the SSA Value that holds the read/write data for the FieldRefOp.
::mlir::TypedValue<::llzk::component::StructType > getComponent()
Gets the SSA value with the target component from the FieldRefOp.
static inline ::llzk::component::StructType getStructType(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static void setFieldNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::FlatSymbolRefAttr attr)
static void setFieldName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::llvm::StringRef attrValue)
static inline ::mlir::FlatSymbolRefAttr getFieldNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::mlir::TypedValue<::llzk::component::StructType > getComponent(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::llvm::StringRef getFieldName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static bool isRead(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::mlir::Value getVal(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::mlir::OpOperand & getComponentMutable(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::llzk::component::StructType getStructType(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::mlir::FlatSymbolRefAttr getFieldNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::mlir::TypedValue<::llzk::component::StructType > getComponent(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static bool isRead(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static void setFieldNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::FlatSymbolRefAttr attr)
static void setFieldName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::llvm::StringRef attrValue)
static inline ::llvm::StringRef getFieldName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::mlir::OpOperand & getComponentMutable(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::mlir::Value getVal(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
::llvm::StringRef(* getFieldName)(const Concept *impl, ::mlir::Operation *)
::mlir::OpOperand &(* getComponentMutable)(const Concept *impl, ::mlir::Operation *)
bool(* isRead)(const Concept *impl, ::mlir::Operation *)
::mlir::FlatSymbolRefAttr(* getFieldNameAttr)(const Concept *impl, ::mlir::Operation *)
::mlir::TypedValue<::llzk::component::StructType >(* getComponent)(const Concept *impl, ::mlir::Operation *)
::llzk::component::StructType(* getStructType)(const Concept *impl, ::mlir::Operation *)
void(* setFieldName)(const Concept *impl, ::mlir::Operation *, ::llvm::StringRef)
void(* setFieldNameAttr)(const Concept *impl, ::mlir::Operation *, ::mlir::FlatSymbolRefAttr)
::mlir::Value(* getVal)(const Concept *impl, ::mlir::Operation *)
The methods defined by the interface.