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 ::llvm::StringRef (*getFieldName)(const Concept *impl, ::mlir::Operation *);
19 ::mlir::FlatSymbolRefAttr (*getFieldNameAttr)(const Concept *impl, ::mlir::Operation *);
20 ::llzk::component::StructType (*getStructType)(const Concept *impl, ::mlir::Operation *);
21 bool (*isRead)(const Concept *impl, ::mlir::Operation *);
22 };
23 template<typename ConcreteOp>
24 class Model : public Concept {
25 public:
28
29 static inline ::mlir::Value getVal(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
30 static inline ::mlir::TypedValue<::llzk::component::StructType> getComponent(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
31 static inline ::llvm::StringRef getFieldName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
32 static inline ::mlir::FlatSymbolRefAttr getFieldNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
33 static inline ::llzk::component::StructType getStructType(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
34 static inline bool isRead(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::TypedValue<::llzk::component::StructType> getComponent(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
44 static inline ::llvm::StringRef getFieldName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
45 static inline ::mlir::FlatSymbolRefAttr getFieldNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
46 static inline ::llzk::component::StructType getStructType(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
47 static inline bool isRead(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
48 };
49 template<typename ConcreteModel, typename ConcreteOp>
50 class ExternalModel : public FallbackModel<ConcreteModel> {
51 public:
52 using ConcreteEntity = ConcreteOp;
53 };
54};template <typename ConcreteOp>
56
57} // namespace detail
58class FieldRefOpInterface : public ::mlir::OpInterface<FieldRefOpInterface, detail::FieldRefOpInterfaceInterfaceTraits> {
59public:
60 using ::mlir::OpInterface<FieldRefOpInterface, detail::FieldRefOpInterfaceInterfaceTraits>::OpInterface;
61 template <typename ConcreteOp>
62 struct Trait : public detail::FieldRefOpInterfaceTrait<ConcreteOp> {};
64 ::mlir::Value getVal();
66 ::mlir::TypedValue<::llzk::component::StructType> getComponent();
68 ::llvm::StringRef getFieldName();
70 ::mlir::FlatSymbolRefAttr getFieldNameAttr();
74 bool isRead();
75
77 ::mlir::FailureOr<SymbolLookupResult<FieldDefOp>> getFieldDefOp(::mlir::SymbolTableCollection &tables);
78};
79namespace detail {
80 template <typename ConcreteOp>
81 struct FieldRefOpInterfaceTrait : public ::mlir::OpInterface<FieldRefOpInterface, detail::FieldRefOpInterfaceInterfaceTraits>::Trait<ConcreteOp> {
82 };
83}// namespace detail
84} // namespace component
85} // namespace llzk
86namespace llzk {
87namespace component {
88template<typename ConcreteOp>
89::mlir::Value detail::FieldRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::getVal(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
90 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getVal();
91}
92template<typename ConcreteOp>
93::mlir::TypedValue<::llzk::component::StructType> detail::FieldRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::getComponent(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
94 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getComponent();
95}
96template<typename ConcreteOp>
97::llvm::StringRef detail::FieldRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::getFieldName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
98 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getFieldName();
99}
100template<typename ConcreteOp>
101::mlir::FlatSymbolRefAttr detail::FieldRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::getFieldNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
102 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getFieldNameAttr();
103}
104template<typename ConcreteOp>
106 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getComponent().getType();
107}
108template<typename ConcreteOp>
109bool detail::FieldRefOpInterfaceInterfaceTraits::Model<ConcreteOp>::isRead(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
110 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).isRead();
111}
112template<typename ConcreteOp>
113::mlir::Value detail::FieldRefOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getVal(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
114 return static_cast<const ConcreteOp *>(impl)->getVal(tablegen_opaque_val);
115}
116template<typename ConcreteOp>
117::mlir::TypedValue<::llzk::component::StructType> detail::FieldRefOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getComponent(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
118 return static_cast<const ConcreteOp *>(impl)->getComponent(tablegen_opaque_val);
119}
120template<typename ConcreteOp>
121::llvm::StringRef detail::FieldRefOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getFieldName(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
122 return static_cast<const ConcreteOp *>(impl)->getFieldName(tablegen_opaque_val);
123}
124template<typename ConcreteOp>
125::mlir::FlatSymbolRefAttr detail::FieldRefOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getFieldNameAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
126 return static_cast<const ConcreteOp *>(impl)->getFieldNameAttr(tablegen_opaque_val);
127}
128template<typename ConcreteOp>
130 return static_cast<const ConcreteOp *>(impl)->getStructType(tablegen_opaque_val);
131}
132template<typename ConcreteOp>
134 return static_cast<const ConcreteOp *>(impl)->isRead(tablegen_opaque_val);
135}
136} // namespace component
137} // namespace llzk
::mlir::FailureOr< SymbolLookupResult< FieldDefOp > > getFieldDefOp(::mlir::SymbolTableCollection &tables)
Gets the definition for the field referenced in this op.
Definition Ops.cpp:509
::llzk::component::StructType getStructType()
Gets the struct type of the target component.
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 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 ::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 inline ::llvm::StringRef getFieldName(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 *)
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 *)
::mlir::Value(* getVal)(const Concept *impl, ::mlir::Operation *)
The methods defined by the interface.