LLZK 3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
TransformationPasses.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_CONSTGLOBALPROPAGATIONPASS
6#undef GEN_PASS_DECL
7#endif // GEN_PASS_DECL
8
9//===----------------------------------------------------------------------===//
10// ConstGlobalPropagationPass
11//===----------------------------------------------------------------------===//
12#ifdef GEN_PASS_DECL_CONSTGLOBALPROPAGATIONPASS
13std::unique_ptr<::mlir::Pass> createConstGlobalPropagationPass();
14#undef GEN_PASS_DECL_CONSTGLOBALPROPAGATIONPASS
15#endif // GEN_PASS_DECL_CONSTGLOBALPROPAGATIONPASS
16#ifdef GEN_PASS_DEF_CONSTGLOBALPROPAGATIONPASS
17
18namespace impl {
19 std::unique_ptr<::mlir::Pass> createConstGlobalPropagationPass();
20} // namespace impl
21namespace impl {
22
23template <typename DerivedT>
24class ConstGlobalPropagationPassBase : public ::mlir::OperationPass<::mlir::ModuleOp> {
25public:
26 using Base = ConstGlobalPropagationPassBase;
27
28 ConstGlobalPropagationPassBase() : ::mlir::OperationPass<::mlir::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
29 ConstGlobalPropagationPassBase(const ConstGlobalPropagationPassBase &other) : ::mlir::OperationPass<::mlir::ModuleOp>(other) {}
30 ConstGlobalPropagationPassBase& operator=(const ConstGlobalPropagationPassBase &) = delete;
31 ConstGlobalPropagationPassBase(ConstGlobalPropagationPassBase &&) = delete;
32 ConstGlobalPropagationPassBase& operator=(ConstGlobalPropagationPassBase &&) = delete;
33 ~ConstGlobalPropagationPassBase() = default;
34
36 static constexpr ::llvm::StringLiteral getArgumentName() {
37 return ::llvm::StringLiteral("llzk-const-global-propagation");
38 }
39 ::llvm::StringRef getArgument() const override { return "llzk-const-global-propagation"; }
40
41 ::llvm::StringRef getDescription() const override { return R"PD(Propagate const globals into their use sites)PD"; }
42
44 static constexpr ::llvm::StringLiteral getPassName() {
45 return ::llvm::StringLiteral("ConstGlobalPropagationPass");
46 }
47 ::llvm::StringRef getName() const override { return "ConstGlobalPropagationPass"; }
48
50 static bool classof(const ::mlir::Pass *pass) {
51 return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
52 }
53
55 std::unique_ptr<::mlir::Pass> clonePass() const override {
56 return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
57 }
58
60 void getDependentDialects(::mlir::DialectRegistry &registry) const override {
61 registry.insert<llzk::LLZKDialect>();
62 registry.insert<llzk::boolean::BoolDialect>();
63 registry.insert<llzk::array::ArrayDialect>();
64 registry.insert<llzk::component::StructDialect>();
65 registry.insert<llzk::constrain::ConstrainDialect>();
66 registry.insert<llzk::felt::FeltDialect>();
67 registry.insert<llzk::global::GlobalDialect>();
68 registry.insert<llzk::include::IncludeDialect>();
69 registry.insert<llzk::function::FunctionDialect>();
70 registry.insert<llzk::string::StringDialect>();
71 registry.insert<llzk::polymorphic::PolymorphicDialect>();
72 registry.insert<mlir::arith::ArithDialect>();
73 registry.insert<mlir::scf::SCFDialect>();
74 }
75
79 MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConstGlobalPropagationPassBase<DerivedT>)
80
81protected:
82private:
83
84 friend std::unique_ptr<::mlir::Pass> createConstGlobalPropagationPass() {
85 return std::make_unique<DerivedT>();
86 }
87};
88} // namespace impl
89
90std::unique_ptr<::mlir::Pass> createConstGlobalPropagationPass() {
91 return impl::createConstGlobalPropagationPass();
92}
93#undef GEN_PASS_DEF_CONSTGLOBALPROPAGATIONPASS
94#endif // GEN_PASS_DEF_CONSTGLOBALPROPAGATIONPASS
95#ifdef GEN_PASS_REGISTRATION
96// Generate registrations for all passes.
97#define GEN_PASS_REGISTRATION_CONSTGLOBALPROPAGATIONPASS
98#endif // GEN_PASS_REGISTRATION
99
100//===----------------------------------------------------------------------===//
101// ConstGlobalPropagationPass Registration
102//===----------------------------------------------------------------------===//
103#ifdef GEN_PASS_REGISTRATION_CONSTGLOBALPROPAGATIONPASS
104
106 ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
108 });
109}
110
111// Old registration code, kept for temporary backwards compatibility.
113 ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
115 });
116}
117
118#undef GEN_PASS_REGISTRATION_CONSTGLOBALPROPAGATIONPASS
119#endif // GEN_PASS_REGISTRATION_CONSTGLOBALPROPAGATIONPASS
120#ifdef GEN_PASS_REGISTRATION
121
122//===----------------------------------------------------------------------===//
123// Transformation Registration
124//===----------------------------------------------------------------------===//
125
126inline void registerTransformationPasses() {
128}
129#undef GEN_PASS_REGISTRATION
130#endif // GEN_PASS_REGISTRATION
131#ifdef GEN_PASS_CLASSES
132#error "GEN_PASS_CLASSES is deprecated; use per-pass macros"
133#undef GEN_PASS_CLASSES
134#endif // GEN_PASS_CLASSES
void registerTransformationPasses()
std::unique_ptr<::mlir::Pass > createConstGlobalPropagationPass()
void registerConstGlobalPropagationPass()
void registerConstGlobalPropagationPassPass()