LLZK 3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
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::component {
10
13
14} // namespace llzk::component
15namespace llzk::component {
16
18namespace detail {
20 struct Concept {
22 ::mlir::Value (*getVal)(const Concept *impl, ::mlir::Operation *);
23 ::mlir::TypedValue<::llzk::component::StructType> (*getComponent)(const Concept *impl, ::mlir::Operation *);
24 ::mlir::OpOperand &(*getComponentMutable)(const Concept *impl, ::mlir::Operation *);
25 ::mlir::StringAttr (*getMemberNameAttrName)(const Concept *impl, ::mlir::Operation *);
26 ::llvm::StringRef (*getMemberName)(const Concept *impl, ::mlir::Operation *);
27 ::mlir::FlatSymbolRefAttr (*getMemberNameAttr)(const Concept *impl, ::mlir::Operation *);
28 void (*setMemberName)(const Concept *impl, ::mlir::Operation *, ::llvm::StringRef);
29 void (*setMemberNameAttr)(const Concept *impl, ::mlir::Operation *, ::mlir::FlatSymbolRefAttr);
30 ::llzk::component::StructType (*getStructType)(const Concept *impl, ::mlir::Operation *);
31 bool (*isRead)(const Concept *impl, ::mlir::Operation *);
32 };
33 template<typename ConcreteOp>
34 class Model : public Concept {
35 public:
38
39 static inline ::mlir::Value getVal(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
40 static inline ::mlir::TypedValue<::llzk::component::StructType> getComponent(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
41 static inline ::mlir::OpOperand &getComponentMutable(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
42 static inline ::mlir::StringAttr getMemberNameAttrName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
43 static inline ::llvm::StringRef getMemberName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
44 static inline ::mlir::FlatSymbolRefAttr getMemberNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
45 static inline void setMemberName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::llvm::StringRef attrValue);
46 static inline void setMemberNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::FlatSymbolRefAttr attr);
47 static inline ::llzk::component::StructType getStructType(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
48 static inline bool isRead(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
49 };
50 template<typename ConcreteOp>
51 class FallbackModel : public Concept {
52 public:
55
56 static inline ::mlir::Value getVal(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
57 static inline ::mlir::TypedValue<::llzk::component::StructType> getComponent(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
58 static inline ::mlir::OpOperand &getComponentMutable(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
59 static inline ::mlir::StringAttr getMemberNameAttrName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
60 static inline ::llvm::StringRef getMemberName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
61 static inline ::mlir::FlatSymbolRefAttr getMemberNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
62 static inline void setMemberName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::llvm::StringRef attrValue);
63 static inline void setMemberNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::FlatSymbolRefAttr attr);
64 static inline ::llzk::component::StructType getStructType(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
65 static inline bool isRead(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
66 };
67 template<typename ConcreteModel, typename ConcreteOp>
68 class ExternalModel : public FallbackModel<ConcreteModel> {
69 public:
70 using ConcreteEntity = ConcreteOp;
71 };
72};
73template <typename ConcreteOp>
75
76} // namespace detail
77class MemberRefOpInterface : public ::mlir::OpInterface<MemberRefOpInterface, detail::MemberRefOpInterfaceInterfaceTraits> {
78public:
79 using ::mlir::OpInterface<MemberRefOpInterface, detail::MemberRefOpInterfaceInterfaceTraits>::OpInterface;
80 template <typename ConcreteOp>
81 struct Trait : public detail::MemberRefOpInterfaceTrait<ConcreteOp> {};
82
84 ::mlir::Value getVal();
85
87 ::mlir::TypedValue<::llzk::component::StructType> getComponent();
88
90 ::mlir::OpOperand &getComponentMutable();
91
93 ::mlir::StringAttr getMemberNameAttrName();
94
96 ::llvm::StringRef getMemberName();
97
99 ::mlir::FlatSymbolRefAttr getMemberNameAttr();
100
102 void setMemberName(::llvm::StringRef attrValue);
103
105 void setMemberNameAttr(::mlir::FlatSymbolRefAttr attr);
106
109
111 bool isRead();
112
114 ::mlir::FailureOr<SymbolLookupResult<MemberDefOp>> getMemberDefOp(::mlir::SymbolTableCollection &tables);
115};
116
117} // namespace llzk::component
118namespace llzk::component::detail {
119
120 template <typename ConcreteOp>
121 struct MemberRefOpInterfaceTrait : public ::mlir::OpInterface<MemberRefOpInterface, detail::MemberRefOpInterfaceInterfaceTraits>::Trait<ConcreteOp> {
122 };
123
124} // namespace llzk::component::detail
125namespace llzk::component {
126
127template<typename ConcreteOp>
128::mlir::Value detail::MemberRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::getVal(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
129 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getVal();
130}
131template<typename ConcreteOp>
132::mlir::TypedValue<::llzk::component::StructType> detail::MemberRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::getComponent(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
133 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getComponent();
134}
135template<typename ConcreteOp>
136::mlir::OpOperand &detail::MemberRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::getComponentMutable(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
137 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getComponentMutable();
138}
139template<typename ConcreteOp>
140::mlir::StringAttr detail::MemberRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::getMemberNameAttrName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
141 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getMemberNameAttrName();
142}
143template<typename ConcreteOp>
144::llvm::StringRef detail::MemberRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::getMemberName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
145 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getMemberName();
146}
147template<typename ConcreteOp>
148::mlir::FlatSymbolRefAttr detail::MemberRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::getMemberNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
149 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getMemberNameAttr();
150}
151template<typename ConcreteOp>
152void detail::MemberRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::setMemberName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::llvm::StringRef attrValue) {
153 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).setMemberName(attrValue);
154}
155template<typename ConcreteOp>
156void detail::MemberRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::setMemberNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::FlatSymbolRefAttr attr) {
157 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).setMemberNameAttr(attr);
158}
159template<typename ConcreteOp>
161 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getComponent().getType();
162}
163template<typename ConcreteOp>
164bool detail::MemberRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::isRead(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
165 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).isRead();
166}
167template<typename ConcreteOp>
168::mlir::Value detail::MemberRefOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getVal(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
169 return static_cast<const ConcreteOp *>(impl)->getVal(tablegen_opaque_val);
170}
171template<typename ConcreteOp>
172::mlir::TypedValue<::llzk::component::StructType> detail::MemberRefOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getComponent(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
173 return static_cast<const ConcreteOp *>(impl)->getComponent(tablegen_opaque_val);
174}
175template<typename ConcreteOp>
176::mlir::OpOperand &detail::MemberRefOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getComponentMutable(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
177 return static_cast<const ConcreteOp *>(impl)->getComponentMutable(tablegen_opaque_val);
178}
179template<typename ConcreteOp>
181 return static_cast<const ConcreteOp *>(impl)->getMemberNameAttrName(tablegen_opaque_val);
182}
183template<typename ConcreteOp>
184::llvm::StringRef detail::MemberRefOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getMemberName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
185 return static_cast<const ConcreteOp *>(impl)->getMemberName(tablegen_opaque_val);
186}
187template<typename ConcreteOp>
188::mlir::FlatSymbolRefAttr detail::MemberRefOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getMemberNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
189 return static_cast<const ConcreteOp *>(impl)->getMemberNameAttr(tablegen_opaque_val);
190}
191template<typename ConcreteOp>
192void detail::MemberRefOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::setMemberName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::llvm::StringRef attrValue) {
193 return static_cast<const ConcreteOp *>(impl)->setMemberName(tablegen_opaque_val, attrValue);
194}
195template<typename ConcreteOp>
196void detail::MemberRefOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::setMemberNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::FlatSymbolRefAttr attr) {
197 return static_cast<const ConcreteOp *>(impl)->setMemberNameAttr(tablegen_opaque_val, attr);
198}
199template<typename ConcreteOp>
201 return static_cast<const ConcreteOp *>(impl)->getStructType(tablegen_opaque_val);
202}
203template<typename ConcreteOp>
205 return static_cast<const ConcreteOp *>(impl)->isRead(tablegen_opaque_val);
206}
207
208} // namespace llzk::component
::mlir::Value getVal()
Gets the SSA Value that holds the read/write data for the MemberRefOp.
::mlir::FailureOr< SymbolLookupResult< MemberDefOp > > getMemberDefOp(::mlir::SymbolTableCollection &tables)
Gets the definition for the member referenced in this op.
Definition Ops.cpp:689
::mlir::FlatSymbolRefAttr getMemberNameAttr()
Gets the member name attribute from the MemberRefOp.
::mlir::TypedValue<::llzk::component::StructType > getComponent()
Gets the SSA value with the target component from the MemberRefOp.
void setMemberName(::llvm::StringRef attrValue)
Sets the member name attribute value in the MemberRefOp.
bool isRead()
Return true if the op is a read, false if it's a write.
::mlir::StringAttr getMemberNameAttrName()
Gets the name of the member name attribute on the MemberRefOp.
::llvm::StringRef getMemberName()
Gets the member name attribute value from the MemberRefOp.
void setMemberNameAttr(::mlir::FlatSymbolRefAttr attr)
Sets the member name attribute in the MemberRefOp.
::mlir::OpOperand & getComponentMutable()
Gets the SSA value with the target component from the MemberRefOp.
::llzk::component::StructType getStructType()
Gets the struct type of the target component.
static void setMemberNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::FlatSymbolRefAttr attr)
static inline ::mlir::TypedValue<::llzk::component::StructType > getComponent(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static void setMemberName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::llvm::StringRef attrValue)
static bool isRead(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::StringAttr getMemberNameAttrName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::llvm::StringRef getMemberName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::mlir::FlatSymbolRefAttr getMemberNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::mlir::Value getVal(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static bool isRead(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::TypedValue<::llzk::component::StructType > getComponent(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::mlir::OpOperand & getComponentMutable(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::llvm::StringRef getMemberName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static void setMemberName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::llvm::StringRef attrValue)
static inline ::mlir::Value getVal(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::mlir::StringAttr getMemberNameAttrName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static void setMemberNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::FlatSymbolRefAttr attr)
static inline ::mlir::FlatSymbolRefAttr getMemberNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
Common interface for operations that read or write from a struct member.
::mlir::StringAttr(* getMemberNameAttrName)(const Concept *impl, ::mlir::Operation *)
::llvm::StringRef(* getMemberName)(const Concept *impl, ::mlir::Operation *)
::llzk::component::StructType(* getStructType)(const Concept *impl, ::mlir::Operation *)
::mlir::FlatSymbolRefAttr(* getMemberNameAttr)(const Concept *impl, ::mlir::Operation *)
::mlir::Value(* getVal)(const Concept *impl, ::mlir::Operation *)
The methods defined by the interface.
::mlir::TypedValue<::llzk::component::StructType >(* getComponent)(const Concept *impl, ::mlir::Operation *)
::mlir::OpOperand &(* getComponentMutable)(const Concept *impl, ::mlir::Operation *)
bool(* isRead)(const Concept *impl, ::mlir::Operation *)
void(* setMemberName)(const Concept *impl, ::mlir::Operation *, ::llvm::StringRef)
void(* setMemberNameAttr)(const Concept *impl, ::mlir::Operation *, ::mlir::FlatSymbolRefAttr)