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::global {
10
13
14} // namespace llzk::global
15namespace llzk::global {
16
18namespace detail {
20 struct Concept {
22 ::mlir::Value (*getVal)(const Concept *impl, ::mlir::Operation *);
23 ::mlir::StringAttr (*getNameRefAttrName)(const Concept *impl, ::mlir::Operation *);
24 ::mlir::SymbolRefAttr (*getNameRef)(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::StringAttr getNameRefAttrName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
34 static inline ::mlir::SymbolRefAttr getNameRef(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
35 };
36 template<typename ConcreteOp>
37 class FallbackModel : public Concept {
38 public:
41
42 static inline ::mlir::Value getVal(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
43 static inline ::mlir::StringAttr getNameRefAttrName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
44 static inline ::mlir::SymbolRefAttr getNameRef(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
45 };
46 template<typename ConcreteModel, typename ConcreteOp>
47 class ExternalModel : public FallbackModel<ConcreteModel> {
48 public:
49 using ConcreteEntity = ConcreteOp;
50 };
51};
52template <typename ConcreteOp>
54
55} // namespace detail
56class GlobalRefOpInterface : public ::mlir::OpInterface<GlobalRefOpInterface, detail::GlobalRefOpInterfaceInterfaceTraits> {
57public:
58 using ::mlir::OpInterface<GlobalRefOpInterface, detail::GlobalRefOpInterfaceInterfaceTraits>::OpInterface;
59 template <typename ConcreteOp>
60 struct Trait : public detail::GlobalRefOpInterfaceTrait<ConcreteOp> {};
61
63 ::mlir::Value getVal();
64
66 ::mlir::StringAttr getNameRefAttrName();
67
69 ::mlir::SymbolRefAttr getNameRef();
70
72 ::mlir::FailureOr<SymbolLookupResult<GlobalDefOp>> getGlobalDefOp(::mlir::SymbolTableCollection &tables);
73};
74
75} // namespace llzk::global
76namespace llzk::global::detail {
77
78 template <typename ConcreteOp>
79 struct GlobalRefOpInterfaceTrait : public ::mlir::OpInterface<GlobalRefOpInterface, detail::GlobalRefOpInterfaceInterfaceTraits>::Trait<ConcreteOp> {
80 };
81
82} // namespace llzk::global::detail
83namespace llzk::global {
84
85template<typename ConcreteOp>
86::mlir::Value detail::GlobalRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::getVal(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
87 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getVal();
88}
89template<typename ConcreteOp>
90::mlir::StringAttr detail::GlobalRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::getNameRefAttrName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
91 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getNameRefAttrName();
92}
93template<typename ConcreteOp>
94::mlir::SymbolRefAttr detail::GlobalRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::getNameRef(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
95 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getNameRef();
96}
97template<typename ConcreteOp>
98::mlir::Value detail::GlobalRefOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getVal(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
99 return static_cast<const ConcreteOp *>(impl)->getVal(tablegen_opaque_val);
100}
101template<typename ConcreteOp>
102::mlir::StringAttr detail::GlobalRefOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getNameRefAttrName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
103 return static_cast<const ConcreteOp *>(impl)->getNameRefAttrName(tablegen_opaque_val);
104}
105template<typename ConcreteOp>
106::mlir::SymbolRefAttr detail::GlobalRefOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getNameRef(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
107 return static_cast<const ConcreteOp *>(impl)->getNameRef(tablegen_opaque_val);
108}
109
110} // namespace llzk::global
::mlir::Value getVal()
Gets the SSA Value that holds the read/write data for the GlobalRefOp.
::mlir::StringAttr getNameRefAttrName()
Gets the name of the global reference attribute on the GlobalRefOp.
::mlir::FailureOr< SymbolLookupResult< GlobalDefOp > > getGlobalDefOp(::mlir::SymbolTableCollection &tables)
Gets the definition for the global referenced in this op.
Definition Ops.cpp:417
::mlir::SymbolRefAttr getNameRef()
Gets the global name attribute from the GlobalRefOp.
static inline ::mlir::Value getVal(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::mlir::StringAttr getNameRefAttrName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::mlir::SymbolRefAttr getNameRef(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::mlir::SymbolRefAttr getNameRef(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::mlir::Value getVal(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::mlir::StringAttr getNameRefAttrName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
Common interface for operations that read or write from a global.
::mlir::SymbolRefAttr(* getNameRef)(const Concept *impl, ::mlir::Operation *)
::mlir::StringAttr(* getNameRefAttrName)(const Concept *impl, ::mlir::Operation *)
::mlir::Value(* getVal)(const Concept *impl, ::mlir::Operation *)
The methods defined by the interface.