LLZK 0.1.0
An open-source IR for Zero Knowledge (ZK) circuits
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<mlir::arith::ArithDialect>();
73 registry.insert<mlir::scf::SCFDialect>();
74 }
75
79 MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(CallGraphPrinterPassBase<DerivedT>)
80
81protected:
82private:
83};
84} // namespace impl
85#undef GEN_PASS_DEF_CALLGRAPHPRINTERPASS
86#endif // GEN_PASS_DEF_CALLGRAPHPRINTERPASS
87
88//===----------------------------------------------------------------------===//
89// CallGraphSCCsPrinterPass
90//===----------------------------------------------------------------------===//
91#ifdef GEN_PASS_DECL_CALLGRAPHSCCSPRINTERPASS
92#undef GEN_PASS_DECL_CALLGRAPHSCCSPRINTERPASS
93#endif // GEN_PASS_DECL_CALLGRAPHSCCSPRINTERPASS
94#ifdef GEN_PASS_DEF_CALLGRAPHSCCSPRINTERPASS
95namespace impl {
96
97template <typename DerivedT>
98class CallGraphSCCsPrinterPassBase : public ::mlir::OperationPass<::mlir::ModuleOp> {
99public:
100 using Base = CallGraphSCCsPrinterPassBase;
101
102 CallGraphSCCsPrinterPassBase() : ::mlir::OperationPass<::mlir::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
103 CallGraphSCCsPrinterPassBase(const CallGraphSCCsPrinterPassBase &other) : ::mlir::OperationPass<::mlir::ModuleOp>(other) {}
104 CallGraphSCCsPrinterPassBase& operator=(const CallGraphSCCsPrinterPassBase &) = delete;
105 CallGraphSCCsPrinterPassBase(CallGraphSCCsPrinterPassBase &&) = delete;
106 CallGraphSCCsPrinterPassBase& operator=(CallGraphSCCsPrinterPassBase &&) = delete;
107 ~CallGraphSCCsPrinterPassBase() = default;
108
110 static constexpr ::llvm::StringLiteral getArgumentName() {
111 return ::llvm::StringLiteral("llzk-print-call-graph-sccs");
112 }
113 ::llvm::StringRef getArgument() const override { return "llzk-print-call-graph-sccs"; }
114
115 ::llvm::StringRef getDescription() const override { return "Print the SCCs from the LLZK module's call graph."; }
116
118 static constexpr ::llvm::StringLiteral getPassName() {
119 return ::llvm::StringLiteral("CallGraphSCCsPrinterPass");
120 }
121 ::llvm::StringRef getName() const override { return "CallGraphSCCsPrinterPass"; }
122
124 static bool classof(const ::mlir::Pass *pass) {
125 return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
126 }
127
129 std::unique_ptr<::mlir::Pass> clonePass() const override {
130 return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
131 }
132
134 void getDependentDialects(::mlir::DialectRegistry &registry) const override {
135 registry.insert<llzk::LLZKDialect>();
136 registry.insert<llzk::boolean::BoolDialect>();
137 registry.insert<llzk::array::ArrayDialect>();
138 registry.insert<llzk::component::StructDialect>();
139 registry.insert<llzk::constrain::ConstrainDialect>();
140 registry.insert<llzk::felt::FeltDialect>();
141 registry.insert<llzk::global::GlobalDialect>();
142 registry.insert<llzk::include::IncludeDialect>();
143 registry.insert<llzk::function::FunctionDialect>();
144 registry.insert<llzk::string::StringDialect>();
145 registry.insert<llzk::polymorphic::PolymorphicDialect>();
146 registry.insert<mlir::arith::ArithDialect>();
147 registry.insert<mlir::scf::SCFDialect>();
148 }
149
153 MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(CallGraphSCCsPrinterPassBase<DerivedT>)
154
155protected:
156private:
157};
158} // namespace impl
159#undef GEN_PASS_DEF_CALLGRAPHSCCSPRINTERPASS
160#endif // GEN_PASS_DEF_CALLGRAPHSCCSPRINTERPASS
161
162//===----------------------------------------------------------------------===//
163// ConstraintDependencyGraphPrinterPass
164//===----------------------------------------------------------------------===//
165#ifdef GEN_PASS_DECL_CONSTRAINTDEPENDENCYGRAPHPRINTERPASS
166struct ConstraintDependencyGraphPrinterPassOptions {
167 bool runIntraprocedural = false;
168};
169#undef GEN_PASS_DECL_CONSTRAINTDEPENDENCYGRAPHPRINTERPASS
170#endif // GEN_PASS_DECL_CONSTRAINTDEPENDENCYGRAPHPRINTERPASS
171#ifdef GEN_PASS_DEF_CONSTRAINTDEPENDENCYGRAPHPRINTERPASS
172namespace impl {
173
174template <typename DerivedT>
175class ConstraintDependencyGraphPrinterPassBase : public ::mlir::OperationPass<::mlir::ModuleOp> {
176public:
177 using Base = ConstraintDependencyGraphPrinterPassBase;
178
179 ConstraintDependencyGraphPrinterPassBase() : ::mlir::OperationPass<::mlir::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
180 ConstraintDependencyGraphPrinterPassBase(const ConstraintDependencyGraphPrinterPassBase &other) : ::mlir::OperationPass<::mlir::ModuleOp>(other) {}
181 ConstraintDependencyGraphPrinterPassBase& operator=(const ConstraintDependencyGraphPrinterPassBase &) = delete;
182 ConstraintDependencyGraphPrinterPassBase(ConstraintDependencyGraphPrinterPassBase &&) = delete;
183 ConstraintDependencyGraphPrinterPassBase& operator=(ConstraintDependencyGraphPrinterPassBase &&) = delete;
184 ~ConstraintDependencyGraphPrinterPassBase() = default;
185
187 static constexpr ::llvm::StringLiteral getArgumentName() {
188 return ::llvm::StringLiteral("llzk-print-constraint-dependency-graphs");
189 }
190 ::llvm::StringRef getArgument() const override { return "llzk-print-constraint-dependency-graphs"; }
191
192 ::llvm::StringRef getDescription() const override { return "Print constraint dependency graph for all LLZK structs."; }
193
195 static constexpr ::llvm::StringLiteral getPassName() {
196 return ::llvm::StringLiteral("ConstraintDependencyGraphPrinterPass");
197 }
198 ::llvm::StringRef getName() const override { return "ConstraintDependencyGraphPrinterPass"; }
199
201 static bool classof(const ::mlir::Pass *pass) {
202 return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
203 }
204
206 std::unique_ptr<::mlir::Pass> clonePass() const override {
207 return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
208 }
209
211 void getDependentDialects(::mlir::DialectRegistry &registry) const override {
212 registry.insert<llzk::LLZKDialect>();
213 registry.insert<llzk::boolean::BoolDialect>();
214 registry.insert<llzk::array::ArrayDialect>();
215 registry.insert<llzk::component::StructDialect>();
216 registry.insert<llzk::constrain::ConstrainDialect>();
217 registry.insert<llzk::felt::FeltDialect>();
218 registry.insert<llzk::global::GlobalDialect>();
219 registry.insert<llzk::include::IncludeDialect>();
220 registry.insert<llzk::function::FunctionDialect>();
221 registry.insert<llzk::string::StringDialect>();
222 registry.insert<llzk::polymorphic::PolymorphicDialect>();
223 registry.insert<mlir::arith::ArithDialect>();
224 registry.insert<mlir::scf::SCFDialect>();
225 }
226
230 MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConstraintDependencyGraphPrinterPassBase<DerivedT>)
231
232 ConstraintDependencyGraphPrinterPassBase(ConstraintDependencyGraphPrinterPassOptions options) : ConstraintDependencyGraphPrinterPassBase() {
233 runIntraprocedural = std::move(options.runIntraprocedural);
234 }
235protected:
236 ::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)};
237private:
238};
239} // namespace impl
240#undef GEN_PASS_DEF_CONSTRAINTDEPENDENCYGRAPHPRINTERPASS
241#endif // GEN_PASS_DEF_CONSTRAINTDEPENDENCYGRAPHPRINTERPASS
242
243//===----------------------------------------------------------------------===//
244// IntervalAnalysisPrinterPass
245//===----------------------------------------------------------------------===//
246#ifdef GEN_PASS_DECL_INTERVALANALYSISPRINTERPASS
247struct IntervalAnalysisPrinterPassOptions {
248 std::string fieldName = "bn128";
249 bool propagateInputConstraints = false;
250 bool printSolverConstraints = false;
251 bool printComputeIntervals = false;
252};
253#undef GEN_PASS_DECL_INTERVALANALYSISPRINTERPASS
254#endif // GEN_PASS_DECL_INTERVALANALYSISPRINTERPASS
255#ifdef GEN_PASS_DEF_INTERVALANALYSISPRINTERPASS
256namespace impl {
257
258template <typename DerivedT>
259class IntervalAnalysisPrinterPassBase : public ::mlir::OperationPass<::mlir::ModuleOp> {
260public:
261 using Base = IntervalAnalysisPrinterPassBase;
262
263 IntervalAnalysisPrinterPassBase() : ::mlir::OperationPass<::mlir::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
264 IntervalAnalysisPrinterPassBase(const IntervalAnalysisPrinterPassBase &other) : ::mlir::OperationPass<::mlir::ModuleOp>(other) {}
265 IntervalAnalysisPrinterPassBase& operator=(const IntervalAnalysisPrinterPassBase &) = delete;
266 IntervalAnalysisPrinterPassBase(IntervalAnalysisPrinterPassBase &&) = delete;
267 IntervalAnalysisPrinterPassBase& operator=(IntervalAnalysisPrinterPassBase &&) = delete;
268 ~IntervalAnalysisPrinterPassBase() = default;
269
271 static constexpr ::llvm::StringLiteral getArgumentName() {
272 return ::llvm::StringLiteral("llzk-print-interval-analysis");
273 }
274 ::llvm::StringRef getArgument() const override { return "llzk-print-interval-analysis"; }
275
276 ::llvm::StringRef getDescription() const override { return "Print interval analysis results for all LLZK structs."; }
277
279 static constexpr ::llvm::StringLiteral getPassName() {
280 return ::llvm::StringLiteral("IntervalAnalysisPrinterPass");
281 }
282 ::llvm::StringRef getName() const override { return "IntervalAnalysisPrinterPass"; }
283
285 static bool classof(const ::mlir::Pass *pass) {
286 return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
287 }
288
290 std::unique_ptr<::mlir::Pass> clonePass() const override {
291 return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
292 }
293
295 void getDependentDialects(::mlir::DialectRegistry &registry) const override {
296 registry.insert<llzk::LLZKDialect>();
297 registry.insert<llzk::boolean::BoolDialect>();
298 registry.insert<llzk::array::ArrayDialect>();
299 registry.insert<llzk::component::StructDialect>();
300 registry.insert<llzk::constrain::ConstrainDialect>();
301 registry.insert<llzk::felt::FeltDialect>();
302 registry.insert<llzk::global::GlobalDialect>();
303 registry.insert<llzk::include::IncludeDialect>();
304 registry.insert<llzk::function::FunctionDialect>();
305 registry.insert<llzk::string::StringDialect>();
306 registry.insert<llzk::polymorphic::PolymorphicDialect>();
307 registry.insert<mlir::arith::ArithDialect>();
308 registry.insert<mlir::scf::SCFDialect>();
309 }
310
314 MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(IntervalAnalysisPrinterPassBase<DerivedT>)
315
316 IntervalAnalysisPrinterPassBase(IntervalAnalysisPrinterPassOptions options) : IntervalAnalysisPrinterPassBase() {
317 fieldName = std::move(options.fieldName);
318 propagateInputConstraints = std::move(options.propagateInputConstraints);
319 printSolverConstraints = std::move(options.printSolverConstraints);
320 printComputeIntervals = std::move(options.printComputeIntervals);
321 }
322protected:
323 ::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")};
324 ::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)};
325 ::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)};
326 ::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)};
327private:
328};
329} // namespace impl
330#undef GEN_PASS_DEF_INTERVALANALYSISPRINTERPASS
331#endif // GEN_PASS_DEF_INTERVALANALYSISPRINTERPASS
332
333//===----------------------------------------------------------------------===//
334// SymbolDefTreePrinterPass
335//===----------------------------------------------------------------------===//
336#ifdef GEN_PASS_DECL_SYMBOLDEFTREEPRINTERPASS
337struct SymbolDefTreePrinterPassOptions {
339 bool saveDotGraph = false;
340};
341#undef GEN_PASS_DECL_SYMBOLDEFTREEPRINTERPASS
342#endif // GEN_PASS_DECL_SYMBOLDEFTREEPRINTERPASS
343#ifdef GEN_PASS_DEF_SYMBOLDEFTREEPRINTERPASS
344namespace impl {
345
346template <typename DerivedT>
347class SymbolDefTreePrinterPassBase : public ::mlir::OperationPass<::mlir::ModuleOp> {
348public:
349 using Base = SymbolDefTreePrinterPassBase;
350
351 SymbolDefTreePrinterPassBase() : ::mlir::OperationPass<::mlir::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
352 SymbolDefTreePrinterPassBase(const SymbolDefTreePrinterPassBase &other) : ::mlir::OperationPass<::mlir::ModuleOp>(other) {}
353 SymbolDefTreePrinterPassBase& operator=(const SymbolDefTreePrinterPassBase &) = delete;
354 SymbolDefTreePrinterPassBase(SymbolDefTreePrinterPassBase &&) = delete;
355 SymbolDefTreePrinterPassBase& operator=(SymbolDefTreePrinterPassBase &&) = delete;
356 ~SymbolDefTreePrinterPassBase() = default;
357
359 static constexpr ::llvm::StringLiteral getArgumentName() {
360 return ::llvm::StringLiteral("llzk-print-symbol-def-tree");
361 }
362 ::llvm::StringRef getArgument() const override { return "llzk-print-symbol-def-tree"; }
363
364 ::llvm::StringRef getDescription() const override { return "Print symbol definition tree."; }
365
367 static constexpr ::llvm::StringLiteral getPassName() {
368 return ::llvm::StringLiteral("SymbolDefTreePrinterPass");
369 }
370 ::llvm::StringRef getName() const override { return "SymbolDefTreePrinterPass"; }
371
373 static bool classof(const ::mlir::Pass *pass) {
374 return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
375 }
376
378 std::unique_ptr<::mlir::Pass> clonePass() const override {
379 return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
380 }
381
383 void getDependentDialects(::mlir::DialectRegistry &registry) const override {
384 registry.insert<llzk::LLZKDialect>();
385 registry.insert<llzk::boolean::BoolDialect>();
386 registry.insert<llzk::array::ArrayDialect>();
387 registry.insert<llzk::component::StructDialect>();
388 registry.insert<llzk::constrain::ConstrainDialect>();
389 registry.insert<llzk::felt::FeltDialect>();
390 registry.insert<llzk::global::GlobalDialect>();
391 registry.insert<llzk::include::IncludeDialect>();
392 registry.insert<llzk::function::FunctionDialect>();
393 registry.insert<llzk::string::StringDialect>();
394 registry.insert<llzk::polymorphic::PolymorphicDialect>();
395 registry.insert<mlir::arith::ArithDialect>();
396 registry.insert<mlir::scf::SCFDialect>();
397 }
398
402 MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(SymbolDefTreePrinterPassBase<DerivedT>)
403
404 SymbolDefTreePrinterPassBase(SymbolDefTreePrinterPassOptions options) : SymbolDefTreePrinterPassBase() {
405 outputStream = std::move(options.outputStream);
406 saveDotGraph = std::move(options.saveDotGraph);
407 }
408protected:
409 ::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(
411 "Print pass output to 'llvm::outs()'"),
413 "Print pass output to 'llvm::errs()'"),
415 "Print pass output to 'llvm::dbgs()'")
416 )};
417 ::mlir::Pass::Option<bool> saveDotGraph{*this, "saveDot", ::llvm::cl::desc("Whether to dump the graph to DOT format."), ::llvm::cl::init(false)};
418private:
419};
420} // namespace impl
421#undef GEN_PASS_DEF_SYMBOLDEFTREEPRINTERPASS
422#endif // GEN_PASS_DEF_SYMBOLDEFTREEPRINTERPASS
423
424//===----------------------------------------------------------------------===//
425// SymbolUseGraphPrinterPass
426//===----------------------------------------------------------------------===//
427#ifdef GEN_PASS_DECL_SYMBOLUSEGRAPHPRINTERPASS
428struct SymbolUseGraphPrinterPassOptions {
430 bool saveDotGraph = false;
431};
432#undef GEN_PASS_DECL_SYMBOLUSEGRAPHPRINTERPASS
433#endif // GEN_PASS_DECL_SYMBOLUSEGRAPHPRINTERPASS
434#ifdef GEN_PASS_DEF_SYMBOLUSEGRAPHPRINTERPASS
435namespace impl {
436
437template <typename DerivedT>
438class SymbolUseGraphPrinterPassBase : public ::mlir::OperationPass<::mlir::ModuleOp> {
439public:
440 using Base = SymbolUseGraphPrinterPassBase;
441
442 SymbolUseGraphPrinterPassBase() : ::mlir::OperationPass<::mlir::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
443 SymbolUseGraphPrinterPassBase(const SymbolUseGraphPrinterPassBase &other) : ::mlir::OperationPass<::mlir::ModuleOp>(other) {}
444 SymbolUseGraphPrinterPassBase& operator=(const SymbolUseGraphPrinterPassBase &) = delete;
445 SymbolUseGraphPrinterPassBase(SymbolUseGraphPrinterPassBase &&) = delete;
446 SymbolUseGraphPrinterPassBase& operator=(SymbolUseGraphPrinterPassBase &&) = delete;
447 ~SymbolUseGraphPrinterPassBase() = default;
448
450 static constexpr ::llvm::StringLiteral getArgumentName() {
451 return ::llvm::StringLiteral("llzk-print-symbol-use-graph");
452 }
453 ::llvm::StringRef getArgument() const override { return "llzk-print-symbol-use-graph"; }
454
455 ::llvm::StringRef getDescription() const override { return "Print symbol use graph."; }
456
458 static constexpr ::llvm::StringLiteral getPassName() {
459 return ::llvm::StringLiteral("SymbolUseGraphPrinterPass");
460 }
461 ::llvm::StringRef getName() const override { return "SymbolUseGraphPrinterPass"; }
462
464 static bool classof(const ::mlir::Pass *pass) {
465 return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
466 }
467
469 std::unique_ptr<::mlir::Pass> clonePass() const override {
470 return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
471 }
472
474 void getDependentDialects(::mlir::DialectRegistry &registry) const override {
475 registry.insert<llzk::LLZKDialect>();
476 registry.insert<llzk::boolean::BoolDialect>();
477 registry.insert<llzk::array::ArrayDialect>();
478 registry.insert<llzk::component::StructDialect>();
479 registry.insert<llzk::constrain::ConstrainDialect>();
480 registry.insert<llzk::felt::FeltDialect>();
481 registry.insert<llzk::global::GlobalDialect>();
482 registry.insert<llzk::include::IncludeDialect>();
483 registry.insert<llzk::function::FunctionDialect>();
484 registry.insert<llzk::string::StringDialect>();
485 registry.insert<llzk::polymorphic::PolymorphicDialect>();
486 registry.insert<mlir::arith::ArithDialect>();
487 registry.insert<mlir::scf::SCFDialect>();
488 }
489
493 MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(SymbolUseGraphPrinterPassBase<DerivedT>)
494
495 SymbolUseGraphPrinterPassBase(SymbolUseGraphPrinterPassOptions options) : SymbolUseGraphPrinterPassBase() {
496 outputStream = std::move(options.outputStream);
497 saveDotGraph = std::move(options.saveDotGraph);
498 }
499protected:
500 ::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(
502 "Print pass output to 'llvm::outs()'"),
504 "Print pass output to 'llvm::errs()'"),
506 "Print pass output to 'llvm::dbgs()'")
507 )};
508 ::mlir::Pass::Option<bool> saveDotGraph{*this, "saveDot", ::llvm::cl::desc("Whether to dump the graph to DOT format."), ::llvm::cl::init(false)};
509private:
510};
511} // namespace impl
512#undef GEN_PASS_DEF_SYMBOLUSEGRAPHPRINTERPASS
513#endif // GEN_PASS_DEF_SYMBOLUSEGRAPHPRINTERPASS
514#ifdef GEN_PASS_REGISTRATION
515
516//===----------------------------------------------------------------------===//
517// CallGraphPrinterPass Registration
518//===----------------------------------------------------------------------===//
519
520inline void registerCallGraphPrinterPass() {
521 ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
522 return llzk::createCallGraphPrinterPass(llvm::errs());
523 });
524}
525
526// Old registration code, kept for temporary backwards compatibility.
528 ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
529 return llzk::createCallGraphPrinterPass(llvm::errs());
530 });
531}
532
533//===----------------------------------------------------------------------===//
534// CallGraphSCCsPrinterPass Registration
535//===----------------------------------------------------------------------===//
536
538 ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
539 return llzk::createCallGraphSCCsPrinterPass(llvm::errs());
540 });
541}
542
543// Old registration code, kept for temporary backwards compatibility.
545 ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
546 return llzk::createCallGraphSCCsPrinterPass(llvm::errs());
547 });
548}
549
550//===----------------------------------------------------------------------===//
551// ConstraintDependencyGraphPrinterPass Registration
552//===----------------------------------------------------------------------===//
553
555 ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
557 });
558}
559
560// Old registration code, kept for temporary backwards compatibility.
562 ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
564 });
565}
566
567//===----------------------------------------------------------------------===//
568// IntervalAnalysisPrinterPass Registration
569//===----------------------------------------------------------------------===//
570
572 ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
573 return llzk::createIntervalAnalysisPrinterPass(llvm::errs());
574 });
575}
576
577// Old registration code, kept for temporary backwards compatibility.
579 ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
580 return llzk::createIntervalAnalysisPrinterPass(llvm::errs());
581 });
582}
583
584//===----------------------------------------------------------------------===//
585// SymbolDefTreePrinterPass Registration
586//===----------------------------------------------------------------------===//
587
589 ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
591 });
592}
593
594// Old registration code, kept for temporary backwards compatibility.
596 ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
598 });
599}
600
601//===----------------------------------------------------------------------===//
602// SymbolUseGraphPrinterPass Registration
603//===----------------------------------------------------------------------===//
604
606 ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
608 });
609}
610
611// Old registration code, kept for temporary backwards compatibility.
613 ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
615 });
616}
617
618//===----------------------------------------------------------------------===//
619// Analysis Registration
620//===----------------------------------------------------------------------===//
621
622inline void registerAnalysisPasses() {
629}
630#undef GEN_PASS_REGISTRATION
631#endif // GEN_PASS_REGISTRATION
632// Deprecated. Please use the new per-pass macros.
633#ifdef GEN_PASS_CLASSES
634
635template <typename DerivedT>
636class CallGraphPrinterPassBase : public ::mlir::OperationPass<::mlir::ModuleOp> {
637public:
638 using Base = CallGraphPrinterPassBase;
639
640 CallGraphPrinterPassBase() : ::mlir::OperationPass<::mlir::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
641 CallGraphPrinterPassBase(const CallGraphPrinterPassBase &other) : ::mlir::OperationPass<::mlir::ModuleOp>(other) {}
642 CallGraphPrinterPassBase& operator=(const CallGraphPrinterPassBase &) = delete;
643 CallGraphPrinterPassBase(CallGraphPrinterPassBase &&) = delete;
644 CallGraphPrinterPassBase& operator=(CallGraphPrinterPassBase &&) = delete;
645 ~CallGraphPrinterPassBase() = default;
646
648 static constexpr ::llvm::StringLiteral getArgumentName() {
649 return ::llvm::StringLiteral("llzk-print-call-graph");
650 }
651 ::llvm::StringRef getArgument() const override { return "llzk-print-call-graph"; }
652
653 ::llvm::StringRef getDescription() const override { return "Print the LLZK module's call graph."; }
654
656 static constexpr ::llvm::StringLiteral getPassName() {
657 return ::llvm::StringLiteral("CallGraphPrinterPass");
658 }
659 ::llvm::StringRef getName() const override { return "CallGraphPrinterPass"; }
660
662 static bool classof(const ::mlir::Pass *pass) {
663 return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
664 }
665
667 std::unique_ptr<::mlir::Pass> clonePass() const override {
668 return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
669 }
670
672 void getDependentDialects(::mlir::DialectRegistry &registry) const override {
673 registry.insert<llzk::LLZKDialect>();
674 registry.insert<llzk::boolean::BoolDialect>();
675 registry.insert<llzk::array::ArrayDialect>();
676 registry.insert<llzk::component::StructDialect>();
677 registry.insert<llzk::constrain::ConstrainDialect>();
678 registry.insert<llzk::felt::FeltDialect>();
679 registry.insert<llzk::global::GlobalDialect>();
680 registry.insert<llzk::include::IncludeDialect>();
681 registry.insert<llzk::function::FunctionDialect>();
682 registry.insert<llzk::string::StringDialect>();
683 registry.insert<llzk::polymorphic::PolymorphicDialect>();
684 registry.insert<mlir::arith::ArithDialect>();
685 registry.insert<mlir::scf::SCFDialect>();
686 }
687
691 MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(CallGraphPrinterPassBase<DerivedT>)
692
693protected:
694};
695
696template <typename DerivedT>
697class CallGraphSCCsPrinterPassBase : public ::mlir::OperationPass<::mlir::ModuleOp> {
698public:
699 using Base = CallGraphSCCsPrinterPassBase;
700
701 CallGraphSCCsPrinterPassBase() : ::mlir::OperationPass<::mlir::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
702 CallGraphSCCsPrinterPassBase(const CallGraphSCCsPrinterPassBase &other) : ::mlir::OperationPass<::mlir::ModuleOp>(other) {}
703 CallGraphSCCsPrinterPassBase& operator=(const CallGraphSCCsPrinterPassBase &) = delete;
704 CallGraphSCCsPrinterPassBase(CallGraphSCCsPrinterPassBase &&) = delete;
705 CallGraphSCCsPrinterPassBase& operator=(CallGraphSCCsPrinterPassBase &&) = delete;
706 ~CallGraphSCCsPrinterPassBase() = default;
707
709 static constexpr ::llvm::StringLiteral getArgumentName() {
710 return ::llvm::StringLiteral("llzk-print-call-graph-sccs");
711 }
712 ::llvm::StringRef getArgument() const override { return "llzk-print-call-graph-sccs"; }
713
714 ::llvm::StringRef getDescription() const override { return "Print the SCCs from the LLZK module's call graph."; }
715
717 static constexpr ::llvm::StringLiteral getPassName() {
718 return ::llvm::StringLiteral("CallGraphSCCsPrinterPass");
719 }
720 ::llvm::StringRef getName() const override { return "CallGraphSCCsPrinterPass"; }
721
723 static bool classof(const ::mlir::Pass *pass) {
724 return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
725 }
726
728 std::unique_ptr<::mlir::Pass> clonePass() const override {
729 return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
730 }
731
733 void getDependentDialects(::mlir::DialectRegistry &registry) const override {
734 registry.insert<llzk::LLZKDialect>();
735 registry.insert<llzk::boolean::BoolDialect>();
736 registry.insert<llzk::array::ArrayDialect>();
737 registry.insert<llzk::component::StructDialect>();
738 registry.insert<llzk::constrain::ConstrainDialect>();
739 registry.insert<llzk::felt::FeltDialect>();
740 registry.insert<llzk::global::GlobalDialect>();
741 registry.insert<llzk::include::IncludeDialect>();
742 registry.insert<llzk::function::FunctionDialect>();
743 registry.insert<llzk::string::StringDialect>();
744 registry.insert<llzk::polymorphic::PolymorphicDialect>();
745 registry.insert<mlir::arith::ArithDialect>();
746 registry.insert<mlir::scf::SCFDialect>();
747 }
748
752 MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(CallGraphSCCsPrinterPassBase<DerivedT>)
753
754protected:
755};
756
757template <typename DerivedT>
758class ConstraintDependencyGraphPrinterPassBase : public ::mlir::OperationPass<::mlir::ModuleOp> {
759public:
760 using Base = ConstraintDependencyGraphPrinterPassBase;
761
762 ConstraintDependencyGraphPrinterPassBase() : ::mlir::OperationPass<::mlir::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
763 ConstraintDependencyGraphPrinterPassBase(const ConstraintDependencyGraphPrinterPassBase &other) : ::mlir::OperationPass<::mlir::ModuleOp>(other) {}
764 ConstraintDependencyGraphPrinterPassBase& operator=(const ConstraintDependencyGraphPrinterPassBase &) = delete;
765 ConstraintDependencyGraphPrinterPassBase(ConstraintDependencyGraphPrinterPassBase &&) = delete;
766 ConstraintDependencyGraphPrinterPassBase& operator=(ConstraintDependencyGraphPrinterPassBase &&) = delete;
767 ~ConstraintDependencyGraphPrinterPassBase() = default;
768
770 static constexpr ::llvm::StringLiteral getArgumentName() {
771 return ::llvm::StringLiteral("llzk-print-constraint-dependency-graphs");
772 }
773 ::llvm::StringRef getArgument() const override { return "llzk-print-constraint-dependency-graphs"; }
774
775 ::llvm::StringRef getDescription() const override { return "Print constraint dependency graph for all LLZK structs."; }
776
778 static constexpr ::llvm::StringLiteral getPassName() {
779 return ::llvm::StringLiteral("ConstraintDependencyGraphPrinterPass");
780 }
781 ::llvm::StringRef getName() const override { return "ConstraintDependencyGraphPrinterPass"; }
782
784 static bool classof(const ::mlir::Pass *pass) {
785 return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
786 }
787
789 std::unique_ptr<::mlir::Pass> clonePass() const override {
790 return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
791 }
792
794 void getDependentDialects(::mlir::DialectRegistry &registry) const override {
795 registry.insert<llzk::LLZKDialect>();
796 registry.insert<llzk::boolean::BoolDialect>();
797 registry.insert<llzk::array::ArrayDialect>();
798 registry.insert<llzk::component::StructDialect>();
799 registry.insert<llzk::constrain::ConstrainDialect>();
800 registry.insert<llzk::felt::FeltDialect>();
801 registry.insert<llzk::global::GlobalDialect>();
802 registry.insert<llzk::include::IncludeDialect>();
803 registry.insert<llzk::function::FunctionDialect>();
804 registry.insert<llzk::string::StringDialect>();
805 registry.insert<llzk::polymorphic::PolymorphicDialect>();
806 registry.insert<mlir::arith::ArithDialect>();
807 registry.insert<mlir::scf::SCFDialect>();
808 }
809
813 MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConstraintDependencyGraphPrinterPassBase<DerivedT>)
814
815protected:
816 ::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)};
817};
818
819template <typename DerivedT>
820class IntervalAnalysisPrinterPassBase : public ::mlir::OperationPass<::mlir::ModuleOp> {
821public:
822 using Base = IntervalAnalysisPrinterPassBase;
823
824 IntervalAnalysisPrinterPassBase() : ::mlir::OperationPass<::mlir::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
825 IntervalAnalysisPrinterPassBase(const IntervalAnalysisPrinterPassBase &other) : ::mlir::OperationPass<::mlir::ModuleOp>(other) {}
826 IntervalAnalysisPrinterPassBase& operator=(const IntervalAnalysisPrinterPassBase &) = delete;
827 IntervalAnalysisPrinterPassBase(IntervalAnalysisPrinterPassBase &&) = delete;
828 IntervalAnalysisPrinterPassBase& operator=(IntervalAnalysisPrinterPassBase &&) = delete;
829 ~IntervalAnalysisPrinterPassBase() = default;
830
832 static constexpr ::llvm::StringLiteral getArgumentName() {
833 return ::llvm::StringLiteral("llzk-print-interval-analysis");
834 }
835 ::llvm::StringRef getArgument() const override { return "llzk-print-interval-analysis"; }
836
837 ::llvm::StringRef getDescription() const override { return "Print interval analysis results for all LLZK structs."; }
838
840 static constexpr ::llvm::StringLiteral getPassName() {
841 return ::llvm::StringLiteral("IntervalAnalysisPrinterPass");
842 }
843 ::llvm::StringRef getName() const override { return "IntervalAnalysisPrinterPass"; }
844
846 static bool classof(const ::mlir::Pass *pass) {
847 return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
848 }
849
851 std::unique_ptr<::mlir::Pass> clonePass() const override {
852 return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
853 }
854
856 void getDependentDialects(::mlir::DialectRegistry &registry) const override {
857 registry.insert<llzk::LLZKDialect>();
858 registry.insert<llzk::boolean::BoolDialect>();
859 registry.insert<llzk::array::ArrayDialect>();
860 registry.insert<llzk::component::StructDialect>();
861 registry.insert<llzk::constrain::ConstrainDialect>();
862 registry.insert<llzk::felt::FeltDialect>();
863 registry.insert<llzk::global::GlobalDialect>();
864 registry.insert<llzk::include::IncludeDialect>();
865 registry.insert<llzk::function::FunctionDialect>();
866 registry.insert<llzk::string::StringDialect>();
867 registry.insert<llzk::polymorphic::PolymorphicDialect>();
868 registry.insert<mlir::arith::ArithDialect>();
869 registry.insert<mlir::scf::SCFDialect>();
870 }
871
875 MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(IntervalAnalysisPrinterPassBase<DerivedT>)
876
877protected:
878 ::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")};
879 ::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)};
880 ::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)};
881 ::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)};
882};
883
884template <typename DerivedT>
885class SymbolDefTreePrinterPassBase : public ::mlir::OperationPass<::mlir::ModuleOp> {
886public:
887 using Base = SymbolDefTreePrinterPassBase;
888
889 SymbolDefTreePrinterPassBase() : ::mlir::OperationPass<::mlir::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
890 SymbolDefTreePrinterPassBase(const SymbolDefTreePrinterPassBase &other) : ::mlir::OperationPass<::mlir::ModuleOp>(other) {}
891 SymbolDefTreePrinterPassBase& operator=(const SymbolDefTreePrinterPassBase &) = delete;
892 SymbolDefTreePrinterPassBase(SymbolDefTreePrinterPassBase &&) = delete;
893 SymbolDefTreePrinterPassBase& operator=(SymbolDefTreePrinterPassBase &&) = delete;
894 ~SymbolDefTreePrinterPassBase() = default;
895
897 static constexpr ::llvm::StringLiteral getArgumentName() {
898 return ::llvm::StringLiteral("llzk-print-symbol-def-tree");
899 }
900 ::llvm::StringRef getArgument() const override { return "llzk-print-symbol-def-tree"; }
901
902 ::llvm::StringRef getDescription() const override { return "Print symbol definition tree."; }
903
905 static constexpr ::llvm::StringLiteral getPassName() {
906 return ::llvm::StringLiteral("SymbolDefTreePrinterPass");
907 }
908 ::llvm::StringRef getName() const override { return "SymbolDefTreePrinterPass"; }
909
911 static bool classof(const ::mlir::Pass *pass) {
912 return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
913 }
914
916 std::unique_ptr<::mlir::Pass> clonePass() const override {
917 return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
918 }
919
921 void getDependentDialects(::mlir::DialectRegistry &registry) const override {
922 registry.insert<llzk::LLZKDialect>();
923 registry.insert<llzk::boolean::BoolDialect>();
924 registry.insert<llzk::array::ArrayDialect>();
925 registry.insert<llzk::component::StructDialect>();
926 registry.insert<llzk::constrain::ConstrainDialect>();
927 registry.insert<llzk::felt::FeltDialect>();
928 registry.insert<llzk::global::GlobalDialect>();
929 registry.insert<llzk::include::IncludeDialect>();
930 registry.insert<llzk::function::FunctionDialect>();
931 registry.insert<llzk::string::StringDialect>();
932 registry.insert<llzk::polymorphic::PolymorphicDialect>();
933 registry.insert<mlir::arith::ArithDialect>();
934 registry.insert<mlir::scf::SCFDialect>();
935 }
936
940 MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(SymbolDefTreePrinterPassBase<DerivedT>)
941
942protected:
943 ::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(
945 "Print pass output to 'llvm::outs()'"),
947 "Print pass output to 'llvm::errs()'"),
949 "Print pass output to 'llvm::dbgs()'")
950 )};
951 ::mlir::Pass::Option<bool> saveDotGraph{*this, "saveDot", ::llvm::cl::desc("Whether to dump the graph to DOT format."), ::llvm::cl::init(false)};
952};
953
954template <typename DerivedT>
955class SymbolUseGraphPrinterPassBase : public ::mlir::OperationPass<::mlir::ModuleOp> {
956public:
957 using Base = SymbolUseGraphPrinterPassBase;
958
959 SymbolUseGraphPrinterPassBase() : ::mlir::OperationPass<::mlir::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
960 SymbolUseGraphPrinterPassBase(const SymbolUseGraphPrinterPassBase &other) : ::mlir::OperationPass<::mlir::ModuleOp>(other) {}
961 SymbolUseGraphPrinterPassBase& operator=(const SymbolUseGraphPrinterPassBase &) = delete;
962 SymbolUseGraphPrinterPassBase(SymbolUseGraphPrinterPassBase &&) = delete;
963 SymbolUseGraphPrinterPassBase& operator=(SymbolUseGraphPrinterPassBase &&) = delete;
964 ~SymbolUseGraphPrinterPassBase() = default;
965
967 static constexpr ::llvm::StringLiteral getArgumentName() {
968 return ::llvm::StringLiteral("llzk-print-symbol-use-graph");
969 }
970 ::llvm::StringRef getArgument() const override { return "llzk-print-symbol-use-graph"; }
971
972 ::llvm::StringRef getDescription() const override { return "Print symbol use graph."; }
973
975 static constexpr ::llvm::StringLiteral getPassName() {
976 return ::llvm::StringLiteral("SymbolUseGraphPrinterPass");
977 }
978 ::llvm::StringRef getName() const override { return "SymbolUseGraphPrinterPass"; }
979
981 static bool classof(const ::mlir::Pass *pass) {
982 return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
983 }
984
986 std::unique_ptr<::mlir::Pass> clonePass() const override {
987 return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
988 }
989
991 void getDependentDialects(::mlir::DialectRegistry &registry) const override {
992 registry.insert<llzk::LLZKDialect>();
993 registry.insert<llzk::boolean::BoolDialect>();
994 registry.insert<llzk::array::ArrayDialect>();
995 registry.insert<llzk::component::StructDialect>();
996 registry.insert<llzk::constrain::ConstrainDialect>();
997 registry.insert<llzk::felt::FeltDialect>();
998 registry.insert<llzk::global::GlobalDialect>();
999 registry.insert<llzk::include::IncludeDialect>();
1000 registry.insert<llzk::function::FunctionDialect>();
1001 registry.insert<llzk::string::StringDialect>();
1002 registry.insert<llzk::polymorphic::PolymorphicDialect>();
1003 registry.insert<mlir::arith::ArithDialect>();
1004 registry.insert<mlir::scf::SCFDialect>();
1005 }
1006
1010 MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(SymbolUseGraphPrinterPassBase<DerivedT>)
1011
1012protected:
1013 ::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(
1015 "Print pass output to 'llvm::outs()'"),
1017 "Print pass output to 'llvm::errs()'"),
1019 "Print pass output to 'llvm::dbgs()'")
1020 )};
1021 ::mlir::Pass::Option<bool> saveDotGraph{*this, "saveDot", ::llvm::cl::desc("Whether to dump the graph to DOT format."), ::llvm::cl::init(false)};
1022};
1023#undef GEN_PASS_CLASSES
1024#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()