Line data Source code
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 1032 : MODULE_ANALYSIS("callgraph", CallGraphAnalysis())
23 1031 : MODULE_ANALYSIS("lcg", LazyCallGraphAnalysis())
24 1031 : MODULE_ANALYSIS("module-summary", ModuleSummaryIndexAnalysis())
25 1047 : MODULE_ANALYSIS("no-op-module", NoOpModuleAnalysis())
26 1043 : MODULE_ANALYSIS("profile-summary", ProfileSummaryAnalysis())
27 1033 : MODULE_ANALYSIS("targetlibinfo", TargetLibraryAnalysis())
28 1031 : MODULE_ANALYSIS("verify", VerifierAnalysis())
29 2062 : MODULE_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis(PIC))
30 :
31 : #ifndef MODULE_ALIAS_ANALYSIS
32 : #define MODULE_ALIAS_ANALYSIS(NAME, CREATE_PASS) \
33 : MODULE_ANALYSIS(NAME, CREATE_PASS)
34 : #endif
35 1041 : MODULE_ALIAS_ANALYSIS("globals-aa", GlobalsAA())
36 : #undef MODULE_ALIAS_ANALYSIS
37 : #undef MODULE_ANALYSIS
38 :
39 : #ifndef MODULE_PASS
40 : #define MODULE_PASS(NAME, CREATE_PASS)
41 : #endif
42 3 : MODULE_PASS("always-inline", AlwaysInlinerPass())
43 2 : MODULE_PASS("asan", AddressSanitizerPass(false, false, true))
44 0 : MODULE_PASS("called-value-propagation", CalledValuePropagationPass())
45 1 : MODULE_PASS("cg-profile", CGProfilePass())
46 1 : MODULE_PASS("constmerge", ConstantMergePass())
47 2 : MODULE_PASS("cross-dso-cfi", CrossDSOCFIPass())
48 1 : MODULE_PASS("deadargelim", DeadArgumentEliminationPass())
49 1 : MODULE_PASS("elim-avail-extern", EliminateAvailableExternallyPass())
50 1 : MODULE_PASS("forceattrs", ForceFunctionAttrsPass())
51 0 : MODULE_PASS("function-import", FunctionImportPass())
52 4 : MODULE_PASS("globaldce", GlobalDCEPass())
53 1 : MODULE_PASS("globalopt", GlobalOptPass())
54 1 : MODULE_PASS("globalsplit", GlobalSplitPass())
55 2 : MODULE_PASS("hotcoldsplit", HotColdSplittingPass())
56 1 : MODULE_PASS("inferattrs", InferFunctionAttrsPass())
57 10 : MODULE_PASS("insert-gcov-profiling", GCOVProfilerPass())
58 24 : MODULE_PASS("instrprof", InstrProfiling())
59 2 : MODULE_PASS("internalize", InternalizePass())
60 1 : MODULE_PASS("invalidate<all>", InvalidateAllAnalysesPass())
61 2 : MODULE_PASS("ipsccp", IPSCCPPass())
62 1 : MODULE_PASS("lowertypetests", LowerTypeTestsPass(nullptr, nullptr))
63 7 : MODULE_PASS("name-anon-globals", NameAnonGlobalPass())
64 26 : MODULE_PASS("no-op-module", NoOpModulePass())
65 39 : MODULE_PASS("partial-inliner", PartialInlinerPass())
66 8 : MODULE_PASS("pgo-icall-prom", PGOIndirectCallPromotion())
67 26 : MODULE_PASS("pgo-instr-gen", PGOInstrumentationGen())
68 26 : MODULE_PASS("pgo-instr-use", PGOInstrumentationUse())
69 1 : MODULE_PASS("pre-isel-intrinsic-lowering", PreISelIntrinsicLoweringPass())
70 1 : MODULE_PASS("print-profile-summary", ProfileSummaryPrinterPass(dbgs()))
71 1 : MODULE_PASS("print-callgraph", CallGraphPrinterPass(dbgs()))
72 4 : MODULE_PASS("print", PrintModulePass(dbgs()))
73 2 : MODULE_PASS("print-lcg", LazyCallGraphPrinterPass(dbgs()))
74 0 : MODULE_PASS("print-lcg-dot", LazyCallGraphDOTPrinterPass(dbgs()))
75 44 : MODULE_PASS("rewrite-statepoints-for-gc", RewriteStatepointsForGC())
76 2 : MODULE_PASS("rewrite-symbols", RewriteSymbolPass())
77 2 : MODULE_PASS("rpo-functionattrs", ReversePostOrderFunctionAttrsPass())
78 28 : MODULE_PASS("sample-profile", SampleProfileLoaderPass())
79 2 : MODULE_PASS("strip-dead-prototypes", StripDeadPrototypesPass())
80 3 : MODULE_PASS("synthetic-counts-propagation", SyntheticCountsPropagation())
81 2 : MODULE_PASS("wholeprogramdevirt", WholeProgramDevirtPass(nullptr, nullptr))
82 2 : MODULE_PASS("verify", VerifierPass())
83 : #undef MODULE_PASS
84 :
85 : #ifndef CGSCC_ANALYSIS
86 : #define CGSCC_ANALYSIS(NAME, CREATE_PASS)
87 : #endif
88 1037 : CGSCC_ANALYSIS("no-op-cgscc", NoOpCGSCCAnalysis())
89 1027 : CGSCC_ANALYSIS("fam-proxy", FunctionAnalysisManagerCGSCCProxy())
90 2054 : CGSCC_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis(PIC))
91 : #undef CGSCC_ANALYSIS
92 :
93 : #ifndef CGSCC_PASS
94 : #define CGSCC_PASS(NAME, CREATE_PASS)
95 : #endif
96 16 : CGSCC_PASS("argpromotion", ArgumentPromotionPass())
97 0 : CGSCC_PASS("invalidate<all>", InvalidateAllAnalysesPass())
98 41 : CGSCC_PASS("function-attrs", PostOrderFunctionAttrsPass())
99 214 : CGSCC_PASS("inline", InlinerPass())
100 10 : CGSCC_PASS("no-op-cgscc", NoOpCGSCCPass())
101 : #undef CGSCC_PASS
102 :
103 : #ifndef FUNCTION_ANALYSIS
104 : #define FUNCTION_ANALYSIS(NAME, CREATE_PASS)
105 : #endif
106 1099 : FUNCTION_ANALYSIS("aa", AAManager())
107 1032 : FUNCTION_ANALYSIS("assumptions", AssumptionAnalysis())
108 1034 : FUNCTION_ANALYSIS("block-freq", BlockFrequencyAnalysis())
109 1059 : FUNCTION_ANALYSIS("branch-prob", BranchProbabilityAnalysis())
110 1048 : FUNCTION_ANALYSIS("domtree", DominatorTreeAnalysis())
111 1032 : FUNCTION_ANALYSIS("postdomtree", PostDominatorTreeAnalysis())
112 1031 : FUNCTION_ANALYSIS("demanded-bits", DemandedBitsAnalysis())
113 1031 : FUNCTION_ANALYSIS("domfrontier", DominanceFrontierAnalysis())
114 1035 : FUNCTION_ANALYSIS("loops", LoopAnalysis())
115 1036 : FUNCTION_ANALYSIS("lazy-value-info", LazyValueAnalysis())
116 1031 : FUNCTION_ANALYSIS("da", DependenceAnalysis())
117 1035 : FUNCTION_ANALYSIS("memdep", MemoryDependenceAnalysis())
118 1031 : FUNCTION_ANALYSIS("memoryssa", MemorySSAAnalysis())
119 1034 : FUNCTION_ANALYSIS("phi-values", PhiValuesAnalysis())
120 1031 : FUNCTION_ANALYSIS("regions", RegionInfoAnalysis())
121 1043 : FUNCTION_ANALYSIS("no-op-function", NoOpFunctionAnalysis())
122 1113 : FUNCTION_ANALYSIS("opt-remark-emit", OptimizationRemarkEmitterAnalysis())
123 1097 : FUNCTION_ANALYSIS("scalar-evolution", ScalarEvolutionAnalysis())
124 1031 : FUNCTION_ANALYSIS("targetlibinfo", TargetLibraryAnalysis())
125 1068 : FUNCTION_ANALYSIS("targetir",
126 : TM ? TM->getTargetIRAnalysis() : TargetIRAnalysis())
127 1031 : FUNCTION_ANALYSIS("verify", VerifierAnalysis())
128 2062 : FUNCTION_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis(PIC))
129 :
130 : #ifndef FUNCTION_ALIAS_ANALYSIS
131 : #define FUNCTION_ALIAS_ANALYSIS(NAME, CREATE_PASS) \
132 : FUNCTION_ANALYSIS(NAME, CREATE_PASS)
133 : #endif
134 1137 : FUNCTION_ALIAS_ANALYSIS("basic-aa", BasicAA())
135 1050 : FUNCTION_ALIAS_ANALYSIS("cfl-anders-aa", CFLAndersAA())
136 1048 : FUNCTION_ALIAS_ANALYSIS("cfl-steens-aa", CFLSteensAA())
137 1032 : FUNCTION_ALIAS_ANALYSIS("scev-aa", SCEVAA())
138 1032 : FUNCTION_ALIAS_ANALYSIS("scoped-noalias-aa", ScopedNoAliasAA())
139 1036 : FUNCTION_ALIAS_ANALYSIS("type-based-aa", TypeBasedAA())
140 : #undef FUNCTION_ALIAS_ANALYSIS
141 : #undef FUNCTION_ANALYSIS
142 :
143 : #ifndef FUNCTION_PASS
144 : #define FUNCTION_PASS(NAME, CREATE_PASS)
145 : #endif
146 45 : FUNCTION_PASS("aa-eval", AAEvaluator())
147 4 : FUNCTION_PASS("adce", ADCEPass())
148 9 : FUNCTION_PASS("add-discriminators", AddDiscriminatorsPass())
149 3 : FUNCTION_PASS("aggressive-instcombine", AggressiveInstCombinePass())
150 3 : FUNCTION_PASS("alignment-from-assumptions", AlignmentFromAssumptionsPass())
151 2 : FUNCTION_PASS("asan", AddressSanitizerPass(false, false, false))
152 3 : FUNCTION_PASS("bdce", BDCEPass())
153 1 : FUNCTION_PASS("bounds-checking", BoundsCheckingPass())
154 2 : FUNCTION_PASS("break-crit-edges", BreakCriticalEdgesPass())
155 4 : FUNCTION_PASS("callsite-splitting", CallSiteSplittingPass())
156 1 : FUNCTION_PASS("consthoist", ConstantHoistingPass())
157 1 : FUNCTION_PASS("chr", ControlHeightReductionPass())
158 3 : FUNCTION_PASS("correlated-propagation", CorrelatedValuePropagationPass())
159 2 : FUNCTION_PASS("dce", DCEPass())
160 0 : FUNCTION_PASS("div-rem-pairs", DivRemPairsPass())
161 2 : FUNCTION_PASS("dse", DSEPass())
162 0 : FUNCTION_PASS("dot-cfg", CFGPrinterPass())
163 1 : FUNCTION_PASS("dot-cfg-only", CFGOnlyPrinterPass())
164 4 : FUNCTION_PASS("early-cse", EarlyCSEPass(/*UseMemorySSA=*/false))
165 2 : FUNCTION_PASS("early-cse-memssa", EarlyCSEPass(/*UseMemorySSA=*/true))
166 4 : FUNCTION_PASS("ee-instrument", EntryExitInstrumenterPass(/*PostInlining=*/false))
167 4 : FUNCTION_PASS("post-inline-ee-instrument", EntryExitInstrumenterPass(/*PostInlining=*/true))
168 0 : FUNCTION_PASS("gvn-hoist", GVNHoistPass())
169 66 : FUNCTION_PASS("instcombine", InstCombinePass())
170 1 : FUNCTION_PASS("instsimplify", InstSimplifyPass())
171 4 : FUNCTION_PASS("invalidate<all>", InvalidateAllAnalysesPass())
172 1 : FUNCTION_PASS("float2int", Float2IntPass())
173 35 : FUNCTION_PASS("no-op-function", NoOpFunctionPass())
174 3 : FUNCTION_PASS("libcalls-shrinkwrap", LibCallsShrinkWrapPass())
175 5 : FUNCTION_PASS("loweratomic", LowerAtomicPass())
176 6 : FUNCTION_PASS("lower-expect", LowerExpectIntrinsicPass())
177 1 : FUNCTION_PASS("lower-guard-intrinsic", LowerGuardIntrinsicPass())
178 2 : FUNCTION_PASS("guard-widening", GuardWideningPass())
179 15 : FUNCTION_PASS("gvn", GVN())
180 4 : FUNCTION_PASS("loop-simplify", LoopSimplifyPass())
181 2 : FUNCTION_PASS("loop-sink", LoopSinkPass())
182 1 : FUNCTION_PASS("lowerinvoke", LowerInvokePass())
183 2 : FUNCTION_PASS("mem2reg", PromotePass())
184 2 : FUNCTION_PASS("memcpyopt", MemCpyOptPass())
185 1 : FUNCTION_PASS("mldst-motion", MergedLoadStoreMotionPass())
186 10 : FUNCTION_PASS("nary-reassociate", NaryReassociatePass())
187 2 : FUNCTION_PASS("newgvn", NewGVNPass())
188 5 : FUNCTION_PASS("jump-threading", JumpThreadingPass())
189 3 : FUNCTION_PASS("partially-inline-libcalls", PartiallyInlineLibCallsPass())
190 7 : FUNCTION_PASS("lcssa", LCSSAPass())
191 8 : FUNCTION_PASS("loop-data-prefetch", LoopDataPrefetchPass())
192 2 : FUNCTION_PASS("loop-load-elim", LoopLoadEliminationPass())
193 2 : FUNCTION_PASS("loop-distribute", LoopDistributePass())
194 12 : FUNCTION_PASS("loop-vectorize", LoopVectorizePass())
195 3 : FUNCTION_PASS("pgo-memop-opt", PGOMemOPSizeOpt())
196 4 : FUNCTION_PASS("print", PrintFunctionPass(dbgs()))
197 1 : FUNCTION_PASS("print<assumptions>", AssumptionPrinterPass(dbgs()))
198 13 : FUNCTION_PASS("print<block-freq>", BlockFrequencyPrinterPass(dbgs()))
199 7 : FUNCTION_PASS("print<branch-prob>", BranchProbabilityPrinterPass(dbgs()))
200 2 : FUNCTION_PASS("print<domtree>", DominatorTreePrinterPass(dbgs()))
201 5 : FUNCTION_PASS("print<postdomtree>", PostDominatorTreePrinterPass(dbgs()))
202 2 : FUNCTION_PASS("print<demanded-bits>", DemandedBitsPrinterPass(dbgs()))
203 0 : FUNCTION_PASS("print<domfrontier>", DominanceFrontierPrinterPass(dbgs()))
204 1 : FUNCTION_PASS("print<loops>", LoopPrinterPass(dbgs()))
205 20 : FUNCTION_PASS("print<memoryssa>", MemorySSAPrinterPass(dbgs()))
206 3 : FUNCTION_PASS("print<phi-values>", PhiValuesPrinterPass(dbgs()))
207 2 : FUNCTION_PASS("print<regions>", RegionInfoPrinterPass(dbgs()))
208 6 : FUNCTION_PASS("print<scalar-evolution>", ScalarEvolutionPrinterPass(dbgs()))
209 1 : FUNCTION_PASS("reassociate", ReassociatePass())
210 2 : FUNCTION_PASS("sccp", SCCPPass())
211 14 : FUNCTION_PASS("simplify-cfg", SimplifyCFGPass())
212 1 : FUNCTION_PASS("sink", SinkingPass())
213 4 : FUNCTION_PASS("slp-vectorizer", SLPVectorizerPass())
214 1 : FUNCTION_PASS("speculative-execution", SpeculativeExecutionPass())
215 1 : FUNCTION_PASS("spec-phis", SpeculateAroundPHIsPass())
216 5 : FUNCTION_PASS("sroa", SROA())
217 3 : FUNCTION_PASS("tailcallelim", TailCallElimPass())
218 1 : FUNCTION_PASS("unreachableblockelim", UnreachableBlockElimPass())
219 18 : FUNCTION_PASS("unroll", LoopUnrollPass())
220 1 : FUNCTION_PASS("verify", VerifierPass())
221 3 : FUNCTION_PASS("verify<domtree>", DominatorTreeVerifierPass())
222 7 : FUNCTION_PASS("verify<loops>", LoopVerifierPass())
223 18 : FUNCTION_PASS("verify<memoryssa>", MemorySSAVerifierPass())
224 0 : FUNCTION_PASS("verify<regions>", RegionInfoVerifierPass())
225 0 : FUNCTION_PASS("view-cfg", CFGViewerPass())
226 0 : FUNCTION_PASS("view-cfg-only", CFGOnlyViewerPass())
227 : #undef FUNCTION_PASS
228 :
229 : #ifndef LOOP_ANALYSIS
230 : #define LOOP_ANALYSIS(NAME, CREATE_PASS)
231 : #endif
232 1027 : LOOP_ANALYSIS("no-op-loop", NoOpLoopAnalysis())
233 1028 : LOOP_ANALYSIS("access-info", LoopAccessAnalysis())
234 1033 : LOOP_ANALYSIS("ivusers", IVUsersAnalysis())
235 2054 : LOOP_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis(PIC))
236 : #undef LOOP_ANALYSIS
237 :
238 : #ifndef LOOP_PASS
239 : #define LOOP_PASS(NAME, CREATE_PASS)
240 : #endif
241 0 : LOOP_PASS("invalidate<all>", InvalidateAllAnalysesPass())
242 46 : LOOP_PASS("licm", LICMPass())
243 1 : LOOP_PASS("loop-idiom", LoopIdiomRecognizePass())
244 4 : LOOP_PASS("loop-instsimplify", LoopInstSimplifyPass())
245 1 : LOOP_PASS("rotate", LoopRotatePass())
246 21 : LOOP_PASS("no-op-loop", NoOpLoopPass())
247 0 : LOOP_PASS("print", PrintLoopPass(dbgs()))
248 5 : LOOP_PASS("loop-deletion", LoopDeletionPass())
249 4 : LOOP_PASS("simplify-cfg", LoopSimplifyCFGPass())
250 1 : LOOP_PASS("strength-reduce", LoopStrengthReducePass())
251 3 : LOOP_PASS("indvars", IndVarSimplifyPass())
252 26 : LOOP_PASS("irce", IRCEPass())
253 0 : LOOP_PASS("unroll-and-jam", LoopUnrollAndJamPass())
254 17 : LOOP_PASS("unroll-full", LoopFullUnrollPass())
255 8 : LOOP_PASS("unswitch", SimpleLoopUnswitchPass())
256 24 : LOOP_PASS("print-access-info", LoopAccessInfoPrinterPass(dbgs()))
257 2 : LOOP_PASS("print<ivusers>", IVUsersPrinterPass(dbgs()))
258 5 : LOOP_PASS("loop-predication", LoopPredicationPass())
259 : #undef LOOP_PASS
|