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