17#include <mlir/Pass/PassManager.h>
18#include <mlir/Pass/PassOptions.h>
25 :
public mlir::PassPipelineOptions<StructInliningFlatteningOptions> {
29 *
this,
"max-iter", llvm::cl::desc(
"maximum number of flattening iterations before giving up"),
36 "cleanup mode for flattening in this pipeline. When left as `unspecified`, these "
37 "pipelines use `main-as-root`. Overriding this is not recommended because the later "
38 "`llzk-inline-structs` pass may crash if parameterized templates survive flattening."
69 "options for the flattening pass used in this pipeline; this pipeline defaults "
70 "flattening pass cleanup to `main-as-root`"
75 *
this,
"array-to-scalar",
76 llvm::cl::desc(
"whether to run the array-to-scalar pass in this pipeline"),
80 *
this,
"pod-to-scalar",
81 llvm::cl::desc(
"whether to run the pod-to-scalar pass in this pipeline"), llvm::cl::init(
true)
84 *
this,
"inlining", llvm::cl::desc(
"options for the inlining pass used in this pipeline"),
104 *
this,
"flatten-inline",
106 "options for the struct flattening and inlining pipeline used before polynomial "
107 "lowering; this pipeline defaults flattening cleanup to `main-as-root`"
113 llvm::cl::desc(
"options for the polynomial lowering pass used in this pipeline"),
std::unique_ptr<::mlir::Pass > createInlineStructsPass()
void buildRemoveUnnecessaryOpsAndDefsPipeline(mlir::OpPassManager &pm)
void registerTransformationPassPipelines()
std::unique_ptr<::mlir::Pass > createPolyLoweringPass()
void buildProductProgramPipeline(OpPassManager &pm)
void buildFullStructInliningPipeline(OpPassManager &pm, const FullStructInliningConfig &cfg)
void buildFullPolyLoweringPipeline(OpPassManager &pm, const FullPolyLoweringConfig &cfg)
void buildFullInliningPipeline(OpPassManager &pm, const FullStructInliningConfig &cfg)
void buildRemoveUnnecessaryOpsPipeline(mlir::OpPassManager &pm)
Pure C++ configuration for the full polynomial lowering pipeline.
PolyLoweringPassOptions polyLowering
FullStructInliningConfig structInlining
CLI Option configuration for the full polynomial lowering pipeline.
NestedPassOptions< static_cast< std::unique_ptr< mlir::Pass >(*)()>(&llzk::createPolyLoweringPass)> PolyLoweringOptions
Option< StructInliningOptions > structInlining
NestedPipelineOptions< FullStructInliningOptions > StructInliningOptions
Option< PolyLoweringOptions > polyLowering
Pure C++ configuration for the full struct inlining pipeline.
polymorphic::FlatteningPassOptions flattening
component::InlineStructsPassOptions inlining
CLI Option configuration for the full struct inlining pipeline.
Option< FlatteningOptions > flattening
NestedPipelineOptions< StructInliningFlatteningOptions > FlatteningOptions
NestedPassOptions< static_cast< std::unique_ptr< mlir::Pass >(*)()>(&llzk::component::createInlineStructsPass)> InliningOptions
Option< bool > arrayToScalar
Option< InliningOptions > inlining
Option< bool > podToScalar
Stores textual options for a constituent pass after validating them against that pass' native MLIR op...
Stores textual options for a constituent pipeline after validating them against that pipeline's nativ...
Typed nested options for the flattening pass when used inside the full struct-inlining and full poly-...
polymorphic::FlatteningPassOptions createPassOptions() const
Option< unsigned > iterationLimit
Option< polymorphic::FlatteningCleanupMode > cleanupMode