]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/lib/Passes/PassRegistry.def
Merge ^/head r317281 through r317502.
[FreeBSD/FreeBSD.git] / contrib / llvm / 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("callgraph", CallGraphAnalysis())
23 MODULE_ANALYSIS("lcg", LazyCallGraphAnalysis())
24 MODULE_ANALYSIS("module-summary", ModuleSummaryIndexAnalysis())
25 MODULE_ANALYSIS("no-op-module", NoOpModuleAnalysis())
26 MODULE_ANALYSIS("profile-summary", ProfileSummaryAnalysis())
27 MODULE_ANALYSIS("targetlibinfo", TargetLibraryAnalysis())
28 MODULE_ANALYSIS("verify", VerifierAnalysis())
29
30 #ifndef MODULE_ALIAS_ANALYSIS
31 #define MODULE_ALIAS_ANALYSIS(NAME, CREATE_PASS)                               \
32   MODULE_ANALYSIS(NAME, CREATE_PASS)
33 #endif
34 MODULE_ALIAS_ANALYSIS("globals-aa", GlobalsAA())
35 #undef MODULE_ALIAS_ANALYSIS
36 #undef MODULE_ANALYSIS
37
38 #ifndef MODULE_PASS
39 #define MODULE_PASS(NAME, CREATE_PASS)
40 #endif
41 MODULE_PASS("always-inline", AlwaysInlinerPass())
42 MODULE_PASS("constmerge", ConstantMergePass())
43 MODULE_PASS("cross-dso-cfi", CrossDSOCFIPass())
44 MODULE_PASS("deadargelim", DeadArgumentEliminationPass())
45 MODULE_PASS("elim-avail-extern", EliminateAvailableExternallyPass())
46 MODULE_PASS("forceattrs", ForceFunctionAttrsPass())
47 MODULE_PASS("function-import", FunctionImportPass())
48 MODULE_PASS("globaldce", GlobalDCEPass())
49 MODULE_PASS("globalopt", GlobalOptPass())
50 MODULE_PASS("globalsplit", GlobalSplitPass())
51 MODULE_PASS("inferattrs", InferFunctionAttrsPass())
52 MODULE_PASS("insert-gcov-profiling", GCOVProfilerPass())
53 MODULE_PASS("instrprof", InstrProfiling())
54 MODULE_PASS("internalize", InternalizePass())
55 MODULE_PASS("invalidate<all>", InvalidateAllAnalysesPass())
56 MODULE_PASS("ipsccp", IPSCCPPass())
57 MODULE_PASS("lowertypetests", LowerTypeTestsPass())
58 MODULE_PASS("name-anon-globals", NameAnonGlobalPass())
59 MODULE_PASS("no-op-module", NoOpModulePass())
60 MODULE_PASS("partial-inliner", PartialInlinerPass())
61 MODULE_PASS("pgo-icall-prom", PGOIndirectCallPromotion())
62 MODULE_PASS("pgo-instr-gen", PGOInstrumentationGen())
63 MODULE_PASS("pgo-instr-use", PGOInstrumentationUse())
64 MODULE_PASS("pre-isel-intrinsic-lowering", PreISelIntrinsicLoweringPass())
65 MODULE_PASS("print-profile-summary", ProfileSummaryPrinterPass(dbgs()))
66 MODULE_PASS("print-callgraph", CallGraphPrinterPass(dbgs()))
67 MODULE_PASS("print", PrintModulePass(dbgs()))
68 MODULE_PASS("print-lcg", LazyCallGraphPrinterPass(dbgs()))
69 MODULE_PASS("print-lcg-dot", LazyCallGraphDOTPrinterPass(dbgs()))
70 MODULE_PASS("rewrite-symbols", RewriteSymbolPass())
71 MODULE_PASS("rpo-functionattrs", ReversePostOrderFunctionAttrsPass())
72 MODULE_PASS("sample-profile", SampleProfileLoaderPass())
73 MODULE_PASS("strip-dead-prototypes", StripDeadPrototypesPass())
74 MODULE_PASS("wholeprogramdevirt", WholeProgramDevirtPass())
75 MODULE_PASS("verify", VerifierPass())
76 #undef MODULE_PASS
77
78 #ifndef CGSCC_ANALYSIS
79 #define CGSCC_ANALYSIS(NAME, CREATE_PASS)
80 #endif
81 CGSCC_ANALYSIS("no-op-cgscc", NoOpCGSCCAnalysis())
82 CGSCC_ANALYSIS("fam-proxy", FunctionAnalysisManagerCGSCCProxy())
83 #undef CGSCC_ANALYSIS
84
85 #ifndef CGSCC_PASS
86 #define CGSCC_PASS(NAME, CREATE_PASS)
87 #endif
88 CGSCC_PASS("argpromotion", ArgumentPromotionPass())
89 CGSCC_PASS("invalidate<all>", InvalidateAllAnalysesPass())
90 CGSCC_PASS("function-attrs", PostOrderFunctionAttrsPass())
91 CGSCC_PASS("inline", InlinerPass())
92 CGSCC_PASS("no-op-cgscc", NoOpCGSCCPass())
93 #undef CGSCC_PASS
94
95 #ifndef FUNCTION_ANALYSIS
96 #define FUNCTION_ANALYSIS(NAME, CREATE_PASS)
97 #endif
98 FUNCTION_ANALYSIS("aa", AAManager())
99 FUNCTION_ANALYSIS("assumptions", AssumptionAnalysis())
100 FUNCTION_ANALYSIS("block-freq", BlockFrequencyAnalysis())
101 FUNCTION_ANALYSIS("branch-prob", BranchProbabilityAnalysis())
102 FUNCTION_ANALYSIS("domtree", DominatorTreeAnalysis())
103 FUNCTION_ANALYSIS("postdomtree", PostDominatorTreeAnalysis())
104 FUNCTION_ANALYSIS("demanded-bits", DemandedBitsAnalysis())
105 FUNCTION_ANALYSIS("domfrontier", DominanceFrontierAnalysis())
106 FUNCTION_ANALYSIS("loops", LoopAnalysis())
107 FUNCTION_ANALYSIS("lazy-value-info", LazyValueAnalysis())
108 FUNCTION_ANALYSIS("da", DependenceAnalysis())
109 FUNCTION_ANALYSIS("memdep", MemoryDependenceAnalysis())
110 FUNCTION_ANALYSIS("memoryssa", MemorySSAAnalysis())
111 FUNCTION_ANALYSIS("regions", RegionInfoAnalysis())
112 FUNCTION_ANALYSIS("no-op-function", NoOpFunctionAnalysis())
113 FUNCTION_ANALYSIS("opt-remark-emit", OptimizationRemarkEmitterAnalysis())
114 FUNCTION_ANALYSIS("scalar-evolution", ScalarEvolutionAnalysis())
115 FUNCTION_ANALYSIS("targetlibinfo", TargetLibraryAnalysis())
116 FUNCTION_ANALYSIS("targetir",
117                   TM ? TM->getTargetIRAnalysis() : TargetIRAnalysis())
118 FUNCTION_ANALYSIS("verify", VerifierAnalysis())
119
120 #ifndef FUNCTION_ALIAS_ANALYSIS
121 #define FUNCTION_ALIAS_ANALYSIS(NAME, CREATE_PASS)                             \
122   FUNCTION_ANALYSIS(NAME, CREATE_PASS)
123 #endif
124 FUNCTION_ALIAS_ANALYSIS("basic-aa", BasicAA())
125 FUNCTION_ALIAS_ANALYSIS("cfl-anders-aa", CFLAndersAA())
126 FUNCTION_ALIAS_ANALYSIS("cfl-steens-aa", CFLSteensAA())
127 FUNCTION_ALIAS_ANALYSIS("scev-aa", SCEVAA())
128 FUNCTION_ALIAS_ANALYSIS("scoped-noalias-aa", ScopedNoAliasAA())
129 FUNCTION_ALIAS_ANALYSIS("type-based-aa", TypeBasedAA())
130 #undef FUNCTION_ALIAS_ANALYSIS
131 #undef FUNCTION_ANALYSIS
132
133 #ifndef FUNCTION_PASS
134 #define FUNCTION_PASS(NAME, CREATE_PASS)
135 #endif
136 FUNCTION_PASS("aa-eval", AAEvaluator())
137 FUNCTION_PASS("adce", ADCEPass())
138 FUNCTION_PASS("add-discriminators", AddDiscriminatorsPass())
139 FUNCTION_PASS("alignment-from-assumptions", AlignmentFromAssumptionsPass())
140 FUNCTION_PASS("bdce", BDCEPass())
141 FUNCTION_PASS("break-crit-edges", BreakCriticalEdgesPass())
142 FUNCTION_PASS("consthoist", ConstantHoistingPass())
143 FUNCTION_PASS("correlated-propagation", CorrelatedValuePropagationPass())
144 FUNCTION_PASS("dce", DCEPass())
145 FUNCTION_PASS("dse", DSEPass())
146 FUNCTION_PASS("dot-cfg", CFGPrinterPass())
147 FUNCTION_PASS("dot-cfg-only", CFGOnlyPrinterPass())
148 FUNCTION_PASS("early-cse", EarlyCSEPass(/*UseMemorySSA=*/false))
149 FUNCTION_PASS("early-cse-memssa", EarlyCSEPass(/*UseMemorySSA=*/true))
150 FUNCTION_PASS("gvn-hoist", GVNHoistPass())
151 FUNCTION_PASS("instcombine", InstCombinePass())
152 FUNCTION_PASS("instsimplify", InstSimplifierPass())
153 FUNCTION_PASS("invalidate<all>", InvalidateAllAnalysesPass())
154 FUNCTION_PASS("float2int", Float2IntPass())
155 FUNCTION_PASS("no-op-function", NoOpFunctionPass())
156 FUNCTION_PASS("libcalls-shrinkwrap", LibCallsShrinkWrapPass())
157 FUNCTION_PASS("loweratomic", LowerAtomicPass())
158 FUNCTION_PASS("lower-expect", LowerExpectIntrinsicPass())
159 FUNCTION_PASS("lower-guard-intrinsic", LowerGuardIntrinsicPass())
160 FUNCTION_PASS("guard-widening", GuardWideningPass())
161 FUNCTION_PASS("gvn", GVN())
162 FUNCTION_PASS("loop-simplify", LoopSimplifyPass())
163 FUNCTION_PASS("loop-sink", LoopSinkPass())
164 FUNCTION_PASS("lowerinvoke", LowerInvokePass())
165 FUNCTION_PASS("mem2reg", PromotePass())
166 FUNCTION_PASS("memcpyopt", MemCpyOptPass())
167 FUNCTION_PASS("mldst-motion", MergedLoadStoreMotionPass())
168 FUNCTION_PASS("nary-reassociate", NaryReassociatePass())
169 FUNCTION_PASS("newgvn", NewGVNPass())
170 FUNCTION_PASS("jump-threading", JumpThreadingPass())
171 FUNCTION_PASS("partially-inline-libcalls", PartiallyInlineLibCallsPass())
172 FUNCTION_PASS("lcssa", LCSSAPass())
173 FUNCTION_PASS("loop-data-prefetch", LoopDataPrefetchPass())
174 FUNCTION_PASS("loop-load-elim", LoopLoadEliminationPass())
175 FUNCTION_PASS("loop-distribute", LoopDistributePass())
176 FUNCTION_PASS("loop-vectorize", LoopVectorizePass())
177 FUNCTION_PASS("pgo-memop-opt", PGOMemOPSizeOpt())
178 FUNCTION_PASS("print", PrintFunctionPass(dbgs()))
179 FUNCTION_PASS("print<assumptions>", AssumptionPrinterPass(dbgs()))
180 FUNCTION_PASS("print<block-freq>", BlockFrequencyPrinterPass(dbgs()))
181 FUNCTION_PASS("print<branch-prob>", BranchProbabilityPrinterPass(dbgs()))
182 FUNCTION_PASS("print<domtree>", DominatorTreePrinterPass(dbgs()))
183 FUNCTION_PASS("print<postdomtree>", PostDominatorTreePrinterPass(dbgs()))
184 FUNCTION_PASS("print<demanded-bits>", DemandedBitsPrinterPass(dbgs()))
185 FUNCTION_PASS("print<domfrontier>", DominanceFrontierPrinterPass(dbgs()))
186 FUNCTION_PASS("print<loops>", LoopPrinterPass(dbgs()))
187 FUNCTION_PASS("print<memoryssa>", MemorySSAPrinterPass(dbgs()))
188 FUNCTION_PASS("print<regions>", RegionInfoPrinterPass(dbgs()))
189 FUNCTION_PASS("print<scalar-evolution>", ScalarEvolutionPrinterPass(dbgs()))
190 FUNCTION_PASS("reassociate", ReassociatePass())
191 FUNCTION_PASS("sccp", SCCPPass())
192 FUNCTION_PASS("simplify-cfg", SimplifyCFGPass())
193 FUNCTION_PASS("sink", SinkingPass())
194 FUNCTION_PASS("slp-vectorizer", SLPVectorizerPass())
195 FUNCTION_PASS("speculative-execution", SpeculativeExecutionPass())
196 FUNCTION_PASS("sroa", SROA())
197 FUNCTION_PASS("tailcallelim", TailCallElimPass())
198 FUNCTION_PASS("unreachableblockelim", UnreachableBlockElimPass())
199 FUNCTION_PASS("verify", VerifierPass())
200 FUNCTION_PASS("verify<domtree>", DominatorTreeVerifierPass())
201 FUNCTION_PASS("verify<loops>", LoopVerifierPass())
202 FUNCTION_PASS("verify<memoryssa>", MemorySSAVerifierPass())
203 FUNCTION_PASS("verify<regions>", RegionInfoVerifierPass())
204 FUNCTION_PASS("view-cfg", CFGViewerPass())
205 FUNCTION_PASS("view-cfg-only", CFGOnlyViewerPass())
206 #undef FUNCTION_PASS
207
208 #ifndef LOOP_ANALYSIS
209 #define LOOP_ANALYSIS(NAME, CREATE_PASS)
210 #endif
211 LOOP_ANALYSIS("no-op-loop", NoOpLoopAnalysis())
212 LOOP_ANALYSIS("access-info", LoopAccessAnalysis())
213 LOOP_ANALYSIS("ivusers", IVUsersAnalysis())
214 #undef LOOP_ANALYSIS
215
216 #ifndef LOOP_PASS
217 #define LOOP_PASS(NAME, CREATE_PASS)
218 #endif
219 LOOP_PASS("invalidate<all>", InvalidateAllAnalysesPass())
220 LOOP_PASS("licm", LICMPass())
221 LOOP_PASS("loop-idiom", LoopIdiomRecognizePass())
222 LOOP_PASS("loop-instsimplify", LoopInstSimplifyPass())
223 LOOP_PASS("rotate", LoopRotatePass())
224 LOOP_PASS("no-op-loop", NoOpLoopPass())
225 LOOP_PASS("print", PrintLoopPass(dbgs()))
226 LOOP_PASS("loop-deletion", LoopDeletionPass())
227 LOOP_PASS("simplify-cfg", LoopSimplifyCFGPass())
228 LOOP_PASS("strength-reduce", LoopStrengthReducePass())
229 LOOP_PASS("indvars", IndVarSimplifyPass())
230 LOOP_PASS("unroll", LoopUnrollPass::create())
231 LOOP_PASS("unroll-full", LoopUnrollPass::createFull())
232 LOOP_PASS("print-access-info", LoopAccessInfoPrinterPass(dbgs()))
233 LOOP_PASS("print<ivusers>", IVUsersPrinterPass(dbgs()))
234 LOOP_PASS("loop-predication", LoopPredicationPass())
235 #undef LOOP_PASS