LLZK 2.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 {
10namespace polymorphic {
12namespace detail {
14 struct Concept {
16 ::std::optional<::mlir::Type> (*getTypeOpt)(const Concept *impl, ::mlir::Operation *);
18 const ::mlir::SymbolOpInterface::Concept *implSymbolOpInterface = nullptr;
19
20 void initializeInterfaceConcept(::mlir::detail::InterfaceMap &interfaceMap) {
21 implSymbolOpInterface = interfaceMap.lookup<::mlir::SymbolOpInterface>();
22 assert(implSymbolOpInterface && "`::llzk::polymorphic::TemplateSymbolBindingOpInterface` expected its base interface `::mlir::SymbolOpInterface` to be registered");
23 }
24 };
25 template<typename ConcreteOp>
26 class Model : public Concept {
27 public:
30
31 static inline ::std::optional<::mlir::Type> getTypeOpt(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
32 };
33 template<typename ConcreteOp>
34 class FallbackModel : public Concept {
35 public:
38
39 static inline ::std::optional<::mlir::Type> getTypeOpt(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
40 };
41 template<typename ConcreteModel, typename ConcreteOp>
42 class ExternalModel : public FallbackModel<ConcreteModel> {
43 public:
44 using ConcreteEntity = ConcreteOp;
45 };
46};
47template <typename ConcreteOp>
49
50} // namespace detail
51class TemplateSymbolBindingOpInterface : public ::mlir::OpInterface<TemplateSymbolBindingOpInterface, detail::TemplateSymbolBindingOpInterfaceInterfaceTraits> {
52public:
53 using ::mlir::OpInterface<TemplateSymbolBindingOpInterface, detail::TemplateSymbolBindingOpInterfaceInterfaceTraits>::OpInterface;
54 template <typename ConcreteOp>
57 ::std::optional<::mlir::Type> getTypeOpt();
58 //===----------------------------------------------------------------===//
59 // Inherited from ::mlir::SymbolOpInterface
60 //===----------------------------------------------------------------===//
61
62 operator ::mlir::SymbolOpInterface () const {
63 if (!*this) return nullptr;
64 return ::mlir::SymbolOpInterface(*this, getImpl()->implSymbolOpInterface);
65 }
66
68 ::mlir::StringAttr getNameAttr();
70 void setName(::mlir::StringAttr name);
72 mlir::SymbolTable::Visibility getVisibility();
74 bool isNested();
76 bool isPrivate();
78 bool isPublic();
80 void setVisibility(mlir::SymbolTable::Visibility vis);
82 void setNested();
84 void setPrivate();
86 void setPublic();
90 ::std::optional<::mlir::SymbolTable::UseRange> getSymbolUses(::mlir::Operation * from);
94 bool symbolKnownUseEmpty(::mlir::Operation * from);
98 ::llvm::LogicalResult replaceAllSymbolUses(::mlir::StringAttr newSymbol, ::mlir::Operation * from);
101 bool isOptionalSymbol();
107 bool isDeclaration();
108
109 using Visibility = mlir::SymbolTable::Visibility;
110
112 ::mlir::StringRef getName() {
113 return getNameAttr().getValue();
114 }
115
117 void setName(::mlir::StringRef name) {
118 setName(::mlir::StringAttr::get((*this)->getContext(), name));
119 }
120};
121namespace detail {
122 template <typename ConcreteOp>
123 struct TemplateSymbolBindingOpInterfaceTrait : public ::mlir::OpInterface<TemplateSymbolBindingOpInterface, detail::TemplateSymbolBindingOpInterfaceInterfaceTraits>::Trait<ConcreteOp> {
124 };
125}// namespace detail
126} // namespace polymorphic
127} // namespace llzk
128namespace llzk {
129namespace polymorphic {
130template<typename ConcreteOp>
131::std::optional<::mlir::Type> detail::TemplateSymbolBindingOpInterfaceInterfaceTraits::Model<ConcreteOp>::getTypeOpt(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
132 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getTypeOpt();
133}
134template<typename ConcreteOp>
135::std::optional<::mlir::Type> detail::TemplateSymbolBindingOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getTypeOpt(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
136 return static_cast<const ConcreteOp *>(impl)->getTypeOpt(tablegen_opaque_val);
137}
138} // namespace polymorphic
139} // namespace llzk
Apache License January AND DISTRIBUTION Definitions License shall mean the terms and conditions for and distribution as defined by Sections through of this document Licensor shall mean the copyright owner or entity authorized by the copyright owner that is granting the License Legal Entity shall mean the union of the acting entity and all other entities that control are controlled by or are under common control with that entity For the purposes of this definition control direct or to cause the direction or management of such whether by contract or including but not limited to software source documentation and configuration files Object form shall mean any form resulting from mechanical transformation or translation of a Source including but not limited to compiled object generated and conversions to other media types Work shall mean the work of whether in Source or Object made available under the as indicated by a copyright notice that is included in or attached to the whether in Source or Object that is based or other modifications as a an original work of authorship For the purposes of this Derivative Works shall not include works that remain separable from
Definition LICENSE.txt:45
::std::optional<::mlir::Type > getTypeOpt()
Gets the optional type of this constant symbol.
void setName(::mlir::StringRef name)
Convenience version of setName that take a StringRef.
::llvm::LogicalResult replaceAllSymbolUses(::mlir::StringAttr newSymbol, ::mlir::Operation *from)
Attempt to replace all uses of the current symbol with the provided symbol 'newSymbol' that are neste...
bool isOptionalSymbol()
Returns true if this operation optionally defines a symbol based on the presence of the symbol name.
bool isNested()
Returns true if this symbol has nested visibility.
bool isPrivate()
Returns true if this symbol has private visibility.
::mlir::StringAttr getNameAttr()
Returns the name of this symbol.
void setName(::mlir::StringAttr name)
Sets the name of this symbol.
void setPublic()
Sets the visibility of this symbol to be public.
::std::optional<::mlir::SymbolTable::UseRange > getSymbolUses(::mlir::Operation *from)
Get all of the uses of the current symbol that are nested within the given operation 'from'.
void setPrivate()
Sets the visibility of this symbol to be private.
mlir::SymbolTable::Visibility getVisibility()
Gets the visibility of this symbol.
::mlir::StringRef getName()
Convenience version of getNameAttr that returns a StringRef.
void setNested()
Sets the visibility of this symbol to be nested.
bool isDeclaration()
Returns true if this operation is a declaration of a symbol (as opposed to a definition).
bool isPublic()
Returns true if this symbol has public visibility.
bool symbolKnownUseEmpty(::mlir::Operation *from)
Return if the current symbol is known to have no uses that are nested within the given operation 'fro...
bool canDiscardOnUseEmpty()
Returns true if this operation can be discarded if it has no remaining symbol uses.
void setVisibility(mlir::SymbolTable::Visibility vis)
Sets the visibility of this symbol.
static inline ::std::optional<::mlir::Type > getTypeOpt(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::std::optional<::mlir::Type > getTypeOpt(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
const ::mlir::SymbolOpInterface::Concept * implSymbolOpInterface
The base classes of this interface.
::std::optional<::mlir::Type >(* getTypeOpt)(const Concept *impl, ::mlir::Operation *)
The methods defined by the interface.