LLZK 2.1.1
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
DiscardableAllocationOpInterfaces.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 {
11namespace detail {
13 struct Concept {
15 bool (*loadsFromDiscardableAllocation)(const Concept *impl, ::mlir::Operation *, ::mlir::Value);
16 bool (*storesToDiscardableAllocation)(const Concept *impl, ::mlir::Operation *, ::mlir::Value);
17 bool (*canEraseAsDeadStoreTo)(const Concept *impl, ::mlir::Operation *, ::mlir::Value, const ::mlir::DataLayout &);
18 };
19 template<typename ConcreteOp>
20 class Model : public Concept {
21 public:
24
25 static inline bool loadsFromDiscardableAllocation(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::Value ptr);
26 static inline bool storesToDiscardableAllocation(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::Value ptr);
27 static inline bool canEraseAsDeadStoreTo(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::Value ptr, const ::mlir::DataLayout & dataLayout);
28 };
29 template<typename ConcreteOp>
30 class FallbackModel : public Concept {
31 public:
34
35 static inline bool loadsFromDiscardableAllocation(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::Value ptr);
36 static inline bool storesToDiscardableAllocation(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::Value ptr);
37 static inline bool canEraseAsDeadStoreTo(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::Value ptr, const ::mlir::DataLayout & dataLayout);
38 };
39 template<typename ConcreteModel, typename ConcreteOp>
40 class ExternalModel : public FallbackModel<ConcreteModel> {
41 public:
42 using ConcreteEntity = ConcreteOp;
43 };
44};
45template <typename ConcreteOp>
47
48} // namespace detail
49class DiscardableAllocationAccessorOpInterface : public ::mlir::OpInterface<DiscardableAllocationAccessorOpInterface, detail::DiscardableAllocationAccessorOpInterfaceInterfaceTraits> {
50public:
51 using ::mlir::OpInterface<DiscardableAllocationAccessorOpInterface, detail::DiscardableAllocationAccessorOpInterfaceInterfaceTraits>::OpInterface;
52 template <typename ConcreteOp>
55 bool loadsFromDiscardableAllocation(::mlir::Value ptr);
57 bool storesToDiscardableAllocation(::mlir::Value ptr);
59 bool canEraseAsDeadStoreTo(::mlir::Value ptr, const ::mlir::DataLayout & dataLayout);
60};
61namespace detail {
62 template <typename ConcreteOp>
63 struct DiscardableAllocationAccessorOpInterfaceTrait : public ::mlir::OpInterface<DiscardableAllocationAccessorOpInterface, detail::DiscardableAllocationAccessorOpInterfaceInterfaceTraits>::Trait<ConcreteOp> {
64 };
65}// namespace detail
66} // namespace llzk
67namespace llzk {
68template<typename ConcreteOp>
70 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).loadsFromDiscardableAllocation(ptr);
71}
72template<typename ConcreteOp>
74 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).storesToDiscardableAllocation(ptr);
75}
76template<typename ConcreteOp>
77bool detail::DiscardableAllocationAccessorOpInterfaceInterfaceTraits::Model<ConcreteOp>::canEraseAsDeadStoreTo(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::Value ptr, const ::mlir::DataLayout & dataLayout) {
78 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).canEraseAsDeadStoreTo(ptr, dataLayout);
79}
80template<typename ConcreteOp>
82 return static_cast<const ConcreteOp *>(impl)->loadsFromDiscardableAllocation(tablegen_opaque_val, ptr);
83}
84template<typename ConcreteOp>
86 return static_cast<const ConcreteOp *>(impl)->storesToDiscardableAllocation(tablegen_opaque_val, ptr);
87}
88template<typename ConcreteOp>
89bool detail::DiscardableAllocationAccessorOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::canEraseAsDeadStoreTo(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::Value ptr, const ::mlir::DataLayout & dataLayout) {
90 return static_cast<const ConcreteOp *>(impl)->canEraseAsDeadStoreTo(tablegen_opaque_val, ptr, dataLayout);
91}
92} // namespace llzk
bool canEraseAsDeadStoreTo(::mlir::Value ptr, const ::mlir::DataLayout &dataLayout)
Returns true if this op can be erased as a dead store to ptr.
bool loadsFromDiscardableAllocation(::mlir::Value ptr)
Returns true if this op reads from the allocation represented by ptr.
bool storesToDiscardableAllocation(::mlir::Value ptr)
Returns true if this op writes to the allocation represented by ptr.
static bool canEraseAsDeadStoreTo(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::Value ptr, const ::mlir::DataLayout &dataLayout)
static bool storesToDiscardableAllocation(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::Value ptr)
static bool loadsFromDiscardableAllocation(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::Value ptr)
static bool loadsFromDiscardableAllocation(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::Value ptr)
static bool storesToDiscardableAllocation(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::Value ptr)
static bool canEraseAsDeadStoreTo(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::Value ptr, const ::mlir::DataLayout &dataLayout)
bool(* storesToDiscardableAllocation)(const Concept *impl, ::mlir::Operation *, ::mlir::Value)
bool(* loadsFromDiscardableAllocation)(const Concept *impl, ::mlir::Operation *, ::mlir::Value)
The methods defined by the interface.
bool(* canEraseAsDeadStoreTo)(const Concept *impl, ::mlir::Operation *, ::mlir::Value, const ::mlir::DataLayout &)