[DWARF] Fix referencing Range List Tables from CUs for DWARF64.
[llvm-complete.git] / lib / Passes / PassRegistry.def
blob905d3464ae9921013f07a73c4ea0c5398de44a91
1 //===- PassRegistry.def - Registry of passes --------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file is used as the registry of passes that are part of the core LLVM
10 // libraries. This file describes both transformation passes and analyses
11 // Analyses are registered while transformation passes have names registered
12 // that can be used when providing a textual pass pipeline.
14 //===----------------------------------------------------------------------===//
16 // NOTE: NO INCLUDE GUARD DESIRED!
18 #ifndef MODULE_ANALYSIS
19 #define MODULE_ANALYSIS(NAME, CREATE_PASS)
20 #endif
21 MODULE_ANALYSIS("callgraph", CallGraphAnalysis())
22 MODULE_ANALYSIS("lcg", LazyCallGraphAnalysis())
23 MODULE_ANALYSIS("module-summary", ModuleSummaryIndexAnalysis())
24 MODULE_ANALYSIS("no-op-module", NoOpModuleAnalysis())
25 MODULE_ANALYSIS("profile-summary", ProfileSummaryAnalysis())
26 MODULE_ANALYSIS("stack-safety", StackSafetyGlobalAnalysis())
27 MODULE_ANALYSIS("targetlibinfo", TargetLibraryAnalysis())
28 MODULE_ANALYSIS("verify", VerifierAnalysis())
29 MODULE_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis(PIC))
30 MODULE_ANALYSIS("asan-globals-md", ASanGlobalsMetadataAnalysis())
32 #ifndef MODULE_ALIAS_ANALYSIS
33 #define MODULE_ALIAS_ANALYSIS(NAME, CREATE_PASS) \
34 MODULE_ANALYSIS(NAME, CREATE_PASS)
35 #endif
36 MODULE_ALIAS_ANALYSIS("globals-aa", GlobalsAA())
37 #undef MODULE_ALIAS_ANALYSIS
38 #undef MODULE_ANALYSIS
40 #ifndef MODULE_PASS
41 #define MODULE_PASS(NAME, CREATE_PASS)
42 #endif
43 MODULE_PASS("always-inline", AlwaysInlinerPass())
44 MODULE_PASS("attributor", AttributorPass())
45 MODULE_PASS("called-value-propagation", CalledValuePropagationPass())
46 MODULE_PASS("canonicalize-aliases", CanonicalizeAliasesPass())
47 MODULE_PASS("cg-profile", CGProfilePass())
48 MODULE_PASS("constmerge", ConstantMergePass())
49 MODULE_PASS("cross-dso-cfi", CrossDSOCFIPass())
50 MODULE_PASS("deadargelim", DeadArgumentEliminationPass())
51 MODULE_PASS("elim-avail-extern", EliminateAvailableExternallyPass())
52 MODULE_PASS("forceattrs", ForceFunctionAttrsPass())
53 MODULE_PASS("function-import", FunctionImportPass())
54 MODULE_PASS("globaldce", GlobalDCEPass())
55 MODULE_PASS("globalopt", GlobalOptPass())
56 MODULE_PASS("globalsplit", GlobalSplitPass())
57 MODULE_PASS("hotcoldsplit", HotColdSplittingPass())
58 MODULE_PASS("hwasan", HWAddressSanitizerPass(false, false))
59 MODULE_PASS("khwasan", HWAddressSanitizerPass(true, true))
60 MODULE_PASS("inferattrs", InferFunctionAttrsPass())
61 MODULE_PASS("insert-gcov-profiling", GCOVProfilerPass())
62 MODULE_PASS("instrorderfile", InstrOrderFilePass())
63 MODULE_PASS("instrprof", InstrProfiling())
64 MODULE_PASS("internalize", InternalizePass())
65 MODULE_PASS("invalidate<all>", InvalidateAllAnalysesPass())
66 MODULE_PASS("ipsccp", IPSCCPPass())
67 MODULE_PASS("lowertypetests", LowerTypeTestsPass(nullptr, nullptr))
68 MODULE_PASS("name-anon-globals", NameAnonGlobalPass())
69 MODULE_PASS("no-op-module", NoOpModulePass())
70 MODULE_PASS("partial-inliner", PartialInlinerPass())
71 MODULE_PASS("pgo-icall-prom", PGOIndirectCallPromotion())
72 MODULE_PASS("pgo-instr-gen", PGOInstrumentationGen())
73 MODULE_PASS("pgo-instr-use", PGOInstrumentationUse())
74 MODULE_PASS("pre-isel-intrinsic-lowering", PreISelIntrinsicLoweringPass())
75 MODULE_PASS("print-profile-summary", ProfileSummaryPrinterPass(dbgs()))
76 MODULE_PASS("print-callgraph", CallGraphPrinterPass(dbgs()))
77 MODULE_PASS("print", PrintModulePass(dbgs()))
78 MODULE_PASS("print-lcg", LazyCallGraphPrinterPass(dbgs()))
79 MODULE_PASS("print-lcg-dot", LazyCallGraphDOTPrinterPass(dbgs()))
80 MODULE_PASS("print-stack-safety", StackSafetyGlobalPrinterPass(dbgs()))
81 MODULE_PASS("rewrite-statepoints-for-gc", RewriteStatepointsForGC())
82 MODULE_PASS("rewrite-symbols", RewriteSymbolPass())
83 MODULE_PASS("rpo-functionattrs", ReversePostOrderFunctionAttrsPass())
84 MODULE_PASS("sample-profile", SampleProfileLoaderPass())
85 MODULE_PASS("strip-dead-prototypes", StripDeadPrototypesPass())
86 MODULE_PASS("synthetic-counts-propagation", SyntheticCountsPropagation())
87 MODULE_PASS("wholeprogramdevirt", WholeProgramDevirtPass(nullptr, nullptr))
88 MODULE_PASS("verify", VerifierPass())
89 MODULE_PASS("asan-module", ModuleAddressSanitizerPass(/*CompileKernel=*/false, false, true, false))
90 MODULE_PASS("kasan-module", ModuleAddressSanitizerPass(/*CompileKernel=*/true, false, true, false))
91 MODULE_PASS("sancov-module", ModuleSanitizerCoveragePass())
92 MODULE_PASS("poison-checking", PoisonCheckingPass())
93 #undef MODULE_PASS
95 #ifndef CGSCC_ANALYSIS
96 #define CGSCC_ANALYSIS(NAME, CREATE_PASS)
97 #endif
98 CGSCC_ANALYSIS("no-op-cgscc", NoOpCGSCCAnalysis())
99 CGSCC_ANALYSIS("fam-proxy", FunctionAnalysisManagerCGSCCProxy())
100 CGSCC_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis(PIC))
101 #undef CGSCC_ANALYSIS
103 #ifndef CGSCC_PASS
104 #define CGSCC_PASS(NAME, CREATE_PASS)
105 #endif
106 CGSCC_PASS("argpromotion", ArgumentPromotionPass())
107 CGSCC_PASS("invalidate<all>", InvalidateAllAnalysesPass())
108 CGSCC_PASS("function-attrs", PostOrderFunctionAttrsPass())
109 CGSCC_PASS("inline", InlinerPass())
110 CGSCC_PASS("no-op-cgscc", NoOpCGSCCPass())
111 #undef CGSCC_PASS
113 #ifndef FUNCTION_ANALYSIS
114 #define FUNCTION_ANALYSIS(NAME, CREATE_PASS)
115 #endif
116 FUNCTION_ANALYSIS("aa", AAManager())
117 FUNCTION_ANALYSIS("assumptions", AssumptionAnalysis())
118 FUNCTION_ANALYSIS("block-freq", BlockFrequencyAnalysis())
119 FUNCTION_ANALYSIS("branch-prob", BranchProbabilityAnalysis())
120 FUNCTION_ANALYSIS("domtree", DominatorTreeAnalysis())
121 FUNCTION_ANALYSIS("postdomtree", PostDominatorTreeAnalysis())
122 FUNCTION_ANALYSIS("demanded-bits", DemandedBitsAnalysis())
123 FUNCTION_ANALYSIS("domfrontier", DominanceFrontierAnalysis())
124 FUNCTION_ANALYSIS("loops", LoopAnalysis())
125 FUNCTION_ANALYSIS("lazy-value-info", LazyValueAnalysis())
126 FUNCTION_ANALYSIS("da", DependenceAnalysis())
127 FUNCTION_ANALYSIS("memdep", MemoryDependenceAnalysis())
128 FUNCTION_ANALYSIS("memoryssa", MemorySSAAnalysis())
129 FUNCTION_ANALYSIS("phi-values", PhiValuesAnalysis())
130 FUNCTION_ANALYSIS("regions", RegionInfoAnalysis())
131 FUNCTION_ANALYSIS("no-op-function", NoOpFunctionAnalysis())
132 FUNCTION_ANALYSIS("opt-remark-emit", OptimizationRemarkEmitterAnalysis())
133 FUNCTION_ANALYSIS("scalar-evolution", ScalarEvolutionAnalysis())
134 FUNCTION_ANALYSIS("stack-safety-local", StackSafetyAnalysis())
135 FUNCTION_ANALYSIS("targetlibinfo", TargetLibraryAnalysis())
136 FUNCTION_ANALYSIS("targetir",
137 TM ? TM->getTargetIRAnalysis() : TargetIRAnalysis())
138 FUNCTION_ANALYSIS("verify", VerifierAnalysis())
139 FUNCTION_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis(PIC))
141 #ifndef FUNCTION_ALIAS_ANALYSIS
142 #define FUNCTION_ALIAS_ANALYSIS(NAME, CREATE_PASS) \
143 FUNCTION_ANALYSIS(NAME, CREATE_PASS)
144 #endif
145 FUNCTION_ALIAS_ANALYSIS("basic-aa", BasicAA())
146 FUNCTION_ALIAS_ANALYSIS("cfl-anders-aa", CFLAndersAA())
147 FUNCTION_ALIAS_ANALYSIS("cfl-steens-aa", CFLSteensAA())
148 FUNCTION_ALIAS_ANALYSIS("scev-aa", SCEVAA())
149 FUNCTION_ALIAS_ANALYSIS("scoped-noalias-aa", ScopedNoAliasAA())
150 FUNCTION_ALIAS_ANALYSIS("type-based-aa", TypeBasedAA())
151 #undef FUNCTION_ALIAS_ANALYSIS
152 #undef FUNCTION_ANALYSIS
154 #ifndef FUNCTION_PASS
155 #define FUNCTION_PASS(NAME, CREATE_PASS)
156 #endif
157 FUNCTION_PASS("aa-eval", AAEvaluator())
158 FUNCTION_PASS("adce", ADCEPass())
159 FUNCTION_PASS("add-discriminators", AddDiscriminatorsPass())
160 FUNCTION_PASS("aggressive-instcombine", AggressiveInstCombinePass())
161 FUNCTION_PASS("alignment-from-assumptions", AlignmentFromAssumptionsPass())
162 FUNCTION_PASS("bdce", BDCEPass())
163 FUNCTION_PASS("bounds-checking", BoundsCheckingPass())
164 FUNCTION_PASS("break-crit-edges", BreakCriticalEdgesPass())
165 FUNCTION_PASS("callsite-splitting", CallSiteSplittingPass())
166 FUNCTION_PASS("consthoist", ConstantHoistingPass())
167 FUNCTION_PASS("chr", ControlHeightReductionPass())
168 FUNCTION_PASS("correlated-propagation", CorrelatedValuePropagationPass())
169 FUNCTION_PASS("dce", DCEPass())
170 FUNCTION_PASS("div-rem-pairs", DivRemPairsPass())
171 FUNCTION_PASS("dse", DSEPass())
172 FUNCTION_PASS("dot-cfg", CFGPrinterPass())
173 FUNCTION_PASS("dot-cfg-only", CFGOnlyPrinterPass())
174 FUNCTION_PASS("early-cse", EarlyCSEPass(/*UseMemorySSA=*/false))
175 FUNCTION_PASS("early-cse-memssa", EarlyCSEPass(/*UseMemorySSA=*/true))
176 FUNCTION_PASS("ee-instrument", EntryExitInstrumenterPass(/*PostInlining=*/false))
177 FUNCTION_PASS("make-guards-explicit", MakeGuardsExplicitPass())
178 FUNCTION_PASS("post-inline-ee-instrument", EntryExitInstrumenterPass(/*PostInlining=*/true))
179 FUNCTION_PASS("gvn-hoist", GVNHoistPass())
180 FUNCTION_PASS("instcombine", InstCombinePass())
181 FUNCTION_PASS("instsimplify", InstSimplifyPass())
182 FUNCTION_PASS("invalidate<all>", InvalidateAllAnalysesPass())
183 FUNCTION_PASS("float2int", Float2IntPass())
184 FUNCTION_PASS("no-op-function", NoOpFunctionPass())
185 FUNCTION_PASS("libcalls-shrinkwrap", LibCallsShrinkWrapPass())
186 FUNCTION_PASS("loweratomic", LowerAtomicPass())
187 FUNCTION_PASS("lower-expect", LowerExpectIntrinsicPass())
188 FUNCTION_PASS("lower-guard-intrinsic", LowerGuardIntrinsicPass())
189 FUNCTION_PASS("lower-widenable-condition", LowerWidenableConditionPass())
190 FUNCTION_PASS("guard-widening", GuardWideningPass())
191 FUNCTION_PASS("gvn", GVN())
192 FUNCTION_PASS("load-store-vectorizer", LoadStoreVectorizerPass())
193 FUNCTION_PASS("loop-simplify", LoopSimplifyPass())
194 FUNCTION_PASS("loop-sink", LoopSinkPass())
195 FUNCTION_PASS("lowerinvoke", LowerInvokePass())
196 FUNCTION_PASS("mem2reg", PromotePass())
197 FUNCTION_PASS("memcpyopt", MemCpyOptPass())
198 FUNCTION_PASS("mergeicmps", MergeICmpsPass())
199 FUNCTION_PASS("mldst-motion", MergedLoadStoreMotionPass())
200 FUNCTION_PASS("nary-reassociate", NaryReassociatePass())
201 FUNCTION_PASS("newgvn", NewGVNPass())
202 FUNCTION_PASS("jump-threading", JumpThreadingPass())
203 FUNCTION_PASS("partially-inline-libcalls", PartiallyInlineLibCallsPass())
204 FUNCTION_PASS("lcssa", LCSSAPass())
205 FUNCTION_PASS("loop-data-prefetch", LoopDataPrefetchPass())
206 FUNCTION_PASS("loop-load-elim", LoopLoadEliminationPass())
207 FUNCTION_PASS("loop-fuse", LoopFusePass())
208 FUNCTION_PASS("loop-distribute", LoopDistributePass())
209 FUNCTION_PASS("pgo-memop-opt", PGOMemOPSizeOpt())
210 FUNCTION_PASS("print", PrintFunctionPass(dbgs()))
211 FUNCTION_PASS("print<assumptions>", AssumptionPrinterPass(dbgs()))
212 FUNCTION_PASS("print<block-freq>", BlockFrequencyPrinterPass(dbgs()))
213 FUNCTION_PASS("print<branch-prob>", BranchProbabilityPrinterPass(dbgs()))
214 FUNCTION_PASS("print<da>", DependenceAnalysisPrinterPass(dbgs()))
215 FUNCTION_PASS("print<domtree>", DominatorTreePrinterPass(dbgs()))
216 FUNCTION_PASS("print<postdomtree>", PostDominatorTreePrinterPass(dbgs()))
217 FUNCTION_PASS("print<demanded-bits>", DemandedBitsPrinterPass(dbgs()))
218 FUNCTION_PASS("print<domfrontier>", DominanceFrontierPrinterPass(dbgs()))
219 FUNCTION_PASS("print<loops>", LoopPrinterPass(dbgs()))
220 FUNCTION_PASS("print<memoryssa>", MemorySSAPrinterPass(dbgs()))
221 FUNCTION_PASS("print<phi-values>", PhiValuesPrinterPass(dbgs()))
222 FUNCTION_PASS("print<regions>", RegionInfoPrinterPass(dbgs()))
223 FUNCTION_PASS("print<scalar-evolution>", ScalarEvolutionPrinterPass(dbgs()))
224 FUNCTION_PASS("print<stack-safety-local>", StackSafetyPrinterPass(dbgs()))
225 FUNCTION_PASS("reassociate", ReassociatePass())
226 FUNCTION_PASS("scalarizer", ScalarizerPass())
227 FUNCTION_PASS("sccp", SCCPPass())
228 FUNCTION_PASS("sink", SinkingPass())
229 FUNCTION_PASS("slp-vectorizer", SLPVectorizerPass())
230 FUNCTION_PASS("speculative-execution", SpeculativeExecutionPass())
231 FUNCTION_PASS("spec-phis", SpeculateAroundPHIsPass())
232 FUNCTION_PASS("sroa", SROA())
233 FUNCTION_PASS("tailcallelim", TailCallElimPass())
234 FUNCTION_PASS("unreachableblockelim", UnreachableBlockElimPass())
235 FUNCTION_PASS("verify", VerifierPass())
236 FUNCTION_PASS("verify<domtree>", DominatorTreeVerifierPass())
237 FUNCTION_PASS("verify<loops>", LoopVerifierPass())
238 FUNCTION_PASS("verify<memoryssa>", MemorySSAVerifierPass())
239 FUNCTION_PASS("verify<regions>", RegionInfoVerifierPass())
240 FUNCTION_PASS("verify<safepoint-ir>", SafepointIRVerifierPass())
241 FUNCTION_PASS("view-cfg", CFGViewerPass())
242 FUNCTION_PASS("view-cfg-only", CFGOnlyViewerPass())
243 FUNCTION_PASS("transform-warning", WarnMissedTransformationsPass())
244 FUNCTION_PASS("asan", AddressSanitizerPass(false, false, false))
245 FUNCTION_PASS("kasan", AddressSanitizerPass(true, false, false))
246 FUNCTION_PASS("msan", MemorySanitizerPass({}))
247 FUNCTION_PASS("kmsan", MemorySanitizerPass({0, false, /*Kernel=*/true}))
248 FUNCTION_PASS("tsan", ThreadSanitizerPass())
249 #undef FUNCTION_PASS
251 #ifndef FUNCTION_PASS_WITH_PARAMS
252 #define FUNCTION_PASS_WITH_PARAMS(NAME, CREATE_PASS, PARSER)
253 #endif
254 FUNCTION_PASS_WITH_PARAMS("unroll",
255 [](LoopUnrollOptions Opts) {
256 return LoopUnrollPass(Opts);
258 parseLoopUnrollOptions)
259 FUNCTION_PASS_WITH_PARAMS("msan",
260 [](MemorySanitizerOptions Opts) {
261 return MemorySanitizerPass(Opts);
263 parseMSanPassOptions)
264 FUNCTION_PASS_WITH_PARAMS("simplify-cfg",
265 [](SimplifyCFGOptions Opts) {
266 return SimplifyCFGPass(Opts);
268 parseSimplifyCFGOptions)
269 FUNCTION_PASS_WITH_PARAMS("loop-vectorize",
270 [](LoopVectorizeOptions Opts) {
271 return LoopVectorizePass(Opts);
273 parseLoopVectorizeOptions)
274 #undef FUNCTION_PASS_WITH_PARAMS
276 #ifndef LOOP_ANALYSIS
277 #define LOOP_ANALYSIS(NAME, CREATE_PASS)
278 #endif
279 LOOP_ANALYSIS("no-op-loop", NoOpLoopAnalysis())
280 LOOP_ANALYSIS("access-info", LoopAccessAnalysis())
281 LOOP_ANALYSIS("ivusers", IVUsersAnalysis())
282 LOOP_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis(PIC))
283 #undef LOOP_ANALYSIS
285 #ifndef LOOP_PASS
286 #define LOOP_PASS(NAME, CREATE_PASS)
287 #endif
288 LOOP_PASS("invalidate<all>", InvalidateAllAnalysesPass())
289 LOOP_PASS("licm", LICMPass())
290 LOOP_PASS("loop-idiom", LoopIdiomRecognizePass())
291 LOOP_PASS("loop-instsimplify", LoopInstSimplifyPass())
292 LOOP_PASS("rotate", LoopRotatePass())
293 LOOP_PASS("no-op-loop", NoOpLoopPass())
294 LOOP_PASS("print", PrintLoopPass(dbgs()))
295 LOOP_PASS("loop-deletion", LoopDeletionPass())
296 LOOP_PASS("simplify-cfg", LoopSimplifyCFGPass())
297 LOOP_PASS("strength-reduce", LoopStrengthReducePass())
298 LOOP_PASS("indvars", IndVarSimplifyPass())
299 LOOP_PASS("irce", IRCEPass())
300 LOOP_PASS("unroll-and-jam", LoopUnrollAndJamPass())
301 LOOP_PASS("unroll-full", LoopFullUnrollPass())
302 LOOP_PASS("print-access-info", LoopAccessInfoPrinterPass(dbgs()))
303 LOOP_PASS("print<ivusers>", IVUsersPrinterPass(dbgs()))
304 LOOP_PASS("print<loop-cache-cost>", LoopCachePrinterPass(dbgs()))
305 LOOP_PASS("loop-predication", LoopPredicationPass())
306 LOOP_PASS("guard-widening", GuardWideningPass())
307 #undef LOOP_PASS
309 #ifndef LOOP_PASS_WITH_PARAMS
310 #define LOOP_PASS_WITH_PARAMS(NAME, CREATE_PASS, PARSER)
311 #endif
312 LOOP_PASS_WITH_PARAMS("unswitch",
313 [](bool NonTrivial) {
314 return SimpleLoopUnswitchPass(NonTrivial);
316 parseLoopUnswitchOptions)
317 #undef LOOP_PASS_WITH_PARAMS