LLZK 0.1.0
Veridise's ZK Language IR
Loading...
Searching...
No Matches
AnalysisPasses.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_CALLGRAPHPRINTERPASS
6#define GEN_PASS_DECL_CALLGRAPHSCCSPRINTERPASS
7#define GEN_PASS_DECL_CONSTRAINTDEPENDENCYGRAPHPRINTERPASS
8#define GEN_PASS_DECL_INTERVALANALYSISPRINTERPASS
9#define GEN_PASS_DECL_SYMBOLDEFTREEPRINTERPASS
10#define GEN_PASS_DECL_SYMBOLUSEGRAPHPRINTERPASS
11#undef GEN_PASS_DECL
12#endif // GEN_PASS_DECL
13
14//===----------------------------------------------------------------------===//
15// CallGraphPrinterPass
16//===----------------------------------------------------------------------===//
17#ifdef GEN_PASS_DECL_CALLGRAPHPRINTERPASS
18#undef GEN_PASS_DECL_CALLGRAPHPRINTERPASS
19#endif // GEN_PASS_DECL_CALLGRAPHPRINTERPASS
20#ifdef GEN_PASS_DEF_CALLGRAPHPRINTERPASS
21namespace impl {
22
23template <typename DerivedT>
24class CallGraphPrinterPassBase : public ::mlir::OperationPass<::mlir::ModuleOp> {
25public:
26 using Base = CallGraphPrinterPassBase;
27
28 CallGraphPrinterPassBase() : ::mlir::OperationPass<::mlir::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
29 CallGraphPrinterPassBase(const CallGraphPrinterPassBase &other) : ::mlir::OperationPass<::mlir::ModuleOp>(other) {}
30 CallGraphPrinterPassBase& operator=(const CallGraphPrinterPassBase &) = delete;
31 CallGraphPrinterPassBase(CallGraphPrinterPassBase &&) = delete;
32 CallGraphPrinterPassBase& operator=(CallGraphPrinterPassBase &&) = delete;
33 ~CallGraphPrinterPassBase() = default;
34
36 static constexpr ::llvm::StringLiteral getArgumentName() {
37 return ::llvm::StringLiteral("llzk-print-call-graph");
38 }
39 ::llvm::StringRef getArgument() const override { return "llzk-print-call-graph"; }
40
41 ::llvm::StringRef getDescription() const override { return "Print the LLZK module's call graph."; }
42
44 static constexpr ::llvm::StringLiteral getPassName() {
45 return ::llvm::StringLiteral("CallGraphPrinterPass");
46 }
47 ::llvm::StringRef getName() const override { return "CallGraphPrinterPass"; }
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<llzk::undef::UndefDialect>();
73 registry.insert<mlir::arith::ArithDialect>();
74 registry.insert<mlir::scf::SCFDialect>();
75 }
76
80 MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(CallGraphPrinterPassBase<DerivedT>)
81
82protected:
83private:
84};
85} // namespace impl
86#undef GEN_PASS_DEF_CALLGRAPHPRINTERPASS
87#endif // GEN_PASS_DEF_CALLGRAPHPRINTERPASS
88
89//===----------------------------------------------------------------------===//
90// CallGraphSCCsPrinterPass
91//===----------------------------------------------------------------------===//
92#ifdef GEN_PASS_DECL_CALLGRAPHSCCSPRINTERPASS
93#undef GEN_PASS_DECL_CALLGRAPHSCCSPRINTERPASS
94#endif // GEN_PASS_DECL_CALLGRAPHSCCSPRINTERPASS
95#ifdef GEN_PASS_DEF_CALLGRAPHSCCSPRINTERPASS
96namespace impl {
97
98template <typename DerivedT>
99class CallGraphSCCsPrinterPassBase : public ::mlir::OperationPass<::mlir::ModuleOp> {
100public:
101 using Base = CallGraphSCCsPrinterPassBase;
102
103 CallGraphSCCsPrinterPassBase() : ::mlir::OperationPass<::mlir::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
104 CallGraphSCCsPrinterPassBase(const CallGraphSCCsPrinterPassBase &other) : ::mlir::OperationPass<::mlir::ModuleOp>(other) {}
105 CallGraphSCCsPrinterPassBase& operator=(const CallGraphSCCsPrinterPassBase &) = delete;
106 CallGraphSCCsPrinterPassBase(CallGraphSCCsPrinterPassBase &&) = delete;
107 CallGraphSCCsPrinterPassBase& operator=(CallGraphSCCsPrinterPassBase &&) = delete;
108 ~CallGraphSCCsPrinterPassBase() = default;
109
111 static constexpr ::llvm::StringLiteral getArgumentName() {
112 return ::llvm::StringLiteral("llzk-print-call-graph-sccs");
113 }
114 ::llvm::StringRef getArgument() const override { return "llzk-print-call-graph-sccs"; }
115
116 ::llvm::StringRef getDescription() const override { return "Print the SCCs from the LLZK module's call graph."; }
117
119 static constexpr ::llvm::StringLiteral getPassName() {
120 return ::llvm::StringLiteral("CallGraphSCCsPrinterPass");
121 }
122 ::llvm::StringRef getName() const override { return "CallGraphSCCsPrinterPass"; }
123
125 static bool classof(const ::mlir::Pass *pass) {
126 return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
127 }
128
130 std::unique_ptr<::mlir::Pass> clonePass() const override {
131 return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
132 }
133
135 void getDependentDialects(::mlir::DialectRegistry &registry) const override {
136 registry.insert<llzk::LLZKDialect>();
137 registry.insert<llzk::boolean::BoolDialect>();
138 registry.insert<llzk::array::ArrayDialect>();
139 registry.insert<llzk::component::StructDialect>();
140 registry.insert<llzk::constrain::ConstrainDialect>();
141 registry.insert<llzk::felt::FeltDialect>();
142 registry.insert<llzk::global::GlobalDialect>();
143 registry.insert<llzk::include::IncludeDialect>();
144 registry.insert<llzk::function::FunctionDialect>();
145 registry.insert<llzk::string::StringDialect>();
146 registry.insert<llzk::polymorphic::PolymorphicDialect>();
147 registry.insert<llzk::undef::UndefDialect>();
148 registry.insert<mlir::arith::ArithDialect>();
149 registry.insert<mlir::scf::SCFDialect>();
150 }
151
155 MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(CallGraphSCCsPrinterPassBase<DerivedT>)
156
157protected:
158private:
159};
160} // namespace impl
161#undef GEN_PASS_DEF_CALLGRAPHSCCSPRINTERPASS
162#endif // GEN_PASS_DEF_CALLGRAPHSCCSPRINTERPASS
163
164//===----------------------------------------------------------------------===//
165// ConstraintDependencyGraphPrinterPass
166//===----------------------------------------------------------------------===//
167#ifdef GEN_PASS_DECL_CONSTRAINTDEPENDENCYGRAPHPRINTERPASS
168struct ConstraintDependencyGraphPrinterPassOptions {
169 bool runIntraprocedural = false;
170};
171#undef GEN_PASS_DECL_CONSTRAINTDEPENDENCYGRAPHPRINTERPASS
172#endif // GEN_PASS_DECL_CONSTRAINTDEPENDENCYGRAPHPRINTERPASS
173#ifdef GEN_PASS_DEF_CONSTRAINTDEPENDENCYGRAPHPRINTERPASS
174namespace impl {
175
176template <typename DerivedT>
177class ConstraintDependencyGraphPrinterPassBase : public ::mlir::OperationPass<::mlir::ModuleOp> {
178public:
179 using Base = ConstraintDependencyGraphPrinterPassBase;
180
181 ConstraintDependencyGraphPrinterPassBase() : ::mlir::OperationPass<::mlir::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
182 ConstraintDependencyGraphPrinterPassBase(const ConstraintDependencyGraphPrinterPassBase &other) : ::mlir::OperationPass<::mlir::ModuleOp>(other) {}
183 ConstraintDependencyGraphPrinterPassBase& operator=(const ConstraintDependencyGraphPrinterPassBase &) = delete;
184 ConstraintDependencyGraphPrinterPassBase(ConstraintDependencyGraphPrinterPassBase &&) = delete;
185 ConstraintDependencyGraphPrinterPassBase& operator=(ConstraintDependencyGraphPrinterPassBase &&) = delete;
186 ~ConstraintDependencyGraphPrinterPassBase() = default;
187
189 static constexpr ::llvm::StringLiteral getArgumentName() {
190 return ::llvm::StringLiteral("llzk-print-constraint-dependency-graphs");
191 }
192 ::llvm::StringRef getArgument() const override { return "llzk-print-constraint-dependency-graphs"; }
193
194 ::llvm::StringRef getDescription() const override { return "Print constraint dependency graph for all LLZK structs."; }
195
197 static constexpr ::llvm::StringLiteral getPassName() {
198 return ::llvm::StringLiteral("ConstraintDependencyGraphPrinterPass");
199 }
200 ::llvm::StringRef getName() const override { return "ConstraintDependencyGraphPrinterPass"; }
201
203 static bool classof(const ::mlir::Pass *pass) {
204 return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
205 }
206
208 std::unique_ptr<::mlir::Pass> clonePass() const override {
209 return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
210 }
211
213 void getDependentDialects(::mlir::DialectRegistry &registry) const override {
214 registry.insert<llzk::LLZKDialect>();
215 registry.insert<llzk::boolean::BoolDialect>();
216 registry.insert<llzk::array::ArrayDialect>();
217 registry.insert<llzk::component::StructDialect>();
218 registry.insert<llzk::constrain::ConstrainDialect>();
219 registry.insert<llzk::felt::FeltDialect>();
220 registry.insert<llzk::global::GlobalDialect>();
221 registry.insert<llzk::include::IncludeDialect>();
222 registry.insert<llzk::function::FunctionDialect>();
223 registry.insert<llzk::string::StringDialect>();
224 registry.insert<llzk::polymorphic::PolymorphicDialect>();
225 registry.insert<llzk::undef::UndefDialect>();
226 registry.insert<mlir::arith::ArithDialect>();
227 registry.insert<mlir::scf::SCFDialect>();
228 }
229
233 MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConstraintDependencyGraphPrinterPassBase<DerivedT>)
234
235 ConstraintDependencyGraphPrinterPassBase(ConstraintDependencyGraphPrinterPassOptions options) : ConstraintDependencyGraphPrinterPassBase() {
236 runIntraprocedural = std::move(options.runIntraprocedural);
237 }
238protected:
239 ::mlir::Pass::Option<bool> runIntraprocedural{*this, "intraprocedural", ::llvm::cl::desc("Whether to run the analysis intra-procedurally only (default is false)."), ::llvm::cl::init(false)};
240private:
241};
242} // namespace impl
243#undef GEN_PASS_DEF_CONSTRAINTDEPENDENCYGRAPHPRINTERPASS
244#endif // GEN_PASS_DEF_CONSTRAINTDEPENDENCYGRAPHPRINTERPASS
245
246//===----------------------------------------------------------------------===//
247// IntervalAnalysisPrinterPass
248//===----------------------------------------------------------------------===//
249#ifdef GEN_PASS_DECL_INTERVALANALYSISPRINTERPASS
250struct IntervalAnalysisPrinterPassOptions {
251 std::string fieldName = "bn128";
252 bool propagateInputConstraints = false;
253 bool printSolverConstraints = false;
254 bool printComputeIntervals = false;
255};
256#undef GEN_PASS_DECL_INTERVALANALYSISPRINTERPASS
257#endif // GEN_PASS_DECL_INTERVALANALYSISPRINTERPASS
258#ifdef GEN_PASS_DEF_INTERVALANALYSISPRINTERPASS
259namespace impl {
260
261template <typename DerivedT>
262class IntervalAnalysisPrinterPassBase : public ::mlir::OperationPass<::mlir::ModuleOp> {
263public:
264 using Base = IntervalAnalysisPrinterPassBase;
265
266 IntervalAnalysisPrinterPassBase() : ::mlir::OperationPass<::mlir::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
267 IntervalAnalysisPrinterPassBase(const IntervalAnalysisPrinterPassBase &other) : ::mlir::OperationPass<::mlir::ModuleOp>(other) {}
268 IntervalAnalysisPrinterPassBase& operator=(const IntervalAnalysisPrinterPassBase &) = delete;
269 IntervalAnalysisPrinterPassBase(IntervalAnalysisPrinterPassBase &&) = delete;
270 IntervalAnalysisPrinterPassBase& operator=(IntervalAnalysisPrinterPassBase &&) = delete;
271 ~IntervalAnalysisPrinterPassBase() = default;
272
274 static constexpr ::llvm::StringLiteral getArgumentName() {
275 return ::llvm::StringLiteral("llzk-print-interval-analysis");
276 }
277 ::llvm::StringRef getArgument() const override { return "llzk-print-interval-analysis"; }
278
279 ::llvm::StringRef getDescription() const override { return "Print interval analysis results for all LLZK structs."; }
280
282 static constexpr ::llvm::StringLiteral getPassName() {
283 return ::llvm::StringLiteral("IntervalAnalysisPrinterPass");
284 }
285 ::llvm::StringRef getName() const override { return "IntervalAnalysisPrinterPass"; }
286
288 static bool classof(const ::mlir::Pass *pass) {
289 return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
290 }
291
293 std::unique_ptr<::mlir::Pass> clonePass() const override {
294 return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
295 }
296
298 void getDependentDialects(::mlir::DialectRegistry &registry) const override {
299 registry.insert<llzk::LLZKDialect>();
300 registry.insert<llzk::boolean::BoolDialect>();
301 registry.insert<llzk::array::ArrayDialect>();
302 registry.insert<llzk::component::StructDialect>();
303 registry.insert<llzk::constrain::ConstrainDialect>();
304 registry.insert<llzk::felt::FeltDialect>();
305 registry.insert<llzk::global::GlobalDialect>();
306 registry.insert<llzk::include::IncludeDialect>();
307 registry.insert<llzk::function::FunctionDialect>();
308 registry.insert<llzk::string::StringDialect>();
309 registry.insert<llzk::polymorphic::PolymorphicDialect>();
310 registry.insert<llzk::undef::UndefDialect>();
311 registry.insert<mlir::arith::ArithDialect>();
312 registry.insert<mlir::scf::SCFDialect>();
313 }
314
318 MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(IntervalAnalysisPrinterPassBase<DerivedT>)
319
320 IntervalAnalysisPrinterPassBase(IntervalAnalysisPrinterPassOptions options) : IntervalAnalysisPrinterPassBase() {
321 fieldName = std::move(options.fieldName);
322 propagateInputConstraints = std::move(options.propagateInputConstraints);
323 printSolverConstraints = std::move(options.printSolverConstraints);
324 printComputeIntervals = std::move(options.printComputeIntervals);
325 }
326protected:
327 ::mlir::Pass::Option<std::string> fieldName{*this, "field", ::llvm::cl::desc("The field to use for interval analysis. Supported fields: bn128/bn254, babybear, goldilocks, mersenne31"), ::llvm::cl::init("bn128")};
328 ::mlir::Pass::Option<bool> propagateInputConstraints{*this, "propagate-input-constraints", ::llvm::cl::desc("Whether to propagate constraints on inputs from @constrain to @compute functions. This allows for tighter intervals to possibly be found for computed values, assuming that the witness generator would include constraints as assertions during the computation."), ::llvm::cl::init(false)};
329 ::mlir::Pass::Option<bool> printSolverConstraints{*this, "print-solver-constraints", ::llvm::cl::desc("Whether to output SMT solver constraints along with intervals."), ::llvm::cl::init(false)};
330 ::mlir::Pass::Option<bool> printComputeIntervals{*this, "print-compute-intervals", ::llvm::cl::desc("Whether to print compute function intervals (default only prints constrain function intervals)."), ::llvm::cl::init(false)};
331private:
332};
333} // namespace impl
334#undef GEN_PASS_DEF_INTERVALANALYSISPRINTERPASS
335#endif // GEN_PASS_DEF_INTERVALANALYSISPRINTERPASS
336
337//===----------------------------------------------------------------------===//
338// SymbolDefTreePrinterPass
339//===----------------------------------------------------------------------===//
340#ifdef GEN_PASS_DECL_SYMBOLDEFTREEPRINTERPASS
341struct SymbolDefTreePrinterPassOptions {
343 bool saveDotGraph = false;
344};
345#undef GEN_PASS_DECL_SYMBOLDEFTREEPRINTERPASS
346#endif // GEN_PASS_DECL_SYMBOLDEFTREEPRINTERPASS
347#ifdef GEN_PASS_DEF_SYMBOLDEFTREEPRINTERPASS
348namespace impl {
349
350template <typename DerivedT>
351class SymbolDefTreePrinterPassBase : public ::mlir::OperationPass<::mlir::ModuleOp> {
352public:
353 using Base = SymbolDefTreePrinterPassBase;
354
355 SymbolDefTreePrinterPassBase() : ::mlir::OperationPass<::mlir::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
356 SymbolDefTreePrinterPassBase(const SymbolDefTreePrinterPassBase &other) : ::mlir::OperationPass<::mlir::ModuleOp>(other) {}
357 SymbolDefTreePrinterPassBase& operator=(const SymbolDefTreePrinterPassBase &) = delete;
358 SymbolDefTreePrinterPassBase(SymbolDefTreePrinterPassBase &&) = delete;
359 SymbolDefTreePrinterPassBase& operator=(SymbolDefTreePrinterPassBase &&) = delete;
360 ~SymbolDefTreePrinterPassBase() = default;
361
363 static constexpr ::llvm::StringLiteral getArgumentName() {
364 return ::llvm::StringLiteral("llzk-print-symbol-def-tree");
365 }
366 ::llvm::StringRef getArgument() const override { return "llzk-print-symbol-def-tree"; }
367
368 ::llvm::StringRef getDescription() const override { return "Print symbol definition tree."; }
369
371 static constexpr ::llvm::StringLiteral getPassName() {
372 return ::llvm::StringLiteral("SymbolDefTreePrinterPass");
373 }
374 ::llvm::StringRef getName() const override { return "SymbolDefTreePrinterPass"; }
375
377 static bool classof(const ::mlir::Pass *pass) {
378 return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
379 }
380
382 std::unique_ptr<::mlir::Pass> clonePass() const override {
383 return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
384 }
385
387 void getDependentDialects(::mlir::DialectRegistry &registry) const override {
388 registry.insert<llzk::LLZKDialect>();
389 registry.insert<llzk::boolean::BoolDialect>();
390 registry.insert<llzk::array::ArrayDialect>();
391 registry.insert<llzk::component::StructDialect>();
392 registry.insert<llzk::constrain::ConstrainDialect>();
393 registry.insert<llzk::felt::FeltDialect>();
394 registry.insert<llzk::global::GlobalDialect>();
395 registry.insert<llzk::include::IncludeDialect>();
396 registry.insert<llzk::function::FunctionDialect>();
397 registry.insert<llzk::string::StringDialect>();
398 registry.insert<llzk::polymorphic::PolymorphicDialect>();
399 registry.insert<llzk::undef::UndefDialect>();
400 registry.insert<mlir::arith::ArithDialect>();
401 registry.insert<mlir::scf::SCFDialect>();
402 }
403
407 MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(SymbolDefTreePrinterPassBase<DerivedT>)
408
409 SymbolDefTreePrinterPassBase(SymbolDefTreePrinterPassOptions options) : SymbolDefTreePrinterPassBase() {
410 outputStream = std::move(options.outputStream);
411 saveDotGraph = std::move(options.saveDotGraph);
412 }
413protected:
414 ::mlir::Pass::Option<::llzk::OutputStream> outputStream{*this, "stream", ::llvm::cl::desc("Specifies the stream to which the pass prints."), ::llvm::cl::init(::llzk::OutputStream::Errs), ::llvm::cl::values(
416 "Print pass output to 'llvm::outs()'"),
418 "Print pass output to 'llvm::errs()'"),
420 "Print pass output to 'llvm::dbgs()'")
421 )};
422 ::mlir::Pass::Option<bool> saveDotGraph{*this, "saveDot", ::llvm::cl::desc("Whether to dump the graph to DOT format."), ::llvm::cl::init(false)};
423private:
424};
425} // namespace impl
426#undef GEN_PASS_DEF_SYMBOLDEFTREEPRINTERPASS
427#endif // GEN_PASS_DEF_SYMBOLDEFTREEPRINTERPASS
428
429//===----------------------------------------------------------------------===//
430// SymbolUseGraphPrinterPass
431//===----------------------------------------------------------------------===//
432#ifdef GEN_PASS_DECL_SYMBOLUSEGRAPHPRINTERPASS
433struct SymbolUseGraphPrinterPassOptions {
435 bool saveDotGraph = false;
436};
437#undef GEN_PASS_DECL_SYMBOLUSEGRAPHPRINTERPASS
438#endif // GEN_PASS_DECL_SYMBOLUSEGRAPHPRINTERPASS
439#ifdef GEN_PASS_DEF_SYMBOLUSEGRAPHPRINTERPASS
440namespace impl {
441
442template <typename DerivedT>
443class SymbolUseGraphPrinterPassBase : public ::mlir::OperationPass<::mlir::ModuleOp> {
444public:
445 using Base = SymbolUseGraphPrinterPassBase;
446
447 SymbolUseGraphPrinterPassBase() : ::mlir::OperationPass<::mlir::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
448 SymbolUseGraphPrinterPassBase(const SymbolUseGraphPrinterPassBase &other) : ::mlir::OperationPass<::mlir::ModuleOp>(other) {}
449 SymbolUseGraphPrinterPassBase& operator=(const SymbolUseGraphPrinterPassBase &) = delete;
450 SymbolUseGraphPrinterPassBase(SymbolUseGraphPrinterPassBase &&) = delete;
451 SymbolUseGraphPrinterPassBase& operator=(SymbolUseGraphPrinterPassBase &&) = delete;
452 ~SymbolUseGraphPrinterPassBase() = default;
453
455 static constexpr ::llvm::StringLiteral getArgumentName() {
456 return ::llvm::StringLiteral("llzk-print-symbol-use-graph");
457 }
458 ::llvm::StringRef getArgument() const override { return "llzk-print-symbol-use-graph"; }
459
460 ::llvm::StringRef getDescription() const override { return "Print symbol use graph."; }
461
463 static constexpr ::llvm::StringLiteral getPassName() {
464 return ::llvm::StringLiteral("SymbolUseGraphPrinterPass");
465 }
466 ::llvm::StringRef getName() const override { return "SymbolUseGraphPrinterPass"; }
467
469 static bool classof(const ::mlir::Pass *pass) {
470 return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
471 }
472
474 std::unique_ptr<::mlir::Pass> clonePass() const override {
475 return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
476 }
477
479 void getDependentDialects(::mlir::DialectRegistry &registry) const override {
480 registry.insert<llzk::LLZKDialect>();
481 registry.insert<llzk::boolean::BoolDialect>();
482 registry.insert<llzk::array::ArrayDialect>();
483 registry.insert<llzk::component::StructDialect>();
484 registry.insert<llzk::constrain::ConstrainDialect>();
485 registry.insert<llzk::felt::FeltDialect>();
486 registry.insert<llzk::global::GlobalDialect>();
487 registry.insert<llzk::include::IncludeDialect>();
488 registry.insert<llzk::function::FunctionDialect>();
489 registry.insert<llzk::string::StringDialect>();
490 registry.insert<llzk::polymorphic::PolymorphicDialect>();
491 registry.insert<llzk::undef::UndefDialect>();
492 registry.insert<mlir::arith::ArithDialect>();
493 registry.insert<mlir::scf::SCFDialect>();
494 }
495
499 MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(SymbolUseGraphPrinterPassBase<DerivedT>)
500
501 SymbolUseGraphPrinterPassBase(SymbolUseGraphPrinterPassOptions options) : SymbolUseGraphPrinterPassBase() {
502 outputStream = std::move(options.outputStream);
503 saveDotGraph = std::move(options.saveDotGraph);
504 }
505protected:
506 ::mlir::Pass::Option<::llzk::OutputStream> outputStream{*this, "stream", ::llvm::cl::desc("Specifies the stream to which the pass prints."), ::llvm::cl::init(::llzk::OutputStream::Errs), ::llvm::cl::values(
508 "Print pass output to 'llvm::outs()'"),
510 "Print pass output to 'llvm::errs()'"),
512 "Print pass output to 'llvm::dbgs()'")
513 )};
514 ::mlir::Pass::Option<bool> saveDotGraph{*this, "saveDot", ::llvm::cl::desc("Whether to dump the graph to DOT format."), ::llvm::cl::init(false)};
515private:
516};
517} // namespace impl
518#undef GEN_PASS_DEF_SYMBOLUSEGRAPHPRINTERPASS
519#endif // GEN_PASS_DEF_SYMBOLUSEGRAPHPRINTERPASS
520#ifdef GEN_PASS_REGISTRATION
521
522//===----------------------------------------------------------------------===//
523// CallGraphPrinterPass Registration
524//===----------------------------------------------------------------------===//
525
526inline void registerCallGraphPrinterPass() {
527 ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
528 return llzk::createCallGraphPrinterPass(llvm::errs());
529 });
530}
531
532// Old registration code, kept for temporary backwards compatibility.
534 ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
535 return llzk::createCallGraphPrinterPass(llvm::errs());
536 });
537}
538
539//===----------------------------------------------------------------------===//
540// CallGraphSCCsPrinterPass Registration
541//===----------------------------------------------------------------------===//
542
544 ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
545 return llzk::createCallGraphSCCsPrinterPass(llvm::errs());
546 });
547}
548
549// Old registration code, kept for temporary backwards compatibility.
551 ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
552 return llzk::createCallGraphSCCsPrinterPass(llvm::errs());
553 });
554}
555
556//===----------------------------------------------------------------------===//
557// ConstraintDependencyGraphPrinterPass Registration
558//===----------------------------------------------------------------------===//
559
561 ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
563 });
564}
565
566// Old registration code, kept for temporary backwards compatibility.
568 ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
570 });
571}
572
573//===----------------------------------------------------------------------===//
574// IntervalAnalysisPrinterPass Registration
575//===----------------------------------------------------------------------===//
576
578 ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
579 return llzk::createIntervalAnalysisPrinterPass(llvm::errs());
580 });
581}
582
583// Old registration code, kept for temporary backwards compatibility.
585 ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
586 return llzk::createIntervalAnalysisPrinterPass(llvm::errs());
587 });
588}
589
590//===----------------------------------------------------------------------===//
591// SymbolDefTreePrinterPass Registration
592//===----------------------------------------------------------------------===//
593
595 ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
597 });
598}
599
600// Old registration code, kept for temporary backwards compatibility.
602 ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
604 });
605}
606
607//===----------------------------------------------------------------------===//
608// SymbolUseGraphPrinterPass Registration
609//===----------------------------------------------------------------------===//
610
612 ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
614 });
615}
616
617// Old registration code, kept for temporary backwards compatibility.
619 ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
621 });
622}
623
624//===----------------------------------------------------------------------===//
625// Analysis Registration
626//===----------------------------------------------------------------------===//
627
628inline void registerAnalysisPasses() {
635}
636#undef GEN_PASS_REGISTRATION
637#endif // GEN_PASS_REGISTRATION
638// Deprecated. Please use the new per-pass macros.
639#ifdef GEN_PASS_CLASSES
640
641template <typename DerivedT>
642class CallGraphPrinterPassBase : public ::mlir::OperationPass<::mlir::ModuleOp> {
643public:
644 using Base = CallGraphPrinterPassBase;
645
646 CallGraphPrinterPassBase() : ::mlir::OperationPass<::mlir::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
647 CallGraphPrinterPassBase(const CallGraphPrinterPassBase &other) : ::mlir::OperationPass<::mlir::ModuleOp>(other) {}
648 CallGraphPrinterPassBase& operator=(const CallGraphPrinterPassBase &) = delete;
649 CallGraphPrinterPassBase(CallGraphPrinterPassBase &&) = delete;
650 CallGraphPrinterPassBase& operator=(CallGraphPrinterPassBase &&) = delete;
651 ~CallGraphPrinterPassBase() = default;
652
654 static constexpr ::llvm::StringLiteral getArgumentName() {
655 return ::llvm::StringLiteral("llzk-print-call-graph");
656 }
657 ::llvm::StringRef getArgument() const override { return "llzk-print-call-graph"; }
658
659 ::llvm::StringRef getDescription() const override { return "Print the LLZK module's call graph."; }
660
662 static constexpr ::llvm::StringLiteral getPassName() {
663 return ::llvm::StringLiteral("CallGraphPrinterPass");
664 }
665 ::llvm::StringRef getName() const override { return "CallGraphPrinterPass"; }
666
668 static bool classof(const ::mlir::Pass *pass) {
669 return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
670 }
671
673 std::unique_ptr<::mlir::Pass> clonePass() const override {
674 return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
675 }
676
678 void getDependentDialects(::mlir::DialectRegistry &registry) const override {
679 registry.insert<llzk::LLZKDialect>();
680 registry.insert<llzk::boolean::BoolDialect>();
681 registry.insert<llzk::array::ArrayDialect>();
682 registry.insert<llzk::component::StructDialect>();
683 registry.insert<llzk::constrain::ConstrainDialect>();
684 registry.insert<llzk::felt::FeltDialect>();
685 registry.insert<llzk::global::GlobalDialect>();
686 registry.insert<llzk::include::IncludeDialect>();
687 registry.insert<llzk::function::FunctionDialect>();
688 registry.insert<llzk::string::StringDialect>();
689 registry.insert<llzk::polymorphic::PolymorphicDialect>();
690 registry.insert<llzk::undef::UndefDialect>();
691 registry.insert<mlir::arith::ArithDialect>();
692 registry.insert<mlir::scf::SCFDialect>();
693 }
694
698 MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(CallGraphPrinterPassBase<DerivedT>)
699
700protected:
701};
702
703template <typename DerivedT>
704class CallGraphSCCsPrinterPassBase : public ::mlir::OperationPass<::mlir::ModuleOp> {
705public:
706 using Base = CallGraphSCCsPrinterPassBase;
707
708 CallGraphSCCsPrinterPassBase() : ::mlir::OperationPass<::mlir::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
709 CallGraphSCCsPrinterPassBase(const CallGraphSCCsPrinterPassBase &other) : ::mlir::OperationPass<::mlir::ModuleOp>(other) {}
710 CallGraphSCCsPrinterPassBase& operator=(const CallGraphSCCsPrinterPassBase &) = delete;
711 CallGraphSCCsPrinterPassBase(CallGraphSCCsPrinterPassBase &&) = delete;
712 CallGraphSCCsPrinterPassBase& operator=(CallGraphSCCsPrinterPassBase &&) = delete;
713 ~CallGraphSCCsPrinterPassBase() = default;
714
716 static constexpr ::llvm::StringLiteral getArgumentName() {
717 return ::llvm::StringLiteral("llzk-print-call-graph-sccs");
718 }
719 ::llvm::StringRef getArgument() const override { return "llzk-print-call-graph-sccs"; }
720
721 ::llvm::StringRef getDescription() const override { return "Print the SCCs from the LLZK module's call graph."; }
722
724 static constexpr ::llvm::StringLiteral getPassName() {
725 return ::llvm::StringLiteral("CallGraphSCCsPrinterPass");
726 }
727 ::llvm::StringRef getName() const override { return "CallGraphSCCsPrinterPass"; }
728
730 static bool classof(const ::mlir::Pass *pass) {
731 return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
732 }
733
735 std::unique_ptr<::mlir::Pass> clonePass() const override {
736 return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
737 }
738
740 void getDependentDialects(::mlir::DialectRegistry &registry) const override {
741 registry.insert<llzk::LLZKDialect>();
742 registry.insert<llzk::boolean::BoolDialect>();
743 registry.insert<llzk::array::ArrayDialect>();
744 registry.insert<llzk::component::StructDialect>();
745 registry.insert<llzk::constrain::ConstrainDialect>();
746 registry.insert<llzk::felt::FeltDialect>();
747 registry.insert<llzk::global::GlobalDialect>();
748 registry.insert<llzk::include::IncludeDialect>();
749 registry.insert<llzk::function::FunctionDialect>();
750 registry.insert<llzk::string::StringDialect>();
751 registry.insert<llzk::polymorphic::PolymorphicDialect>();
752 registry.insert<llzk::undef::UndefDialect>();
753 registry.insert<mlir::arith::ArithDialect>();
754 registry.insert<mlir::scf::SCFDialect>();
755 }
756
760 MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(CallGraphSCCsPrinterPassBase<DerivedT>)
761
762protected:
763};
764
765template <typename DerivedT>
766class ConstraintDependencyGraphPrinterPassBase : public ::mlir::OperationPass<::mlir::ModuleOp> {
767public:
768 using Base = ConstraintDependencyGraphPrinterPassBase;
769
770 ConstraintDependencyGraphPrinterPassBase() : ::mlir::OperationPass<::mlir::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
771 ConstraintDependencyGraphPrinterPassBase(const ConstraintDependencyGraphPrinterPassBase &other) : ::mlir::OperationPass<::mlir::ModuleOp>(other) {}
772 ConstraintDependencyGraphPrinterPassBase& operator=(const ConstraintDependencyGraphPrinterPassBase &) = delete;
773 ConstraintDependencyGraphPrinterPassBase(ConstraintDependencyGraphPrinterPassBase &&) = delete;
774 ConstraintDependencyGraphPrinterPassBase& operator=(ConstraintDependencyGraphPrinterPassBase &&) = delete;
775 ~ConstraintDependencyGraphPrinterPassBase() = default;
776
778 static constexpr ::llvm::StringLiteral getArgumentName() {
779 return ::llvm::StringLiteral("llzk-print-constraint-dependency-graphs");
780 }
781 ::llvm::StringRef getArgument() const override { return "llzk-print-constraint-dependency-graphs"; }
782
783 ::llvm::StringRef getDescription() const override { return "Print constraint dependency graph for all LLZK structs."; }
784
786 static constexpr ::llvm::StringLiteral getPassName() {
787 return ::llvm::StringLiteral("ConstraintDependencyGraphPrinterPass");
788 }
789 ::llvm::StringRef getName() const override { return "ConstraintDependencyGraphPrinterPass"; }
790
792 static bool classof(const ::mlir::Pass *pass) {
793 return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
794 }
795
797 std::unique_ptr<::mlir::Pass> clonePass() const override {
798 return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
799 }
800
802 void getDependentDialects(::mlir::DialectRegistry &registry) const override {
803 registry.insert<llzk::LLZKDialect>();
804 registry.insert<llzk::boolean::BoolDialect>();
805 registry.insert<llzk::array::ArrayDialect>();
806 registry.insert<llzk::component::StructDialect>();
807 registry.insert<llzk::constrain::ConstrainDialect>();
808 registry.insert<llzk::felt::FeltDialect>();
809 registry.insert<llzk::global::GlobalDialect>();
810 registry.insert<llzk::include::IncludeDialect>();
811 registry.insert<llzk::function::FunctionDialect>();
812 registry.insert<llzk::string::StringDialect>();
813 registry.insert<llzk::polymorphic::PolymorphicDialect>();
814 registry.insert<llzk::undef::UndefDialect>();
815 registry.insert<mlir::arith::ArithDialect>();
816 registry.insert<mlir::scf::SCFDialect>();
817 }
818
822 MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConstraintDependencyGraphPrinterPassBase<DerivedT>)
823
824protected:
825 ::mlir::Pass::Option<bool> runIntraprocedural{*this, "intraprocedural", ::llvm::cl::desc("Whether to run the analysis intra-procedurally only (default is false)."), ::llvm::cl::init(false)};
826};
827
828template <typename DerivedT>
829class IntervalAnalysisPrinterPassBase : public ::mlir::OperationPass<::mlir::ModuleOp> {
830public:
831 using Base = IntervalAnalysisPrinterPassBase;
832
833 IntervalAnalysisPrinterPassBase() : ::mlir::OperationPass<::mlir::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
834 IntervalAnalysisPrinterPassBase(const IntervalAnalysisPrinterPassBase &other) : ::mlir::OperationPass<::mlir::ModuleOp>(other) {}
835 IntervalAnalysisPrinterPassBase& operator=(const IntervalAnalysisPrinterPassBase &) = delete;
836 IntervalAnalysisPrinterPassBase(IntervalAnalysisPrinterPassBase &&) = delete;
837 IntervalAnalysisPrinterPassBase& operator=(IntervalAnalysisPrinterPassBase &&) = delete;
838 ~IntervalAnalysisPrinterPassBase() = default;
839
841 static constexpr ::llvm::StringLiteral getArgumentName() {
842 return ::llvm::StringLiteral("llzk-print-interval-analysis");
843 }
844 ::llvm::StringRef getArgument() const override { return "llzk-print-interval-analysis"; }
845
846 ::llvm::StringRef getDescription() const override { return "Print interval analysis results for all LLZK structs."; }
847
849 static constexpr ::llvm::StringLiteral getPassName() {
850 return ::llvm::StringLiteral("IntervalAnalysisPrinterPass");
851 }
852 ::llvm::StringRef getName() const override { return "IntervalAnalysisPrinterPass"; }
853
855 static bool classof(const ::mlir::Pass *pass) {
856 return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
857 }
858
860 std::unique_ptr<::mlir::Pass> clonePass() const override {
861 return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
862 }
863
865 void getDependentDialects(::mlir::DialectRegistry &registry) const override {
866 registry.insert<llzk::LLZKDialect>();
867 registry.insert<llzk::boolean::BoolDialect>();
868 registry.insert<llzk::array::ArrayDialect>();
869 registry.insert<llzk::component::StructDialect>();
870 registry.insert<llzk::constrain::ConstrainDialect>();
871 registry.insert<llzk::felt::FeltDialect>();
872 registry.insert<llzk::global::GlobalDialect>();
873 registry.insert<llzk::include::IncludeDialect>();
874 registry.insert<llzk::function::FunctionDialect>();
875 registry.insert<llzk::string::StringDialect>();
876 registry.insert<llzk::polymorphic::PolymorphicDialect>();
877 registry.insert<llzk::undef::UndefDialect>();
878 registry.insert<mlir::arith::ArithDialect>();
879 registry.insert<mlir::scf::SCFDialect>();
880 }
881
885 MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(IntervalAnalysisPrinterPassBase<DerivedT>)
886
887protected:
888 ::mlir::Pass::Option<std::string> fieldName{*this, "field", ::llvm::cl::desc("The field to use for interval analysis. Supported fields: bn128/bn254, babybear, goldilocks, mersenne31"), ::llvm::cl::init("bn128")};
889 ::mlir::Pass::Option<bool> propagateInputConstraints{*this, "propagate-input-constraints", ::llvm::cl::desc("Whether to propagate constraints on inputs from @constrain to @compute functions. This allows for tighter intervals to possibly be found for computed values, assuming that the witness generator would include constraints as assertions during the computation."), ::llvm::cl::init(false)};
890 ::mlir::Pass::Option<bool> printSolverConstraints{*this, "print-solver-constraints", ::llvm::cl::desc("Whether to output SMT solver constraints along with intervals."), ::llvm::cl::init(false)};
891 ::mlir::Pass::Option<bool> printComputeIntervals{*this, "print-compute-intervals", ::llvm::cl::desc("Whether to print compute function intervals (default only prints constrain function intervals)."), ::llvm::cl::init(false)};
892};
893
894template <typename DerivedT>
895class SymbolDefTreePrinterPassBase : public ::mlir::OperationPass<::mlir::ModuleOp> {
896public:
897 using Base = SymbolDefTreePrinterPassBase;
898
899 SymbolDefTreePrinterPassBase() : ::mlir::OperationPass<::mlir::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
900 SymbolDefTreePrinterPassBase(const SymbolDefTreePrinterPassBase &other) : ::mlir::OperationPass<::mlir::ModuleOp>(other) {}
901 SymbolDefTreePrinterPassBase& operator=(const SymbolDefTreePrinterPassBase &) = delete;
902 SymbolDefTreePrinterPassBase(SymbolDefTreePrinterPassBase &&) = delete;
903 SymbolDefTreePrinterPassBase& operator=(SymbolDefTreePrinterPassBase &&) = delete;
904 ~SymbolDefTreePrinterPassBase() = default;
905
907 static constexpr ::llvm::StringLiteral getArgumentName() {
908 return ::llvm::StringLiteral("llzk-print-symbol-def-tree");
909 }
910 ::llvm::StringRef getArgument() const override { return "llzk-print-symbol-def-tree"; }
911
912 ::llvm::StringRef getDescription() const override { return "Print symbol definition tree."; }
913
915 static constexpr ::llvm::StringLiteral getPassName() {
916 return ::llvm::StringLiteral("SymbolDefTreePrinterPass");
917 }
918 ::llvm::StringRef getName() const override { return "SymbolDefTreePrinterPass"; }
919
921 static bool classof(const ::mlir::Pass *pass) {
922 return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
923 }
924
926 std::unique_ptr<::mlir::Pass> clonePass() const override {
927 return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
928 }
929
931 void getDependentDialects(::mlir::DialectRegistry &registry) const override {
932 registry.insert<llzk::LLZKDialect>();
933 registry.insert<llzk::boolean::BoolDialect>();
934 registry.insert<llzk::array::ArrayDialect>();
935 registry.insert<llzk::component::StructDialect>();
936 registry.insert<llzk::constrain::ConstrainDialect>();
937 registry.insert<llzk::felt::FeltDialect>();
938 registry.insert<llzk::global::GlobalDialect>();
939 registry.insert<llzk::include::IncludeDialect>();
940 registry.insert<llzk::function::FunctionDialect>();
941 registry.insert<llzk::string::StringDialect>();
942 registry.insert<llzk::polymorphic::PolymorphicDialect>();
943 registry.insert<llzk::undef::UndefDialect>();
944 registry.insert<mlir::arith::ArithDialect>();
945 registry.insert<mlir::scf::SCFDialect>();
946 }
947
951 MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(SymbolDefTreePrinterPassBase<DerivedT>)
952
953protected:
954 ::mlir::Pass::Option<::llzk::OutputStream> outputStream{*this, "stream", ::llvm::cl::desc("Specifies the stream to which the pass prints."), ::llvm::cl::init(::llzk::OutputStream::Errs), ::llvm::cl::values(
956 "Print pass output to 'llvm::outs()'"),
958 "Print pass output to 'llvm::errs()'"),
960 "Print pass output to 'llvm::dbgs()'")
961 )};
962 ::mlir::Pass::Option<bool> saveDotGraph{*this, "saveDot", ::llvm::cl::desc("Whether to dump the graph to DOT format."), ::llvm::cl::init(false)};
963};
964
965template <typename DerivedT>
966class SymbolUseGraphPrinterPassBase : public ::mlir::OperationPass<::mlir::ModuleOp> {
967public:
968 using Base = SymbolUseGraphPrinterPassBase;
969
970 SymbolUseGraphPrinterPassBase() : ::mlir::OperationPass<::mlir::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
971 SymbolUseGraphPrinterPassBase(const SymbolUseGraphPrinterPassBase &other) : ::mlir::OperationPass<::mlir::ModuleOp>(other) {}
972 SymbolUseGraphPrinterPassBase& operator=(const SymbolUseGraphPrinterPassBase &) = delete;
973 SymbolUseGraphPrinterPassBase(SymbolUseGraphPrinterPassBase &&) = delete;
974 SymbolUseGraphPrinterPassBase& operator=(SymbolUseGraphPrinterPassBase &&) = delete;
975 ~SymbolUseGraphPrinterPassBase() = default;
976
978 static constexpr ::llvm::StringLiteral getArgumentName() {
979 return ::llvm::StringLiteral("llzk-print-symbol-use-graph");
980 }
981 ::llvm::StringRef getArgument() const override { return "llzk-print-symbol-use-graph"; }
982
983 ::llvm::StringRef getDescription() const override { return "Print symbol use graph."; }
984
986 static constexpr ::llvm::StringLiteral getPassName() {
987 return ::llvm::StringLiteral("SymbolUseGraphPrinterPass");
988 }
989 ::llvm::StringRef getName() const override { return "SymbolUseGraphPrinterPass"; }
990
992 static bool classof(const ::mlir::Pass *pass) {
993 return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
994 }
995
997 std::unique_ptr<::mlir::Pass> clonePass() const override {
998 return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
999 }
1000
1002 void getDependentDialects(::mlir::DialectRegistry &registry) const override {
1003 registry.insert<llzk::LLZKDialect>();
1004 registry.insert<llzk::boolean::BoolDialect>();
1005 registry.insert<llzk::array::ArrayDialect>();
1006 registry.insert<llzk::component::StructDialect>();
1007 registry.insert<llzk::constrain::ConstrainDialect>();
1008 registry.insert<llzk::felt::FeltDialect>();
1009 registry.insert<llzk::global::GlobalDialect>();
1010 registry.insert<llzk::include::IncludeDialect>();
1011 registry.insert<llzk::function::FunctionDialect>();
1012 registry.insert<llzk::string::StringDialect>();
1013 registry.insert<llzk::polymorphic::PolymorphicDialect>();
1014 registry.insert<llzk::undef::UndefDialect>();
1015 registry.insert<mlir::arith::ArithDialect>();
1016 registry.insert<mlir::scf::SCFDialect>();
1017 }
1018
1022 MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(SymbolUseGraphPrinterPassBase<DerivedT>)
1023
1024protected:
1025 ::mlir::Pass::Option<::llzk::OutputStream> outputStream{*this, "stream", ::llvm::cl::desc("Specifies the stream to which the pass prints."), ::llvm::cl::init(::llzk::OutputStream::Errs), ::llvm::cl::values(
1027 "Print pass output to 'llvm::outs()'"),
1029 "Print pass output to 'llvm::errs()'"),
1031 "Print pass output to 'llvm::dbgs()'")
1032 )};
1033 ::mlir::Pass::Option<bool> saveDotGraph{*this, "saveDot", ::llvm::cl::desc("Whether to dump the graph to DOT format."), ::llvm::cl::init(false)};
1034};
1035#undef GEN_PASS_CLASSES
1036#endif // GEN_PASS_CLASSES
void registerIntervalAnalysisPrinterPassPass()
void registerSymbolDefTreePrinterPassPass()
void registerIntervalAnalysisPrinterPass()
std::unique_ptr< mlir::Pass > createSymbolUseGraphPrinterPass()
void registerSymbolUseGraphPrinterPassPass()
std::unique_ptr< mlir::Pass > createConstraintDependencyGraphPrinterPass(llvm::raw_ostream &os=llvm::errs())
std::unique_ptr< mlir::Pass > createIntervalAnalysisPrinterPass(llvm::raw_ostream &os=llvm::errs())
void registerCallGraphPrinterPass()
void registerConstraintDependencyGraphPrinterPass()
void registerSymbolUseGraphPrinterPass()
std::unique_ptr< mlir::Pass > createSymbolDefTreePrinterPass()
std::unique_ptr< mlir::Pass > createCallGraphSCCsPrinterPass(llvm::raw_ostream &os=llvm::errs())
std::unique_ptr< mlir::Pass > createCallGraphPrinterPass(llvm::raw_ostream &os=llvm::errs())
void registerCallGraphPrinterPassPass()
::llvm::StringRef stringifyOutputStream(OutputStream val)
void registerCallGraphSCCsPrinterPass()
void registerConstraintDependencyGraphPrinterPassPass()
void registerCallGraphSCCsPrinterPassPass()
void registerAnalysisPasses()
void registerSymbolDefTreePrinterPass()