LLZK 0.1.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
InlineIncludesPass.h.inc
Go to the documentation of this file.
1/* Autogenerated by mlir-tblgen; don't manually edit */
2
3#ifdef GEN_PASS_DECL
4// Generate declarations for all passes.
5#define GEN_PASS_DECL_INLINEINCLUDESPASS
6#undef GEN_PASS_DECL
7#endif // GEN_PASS_DECL
8
9//===----------------------------------------------------------------------===//
10// InlineIncludesPass
11//===----------------------------------------------------------------------===//
12#ifdef GEN_PASS_DECL_INLINEINCLUDESPASS
13#undef GEN_PASS_DECL_INLINEINCLUDESPASS
14#endif // GEN_PASS_DECL_INLINEINCLUDESPASS
15#ifdef GEN_PASS_DEF_INLINEINCLUDESPASS
16namespace impl {
17
18template <typename DerivedT>
19class InlineIncludesPassBase : public ::mlir::OperationPass<::mlir::ModuleOp> {
20public:
21 using Base = InlineIncludesPassBase;
22
23 InlineIncludesPassBase() : ::mlir::OperationPass<::mlir::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
24 InlineIncludesPassBase(const InlineIncludesPassBase &other) : ::mlir::OperationPass<::mlir::ModuleOp>(other) {}
25 InlineIncludesPassBase& operator=(const InlineIncludesPassBase &) = delete;
26 InlineIncludesPassBase(InlineIncludesPassBase &&) = delete;
27 InlineIncludesPassBase& operator=(InlineIncludesPassBase &&) = delete;
28 ~InlineIncludesPassBase() = default;
29
31 static constexpr ::llvm::StringLiteral getArgumentName() {
32 return ::llvm::StringLiteral("llzk-inline-includes");
33 }
34 ::llvm::StringRef getArgument() const override { return "llzk-inline-includes"; }
35
36 ::llvm::StringRef getDescription() const override { return "Replace all IncludeOp with contents of the referenced file."; }
37
39 static constexpr ::llvm::StringLiteral getPassName() {
40 return ::llvm::StringLiteral("InlineIncludesPass");
41 }
42 ::llvm::StringRef getName() const override { return "InlineIncludesPass"; }
43
45 static bool classof(const ::mlir::Pass *pass) {
46 return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
47 }
48
50 std::unique_ptr<::mlir::Pass> clonePass() const override {
51 return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
52 }
53
55 void getDependentDialects(::mlir::DialectRegistry &registry) const override {
56 registry.insert<llzk::LLZKDialect>();
57 registry.insert<llzk::boolean::BoolDialect>();
58 registry.insert<llzk::array::ArrayDialect>();
59 registry.insert<llzk::component::StructDialect>();
60 registry.insert<llzk::constrain::ConstrainDialect>();
61 registry.insert<llzk::felt::FeltDialect>();
62 registry.insert<llzk::global::GlobalDialect>();
63 registry.insert<llzk::include::IncludeDialect>();
64 registry.insert<llzk::function::FunctionDialect>();
65 registry.insert<llzk::string::StringDialect>();
66 registry.insert<llzk::polymorphic::PolymorphicDialect>();
67 registry.insert<mlir::arith::ArithDialect>();
68 registry.insert<mlir::scf::SCFDialect>();
69 }
70
74 MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(InlineIncludesPassBase<DerivedT>)
75
76protected:
77private:
78};
79} // namespace impl
80#undef GEN_PASS_DEF_INLINEINCLUDESPASS
81#endif // GEN_PASS_DEF_INLINEINCLUDESPASS
82#ifdef GEN_PASS_REGISTRATION
83
84//===----------------------------------------------------------------------===//
85// InlineIncludesPass Registration
86//===----------------------------------------------------------------------===//
87
88inline void registerInlineIncludesPass() {
89 ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
91 });
92}
93
94// Old registration code, kept for temporary backwards compatibility.
96 ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
98 });
99}
100
101//===----------------------------------------------------------------------===//
102// Transformation Registration
103//===----------------------------------------------------------------------===//
104
105inline void registerTransformationPasses() {
107}
108#undef GEN_PASS_REGISTRATION
109#endif // GEN_PASS_REGISTRATION
110// Deprecated. Please use the new per-pass macros.
111#ifdef GEN_PASS_CLASSES
112
113template <typename DerivedT>
114class InlineIncludesPassBase : public ::mlir::OperationPass<::mlir::ModuleOp> {
115public:
116 using Base = InlineIncludesPassBase;
117
118 InlineIncludesPassBase() : ::mlir::OperationPass<::mlir::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
119 InlineIncludesPassBase(const InlineIncludesPassBase &other) : ::mlir::OperationPass<::mlir::ModuleOp>(other) {}
120 InlineIncludesPassBase& operator=(const InlineIncludesPassBase &) = delete;
121 InlineIncludesPassBase(InlineIncludesPassBase &&) = delete;
122 InlineIncludesPassBase& operator=(InlineIncludesPassBase &&) = delete;
123 ~InlineIncludesPassBase() = default;
124
126 static constexpr ::llvm::StringLiteral getArgumentName() {
127 return ::llvm::StringLiteral("llzk-inline-includes");
128 }
129 ::llvm::StringRef getArgument() const override { return "llzk-inline-includes"; }
130
131 ::llvm::StringRef getDescription() const override { return "Replace all IncludeOp with contents of the referenced file."; }
132
134 static constexpr ::llvm::StringLiteral getPassName() {
135 return ::llvm::StringLiteral("InlineIncludesPass");
136 }
137 ::llvm::StringRef getName() const override { return "InlineIncludesPass"; }
138
140 static bool classof(const ::mlir::Pass *pass) {
141 return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
142 }
143
145 std::unique_ptr<::mlir::Pass> clonePass() const override {
146 return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
147 }
148
150 void getDependentDialects(::mlir::DialectRegistry &registry) const override {
151 registry.insert<llzk::LLZKDialect>();
152 registry.insert<llzk::boolean::BoolDialect>();
153 registry.insert<llzk::array::ArrayDialect>();
154 registry.insert<llzk::component::StructDialect>();
155 registry.insert<llzk::constrain::ConstrainDialect>();
156 registry.insert<llzk::felt::FeltDialect>();
157 registry.insert<llzk::global::GlobalDialect>();
158 registry.insert<llzk::include::IncludeDialect>();
159 registry.insert<llzk::function::FunctionDialect>();
160 registry.insert<llzk::string::StringDialect>();
161 registry.insert<llzk::polymorphic::PolymorphicDialect>();
162 registry.insert<mlir::arith::ArithDialect>();
163 registry.insert<mlir::scf::SCFDialect>();
164 }
165
169 MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(InlineIncludesPassBase<DerivedT>)
170
171protected:
172};
173#undef GEN_PASS_CLASSES
174#endif // GEN_PASS_CLASSES
void registerTransformationPasses()
std::unique_ptr< mlir::Pass > createInlineIncludesPass()
void registerInlineIncludesPassPass()
void registerInlineIncludesPass()