14 #ifndef MLIR_TRANSFORMS_PASSES_H
15 #define MLIR_TRANSFORMS_PASSES_H
21 #include "llvm/Support/Debug.h"
27 class GreedyRewriteConfig;
33 #define GEN_PASS_DECL_CANONICALIZER
34 #define GEN_PASS_DECL_CONTROLFLOWSINK
35 #define GEN_PASS_DECL_CSEPASS
36 #define GEN_PASS_DECL_INLINER
37 #define GEN_PASS_DECL_LOOPINVARIANTCODEMOTION
38 #define GEN_PASS_DECL_MEM2REG
39 #define GEN_PASS_DECL_PRINTIRPASS
40 #define GEN_PASS_DECL_PRINTOPSTATS
41 #define GEN_PASS_DECL_SROA
42 #define GEN_PASS_DECL_STRIPDEBUGINFO
43 #define GEN_PASS_DECL_SCCP
44 #define GEN_PASS_DECL_SYMBOLDCE
45 #define GEN_PASS_DECL_SYMBOLPRIVATIZE
46 #define GEN_PASS_DECL_TOPOLOGICALSORT
47 #define GEN_PASS_DECL_COMPOSITEFIXEDPOINTPASS
48 #include "mlir/Transforms/Passes.h.inc"
64 ArrayRef<std::string> disabledPatterns = std::nullopt,
65 ArrayRef<std::string> enabledPatterns = std::nullopt);
104 std::unique_ptr<Pass>
110 std::unique_ptr<Pass>
112 std::function<
void(OpPassManager &)> defaultPipelineBuilder);
127 std::unique_ptr<Pass>
139 int maxIterations = 10);
146 #define GEN_PASS_REGISTRATION
147 #include "mlir/Transforms/Passes.h.inc"
Include the generated interface declarations.
std::unique_ptr< Pass > createPrintIRPass(const PrintIRPassOptions &={})
Creates a pass to print IR on the debug stream.
std::unique_ptr< Pass > createCSEPass()
Creates a pass to perform common sub expression elimination.
std::unique_ptr< Pass > createLoopInvariantCodeMotionPass()
Creates a loop invariant code motion pass that hoists loop invariant instructions out of the loop.
std::unique_ptr< Pass > createStripDebugInfoPass()
Creates a pass to strip debug information from a function.
std::unique_ptr< Pass > createTopologicalSortPass()
Creates a pass that recursively sorts nested regions without SSA dominance topologically such that,...
std::unique_ptr< Pass > createCompositeFixedPointPass(std::string name, llvm::function_ref< void(OpPassManager &)> populateFunc, int maxIterations=10)
Create composite pass, which runs provided set of passes until fixed point or maximum number of itera...
std::unique_ptr< Pass > createSCCPPass()
Creates a pass which performs sparse conditional constant propagation over nested operations.
std::unique_ptr< Pass > createSymbolDCEPass()
Creates a pass which delete symbol operations that are unreachable.
std::unique_ptr< Pass > createInlinerPass()
Creates a pass which inlines calls and callable operations as defined by the CallGraph.
std::unique_ptr< Pass > createGenerateRuntimeVerificationPass()
Creates a pass that generates IR to verify ops at runtime.
std::unique_ptr< Pass > createCanonicalizerPass()
Creates an instance of the Canonicalizer pass, configured with default settings (which can be overrid...
std::unique_ptr< Pass > createRemoveDeadValuesPass()
Creates an optimization pass to remove dead values.
std::unique_ptr< Pass > createPrintOpStatsPass(raw_ostream &os=llvm::errs())
Creates a pass which prints the list of ops and the number of occurrences in the module.
std::unique_ptr< Pass > createControlFlowSinkPass()
Creates a pass to perform control-flow sinking.
std::unique_ptr< Pass > createLoopInvariantSubsetHoistingPass()
Creates a pass that hoists loop-invariant subset ops.
std::unique_ptr< Pass > createSymbolPrivatizePass(ArrayRef< std::string > excludeSymbols={})
Creates a pass which marks top-level symbol operations as private unless listed in excludeSymbols.