LLZK 0.1.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 {
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 (*getMemberName)(const Concept *impl, ::mlir::Operation *);
20 ::mlir::FlatSymbolRefAttr (*getMemberNameAttr)(const Concept *impl, ::mlir::Operation *);
21 void (*setMemberName)(const Concept *impl, ::mlir::Operation *, ::llvm::StringRef);
22 void (*setMemberNameAttr)(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 getMemberName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
36 static inline ::mlir::FlatSymbolRefAttr getMemberNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
37 static inline void setMemberName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::llvm::StringRef attrValue);
38 static inline void setMemberNameAttr(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 getMemberName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
52 static inline ::mlir::FlatSymbolRefAttr getMemberNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
53 static inline void setMemberName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::llvm::StringRef attrValue);
54 static inline void setMemberNameAttr(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 MemberRefOpInterface : public ::mlir::OpInterface<MemberRefOpInterface, detail::MemberRefOpInterfaceInterfaceTraits> {
69public:
70 using ::mlir::OpInterface<MemberRefOpInterface, detail::MemberRefOpInterfaceInterfaceTraits>::OpInterface;
71 template <typename ConcreteOp>
72 struct Trait : public detail::MemberRefOpInterfaceTrait<ConcreteOp> {};
74 ::mlir::Value getVal();
76 ::mlir::TypedValue<::llzk::component::StructType> getComponent();
78 ::mlir::OpOperand &getComponentMutable();
80 ::llvm::StringRef getMemberName();
82 ::mlir::FlatSymbolRefAttr getMemberNameAttr();
84 void setMemberName(::llvm::StringRef attrValue);
86 void setMemberNameAttr(::mlir::FlatSymbolRefAttr attr);
90 bool isRead();
91
93 ::mlir::FailureOr<SymbolLookupResult<MemberDefOp>> getMemberDefOp(::mlir::SymbolTableCollection &tables);
94};
95namespace detail {
96 template <typename ConcreteOp>
97 struct MemberRefOpInterfaceTrait : public ::mlir::OpInterface<MemberRefOpInterface, detail::MemberRefOpInterfaceInterfaceTraits>::Trait<ConcreteOp> {
98 };
99}// namespace detail
100} // namespace component
101} // namespace llzk
102namespace llzk {
103namespace component {
104template<typename ConcreteOp>
105::mlir::Value detail::MemberRefOpInterfaceInterfaceTraits::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::MemberRefOpInterfaceInterfaceTraits::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::MemberRefOpInterfaceInterfaceTraits::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::MemberRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::getMemberName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
118 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getMemberName();
119}
120template<typename ConcreteOp>
121::mlir::FlatSymbolRefAttr detail::MemberRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::getMemberNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
122 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getMemberNameAttr();
123}
124template<typename ConcreteOp>
125void detail::MemberRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::setMemberName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::llvm::StringRef attrValue) {
126 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).setMemberName(attrValue);
127}
128template<typename ConcreteOp>
129void detail::MemberRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::setMemberNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::FlatSymbolRefAttr attr) {
130 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).setMemberNameAttr(attr);
131}
132template<typename ConcreteOp>
134 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getComponent().getType();
135}
136template<typename ConcreteOp>
137bool detail::MemberRefOpInterfaceInterfaceTraits::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::MemberRefOpInterfaceInterfaceTraits::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::MemberRefOpInterfaceInterfaceTraits::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::MemberRefOpInterfaceInterfaceTraits::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::MemberRefOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getMemberName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
154 return static_cast<const ConcreteOp *>(impl)->getMemberName(tablegen_opaque_val);
155}
156template<typename ConcreteOp>
157::mlir::FlatSymbolRefAttr detail::MemberRefOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getMemberNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
158 return static_cast<const ConcreteOp *>(impl)->getMemberNameAttr(tablegen_opaque_val);
159}
160template<typename ConcreteOp>
161void detail::MemberRefOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::setMemberName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::llvm::StringRef attrValue) {
162 return static_cast<const ConcreteOp *>(impl)->setMemberName(tablegen_opaque_val, attrValue);
163}
164template<typename ConcreteOp>
165void detail::MemberRefOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::setMemberNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::FlatSymbolRefAttr attr) {
166 return static_cast<const ConcreteOp *>(impl)->setMemberNameAttr(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
::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:620
::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.
::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 ::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 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)
::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)