241a78927c77eb210840329d7822e3cafcb6ebf2
[oota-llvm.git] / lib / Passes / PassRegistry.def
1 //===- PassRegistry.def - Registry of passes --------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file is used as the registry of passes that are part of the core LLVM
11 // libraries. This file describes both transformation passes and analyses
12 // Analyses are registered while transformation passes have names registered
13 // that can be used when providing a textual pass pipeline.
14 //
15 //===----------------------------------------------------------------------===//
16
17 // NOTE: NO INCLUDE GUARD DESIRED!
18
19 #ifndef MODULE_ANALYSIS
20 #define MODULE_ANALYSIS(NAME, CREATE_PASS)
21 #endif
22 MODULE_ANALYSIS("lcg", LazyCallGraphAnalysis())
23 MODULE_ANALYSIS("no-op-module", NoOpModuleAnalysis())
24 MODULE_ANALYSIS("targetlibinfo", TargetLibraryAnalysis())
25 #undef MODULE_ANALYSIS
26
27 #ifndef MODULE_PASS
28 #define MODULE_PASS(NAME, CREATE_PASS)
29 #endif
30 MODULE_PASS("forceattrs", ForceFunctionAttrsPass())
31 MODULE_PASS("inferattrs", InferFunctionAttrsPass())
32 MODULE_PASS("invalidate<all>", InvalidateAllAnalysesPass())
33 MODULE_PASS("no-op-module", NoOpModulePass())
34 MODULE_PASS("print", PrintModulePass(dbgs()))
35 MODULE_PASS("print-cg", LazyCallGraphPrinterPass(dbgs()))
36 MODULE_PASS("strip-dead-prototypes", StripDeadPrototypesPass())
37 MODULE_PASS("verify", VerifierPass())
38 #undef MODULE_PASS
39
40 #ifndef CGSCC_ANALYSIS
41 #define CGSCC_ANALYSIS(NAME, CREATE_PASS)
42 #endif
43 CGSCC_ANALYSIS("no-op-cgscc", NoOpCGSCCAnalysis())
44 #undef CGSCC_ANALYSIS
45
46 #ifndef CGSCC_PASS
47 #define CGSCC_PASS(NAME, CREATE_PASS)
48 #endif
49 CGSCC_PASS("invalidate<all>", InvalidateAllAnalysesPass())
50 CGSCC_PASS("no-op-cgscc", NoOpCGSCCPass())
51 #undef CGSCC_PASS
52
53 #ifndef FUNCTION_ANALYSIS
54 #define FUNCTION_ANALYSIS(NAME, CREATE_PASS)
55 #endif
56 FUNCTION_ANALYSIS("assumptions", AssumptionAnalysis())
57 FUNCTION_ANALYSIS("domtree", DominatorTreeAnalysis())
58 FUNCTION_ANALYSIS("loops", LoopAnalysis())
59 FUNCTION_ANALYSIS("no-op-function", NoOpFunctionAnalysis())
60 FUNCTION_ANALYSIS("scalar-evolution", ScalarEvolutionAnalysis())
61 FUNCTION_ANALYSIS("targetlibinfo", TargetLibraryAnalysis())
62 FUNCTION_ANALYSIS("targetir",
63                   TM ? TM->getTargetIRAnalysis() : TargetIRAnalysis())
64 #undef FUNCTION_ANALYSIS
65
66 #ifndef FUNCTION_PASS
67 #define FUNCTION_PASS(NAME, CREATE_PASS)
68 #endif
69 FUNCTION_PASS("adce", ADCEPass())
70 FUNCTION_PASS("early-cse", EarlyCSEPass())
71 FUNCTION_PASS("instcombine", InstCombinePass())
72 FUNCTION_PASS("invalidate<all>", InvalidateAllAnalysesPass())
73 FUNCTION_PASS("no-op-function", NoOpFunctionPass())
74 FUNCTION_PASS("lower-expect", LowerExpectIntrinsicPass())
75 FUNCTION_PASS("print", PrintFunctionPass(dbgs()))
76 FUNCTION_PASS("print<assumptions>", AssumptionPrinterPass(dbgs()))
77 FUNCTION_PASS("print<domtree>", DominatorTreePrinterPass(dbgs()))
78 FUNCTION_PASS("print<loops>", LoopPrinterPass(dbgs()))
79 FUNCTION_PASS("print<scalar-evolution>", ScalarEvolutionPrinterPass(dbgs()))
80 FUNCTION_PASS("simplify-cfg", SimplifyCFGPass())
81 FUNCTION_PASS("sroa", SROA())
82 FUNCTION_PASS("verify", VerifierPass())
83 FUNCTION_PASS("verify<domtree>", DominatorTreeVerifierPass())
84 #undef FUNCTION_PASS