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};template <typename ConcreteOp>
65
66} // namespace detail
67class FieldRefOpInterface : public ::mlir::OpInterface<FieldRefOpInterface, detail::FieldRefOpInterfaceInterfaceTraits> {
68public:
69 using ::mlir::OpInterface<FieldRefOpInterface, detail::FieldRefOpInterfaceInterfaceTraits>::OpInterface;
70 template <typename ConcreteOp>
71 struct Trait : public detail::FieldRefOpInterfaceTrait<ConcreteOp> {};
73 ::mlir::Value getVal();
75 ::mlir::TypedValue<::llzk::component::StructType> getComponent();
77 ::mlir::OpOperand &getComponentMutable();
79 ::llvm::StringRef getFieldName();
81 ::mlir::FlatSymbolRefAttr getFieldNameAttr();
83 void setFieldName(::llvm::StringRef attrValue);
85 void setFieldNameAttr(::mlir::FlatSymbolRefAttr attr);
89 bool isRead();
90
92 ::mlir::FailureOr<SymbolLookupResult<FieldDefOp>> getFieldDefOp(::mlir::SymbolTableCollection &tables);
93};
94namespace detail {
95 template <typename ConcreteOp>
96 struct FieldRefOpInterfaceTrait : public ::mlir::OpInterface<FieldRefOpInterface, detail::FieldRefOpInterfaceInterfaceTraits>::Trait<ConcreteOp> {
97 };
98}// namespace detail
99} // namespace component
100} // namespace llzk
101namespace llzk {
102namespace component {
103template<typename ConcreteOp>
104::mlir::Value detail::FieldRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::getVal(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
105 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getVal();
106}
107template<typename ConcreteOp>
108::mlir::TypedValue<::llzk::component::StructType> detail::FieldRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::getComponent(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
109 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getComponent();
110}
111template<typename ConcreteOp>
112::mlir::OpOperand &detail::FieldRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::getComponentMutable(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
113 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getComponentMutable();
114}
115template<typename ConcreteOp>
116::llvm::StringRef detail::FieldRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::getFieldName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
117 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getFieldName();
118}
119template<typename ConcreteOp>
120::mlir::FlatSymbolRefAttr detail::FieldRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::getFieldNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
121 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getFieldNameAttr();
122}
123template<typename ConcreteOp>
124void detail::FieldRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::setFieldName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::llvm::StringRef attrValue) {
125 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).setFieldName(attrValue);
126}
127template<typename ConcreteOp>
128void detail::FieldRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::setFieldNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::FlatSymbolRefAttr attr) {
129 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).setFieldNameAttr(attr);
130}
131template<typename ConcreteOp>
133 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getComponent().getType();
134}
135template<typename ConcreteOp>
136bool detail::FieldRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::isRead(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
137 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).isRead();
138}
139template<typename ConcreteOp>
140::mlir::Value detail::FieldRefOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getVal(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
141 return static_cast<const ConcreteOp *>(impl)->getVal(tablegen_opaque_val);
142}
143template<typename ConcreteOp>
144::mlir::TypedValue<::llzk::component::StructType> detail::FieldRefOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getComponent(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
145 return static_cast<const ConcreteOp *>(impl)->getComponent(tablegen_opaque_val);
146}
147template<typename ConcreteOp>
148::mlir::OpOperand &detail::FieldRefOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getComponentMutable(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
149 return static_cast<const ConcreteOp *>(impl)->getComponentMutable(tablegen_opaque_val);
150}
151template<typename ConcreteOp>
152::llvm::StringRef detail::FieldRefOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getFieldName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
153 return static_cast<const ConcreteOp *>(impl)->getFieldName(tablegen_opaque_val);
154}
155template<typename ConcreteOp>
156::mlir::FlatSymbolRefAttr detail::FieldRefOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getFieldNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
157 return static_cast<const ConcreteOp *>(impl)->getFieldNameAttr(tablegen_opaque_val);
158}
159template<typename ConcreteOp>
160void detail::FieldRefOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::setFieldName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::llvm::StringRef attrValue) {
161 return static_cast<const ConcreteOp *>(impl)->setFieldName(tablegen_opaque_val, attrValue);
162}
163template<typename ConcreteOp>
164void detail::FieldRefOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::setFieldNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::FlatSymbolRefAttr attr) {
165 return static_cast<const ConcreteOp *>(impl)->setFieldNameAttr(tablegen_opaque_val, attr);
166}
167template<typename ConcreteOp>
169 return static_cast<const ConcreteOp *>(impl)->getStructType(tablegen_opaque_val);
170}
171template<typename ConcreteOp>
173 return static_cast<const ConcreteOp *>(impl)->isRead(tablegen_opaque_val);
174}
175} // namespace component
176} // 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:509
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.