867a3ec634a9e2df154970f3d924ab0afbdf5507
[lldb.git] / llvm / lib / Passes / PassRegistry.def
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.
13 //
14 //===----------------------------------------------------------------------===//
15
16 // NOTE: NO INCLUDE GUARD DESIRED!
17
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())
30 MODULE_ANALYSIS("inline-advisor", InlineAdvisorAnalysis())
31 MODULE_ANALYSIS("ir-similarity", IRSimilarityAnalysis())
32
33 #ifndef MODULE_ALIAS_ANALYSIS
34 #define MODULE_ALIAS_ANALYSIS(NAME, CREATE_PASS)                               \
35   MODULE_ANALYSIS(NAME, CREATE_PASS)
36 #endif
37 MODULE_ALIAS_ANALYSIS("globals-aa", GlobalsAA())
38 #undef MODULE_ALIAS_ANALYSIS
39 #undef MODULE_ANALYSIS
40
41 #ifndef MODULE_PASS
42 #define MODULE_PASS(NAME, CREATE_PASS)
43 #endif
44 MODULE_PASS("always-inline", AlwaysInlinerPass())
45 MODULE_PASS("attributor", AttributorPass())
46 MODULE_PASS("called-value-propagation", CalledValuePropagationPass())
47 MODULE_PASS("canonicalize-aliases", CanonicalizeAliasesPass())
48 MODULE_PASS("cg-profile", CGProfilePass())
49 MODULE_PASS("constmerge", ConstantMergePass())
50 MODULE_PASS("cross-dso-cfi", CrossDSOCFIPass())
51 MODULE_PASS("deadargelim", DeadArgumentEliminationPass())
52 MODULE_PASS("elim-avail-extern", EliminateAvailableExternallyPass())
53 MODULE_PASS("forceattrs", ForceFunctionAttrsPass())
54 MODULE_PASS("function-import", FunctionImportPass())
55 MODULE_PASS("globaldce", GlobalDCEPass())
56 MODULE_PASS("globalopt", GlobalOptPass())
57 MODULE_PASS("globalsplit", GlobalSplitPass())
58 MODULE_PASS("hotcoldsplit", HotColdSplittingPass())
59 MODULE_PASS("hwasan", HWAddressSanitizerPass(false, false))
60 MODULE_PASS("khwasan", HWAddressSanitizerPass(true, true))
61 MODULE_PASS("inferattrs", InferFunctionAttrsPass())
62 MODULE_PASS("inliner-wrapper", ModuleInlinerWrapperPass())
63 MODULE_PASS("insert-gcov-profiling", GCOVProfilerPass())
64 MODULE_PASS("instrorderfile", InstrOrderFilePass())
65 MODULE_PASS("instrprof", InstrProfiling())
66 MODULE_PASS("internalize", InternalizePass())
67 MODULE_PASS("invalidate<all>", InvalidateAllAnalysesPass())
68 MODULE_PASS("ipsccp", IPSCCPPass())
69 MODULE_PASS("print-ir-similarity", IRSimilarityAnalysisPrinterPass(dbgs()))
70 MODULE_PASS("lowertypetests", LowerTypeTestsPass())
71 MODULE_PASS("metarenamer", MetaRenamerPass())
72 MODULE_PASS("mergefunc", MergeFunctionsPass())
73 MODULE_PASS("name-anon-globals", NameAnonGlobalPass())
74 MODULE_PASS("no-op-module", NoOpModulePass())
75 MODULE_PASS("objc-arc", ObjCARCOptPass())
76 MODULE_PASS("objc-arc-contract", ObjCARCContractPass())
77 MODULE_PASS("partial-inliner", PartialInlinerPass())
78 MODULE_PASS("pgo-icall-prom", PGOIndirectCallPromotion())
79 MODULE_PASS("pgo-instr-gen", PGOInstrumentationGen())
80 MODULE_PASS("pgo-instr-use", PGOInstrumentationUse())
81 MODULE_PASS("print-profile-summary", ProfileSummaryPrinterPass(dbgs()))
82 MODULE_PASS("print-callgraph", CallGraphPrinterPass(dbgs()))
83 MODULE_PASS("print", PrintModulePass(dbgs()))
84 MODULE_PASS("print-lcg", LazyCallGraphPrinterPass(dbgs()))
85 MODULE_PASS("print-lcg-dot", LazyCallGraphDOTPrinterPass(dbgs()))
86 MODULE_PASS("print-stack-safety", StackSafetyGlobalPrinterPass(dbgs()))
87 MODULE_PASS("rewrite-statepoints-for-gc", RewriteStatepointsForGC())
88 MODULE_PASS("rewrite-symbols", RewriteSymbolPass())
89 MODULE_PASS("rpo-function-attrs", ReversePostOrderFunctionAttrsPass())
90 MODULE_PASS("sample-profile", SampleProfileLoaderPass())
91 MODULE_PASS("scc-oz-module-inliner",
92   buildInlinerPipeline(OptimizationLevel::Oz, ThinLTOPhase::None, DebugLogging))
93 MODULE_PASS("oz-module-optimizer",
94   buildModuleOptimizationPipeline(OptimizationLevel::Oz, DebugLogging, /*LTOPreLink*/false))
95 MODULE_PASS("strip", StripSymbolsPass())
96 MODULE_PASS("strip-dead-debug-info", StripDeadDebugInfoPass())
97 MODULE_PASS("strip-dead-prototypes", StripDeadPrototypesPass())
98 MODULE_PASS("strip-debug-declare", StripDebugDeclarePass())
99 MODULE_PASS("strip-nondebug", StripNonDebugSymbolsPass())
100 MODULE_PASS("synthetic-counts-propagation", SyntheticCountsPropagation())
101 MODULE_PASS("wholeprogramdevirt", WholeProgramDevirtPass())
102 MODULE_PASS("verify", VerifierPass())
103 MODULE_PASS("dfsan", DataFlowSanitizerPass())
104 MODULE_PASS("asan-module", ModuleAddressSanitizerPass(/*CompileKernel=*/false, false, true, false))
105 MODULE_PASS("msan-module", MemorySanitizerPass({}))
106 MODULE_PASS("tsan-module", ThreadSanitizerPass())
107 MODULE_PASS("kasan-module", ModuleAddressSanitizerPass(/*CompileKernel=*/true, false, true, false))
108 MODULE_PASS("sancov-module", ModuleSanitizerCoveragePass())
109 MODULE_PASS("memprof-module", ModuleMemProfilerPass())
110 MODULE_PASS("poison-checking", PoisonCheckingPass())
111 #undef MODULE_PASS
112
113 #ifndef CGSCC_ANALYSIS
114 #define CGSCC_ANALYSIS(NAME, CREATE_PASS)
115 #endif
116 CGSCC_ANALYSIS("no-op-cgscc", NoOpCGSCCAnalysis())
117 CGSCC_ANALYSIS("fam-proxy", FunctionAnalysisManagerCGSCCProxy())
118 CGSCC_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis(PIC))
119 #undef CGSCC_ANALYSIS
120
121 #ifndef CGSCC_PASS
122 #define CGSCC_PASS(NAME, CREATE_PASS)
123 #endif
124 CGSCC_PASS("argpromotion", ArgumentPromotionPass())
125 CGSCC_PASS("invalidate<all>", InvalidateAllAnalysesPass())
126 CGSCC_PASS("function-attrs", PostOrderFunctionAttrsPass())
127 CGSCC_PASS("attributor-cgscc", AttributorCGSCCPass())
128 CGSCC_PASS("inline", InlinerPass())
129 CGSCC_PASS("openmpopt", OpenMPOptPass())
130 CGSCC_PASS("coro-split", CoroSplitPass())
131 CGSCC_PASS("no-op-cgscc", NoOpCGSCCPass())
132 #undef CGSCC_PASS
133
134 #ifndef FUNCTION_ANALYSIS
135 #define FUNCTION_ANALYSIS(NAME, CREATE_PASS)
136 #endif
137 FUNCTION_ANALYSIS("aa", AAManager())
138 FUNCTION_ANALYSIS("assumptions", AssumptionAnalysis())
139 FUNCTION_ANALYSIS("block-freq", BlockFrequencyAnalysis())
140 FUNCTION_ANALYSIS("branch-prob", BranchProbabilityAnalysis())
141 FUNCTION_ANALYSIS("domtree", DominatorTreeAnalysis())
142 FUNCTION_ANALYSIS("postdomtree", PostDominatorTreeAnalysis())
143 FUNCTION_ANALYSIS("demanded-bits", DemandedBitsAnalysis())
144 FUNCTION_ANALYSIS("domfrontier", DominanceFrontierAnalysis())
145 FUNCTION_ANALYSIS("func-properties", FunctionPropertiesAnalysis())
146 FUNCTION_ANALYSIS("loops", LoopAnalysis())
147 FUNCTION_ANALYSIS("lazy-value-info", LazyValueAnalysis())
148 FUNCTION_ANALYSIS("da", DependenceAnalysis())
149 FUNCTION_ANALYSIS("inliner-size-estimator", InlineSizeEstimatorAnalysis())
150 FUNCTION_ANALYSIS("memdep", MemoryDependenceAnalysis())
151 FUNCTION_ANALYSIS("memoryssa", MemorySSAAnalysis())
152 FUNCTION_ANALYSIS("phi-values", PhiValuesAnalysis())
153 FUNCTION_ANALYSIS("regions", RegionInfoAnalysis())
154 FUNCTION_ANALYSIS("no-op-function", NoOpFunctionAnalysis())
155 FUNCTION_ANALYSIS("opt-remark-emit", OptimizationRemarkEmitterAnalysis())
156 FUNCTION_ANALYSIS("scalar-evolution", ScalarEvolutionAnalysis())
157 FUNCTION_ANALYSIS("stack-safety-local", StackSafetyAnalysis())
158 FUNCTION_ANALYSIS("targetlibinfo", TargetLibraryAnalysis())
159 FUNCTION_ANALYSIS("targetir",
160                   TM ? TM->getTargetIRAnalysis() : TargetIRAnalysis())
161 FUNCTION_ANALYSIS("verify", VerifierAnalysis())
162 FUNCTION_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis(PIC))
163
164 #ifndef FUNCTION_ALIAS_ANALYSIS
165 #define FUNCTION_ALIAS_ANALYSIS(NAME, CREATE_PASS)                             \
166   FUNCTION_ANALYSIS(NAME, CREATE_PASS)
167 #endif
168 FUNCTION_ALIAS_ANALYSIS("basic-aa", BasicAA())
169 FUNCTION_ALIAS_ANALYSIS("cfl-anders-aa", CFLAndersAA())
170 FUNCTION_ALIAS_ANALYSIS("cfl-steens-aa", CFLSteensAA())
171 FUNCTION_ALIAS_ANALYSIS("objc-arc-aa", objcarc::ObjCARCAA())
172 FUNCTION_ALIAS_ANALYSIS("scev-aa", SCEVAA())
173 FUNCTION_ALIAS_ANALYSIS("scoped-noalias-aa", ScopedNoAliasAA())
174 FUNCTION_ALIAS_ANALYSIS("tbaa", TypeBasedAA())
175 #undef FUNCTION_ALIAS_ANALYSIS
176 #undef FUNCTION_ANALYSIS
177
178 #ifndef FUNCTION_PASS
179 #define FUNCTION_PASS(NAME, CREATE_PASS)
180 #endif
181 FUNCTION_PASS("aa-eval", AAEvaluator())
182 FUNCTION_PASS("adce", ADCEPass())
183 FUNCTION_PASS("add-discriminators", AddDiscriminatorsPass())
184 FUNCTION_PASS("aggressive-instcombine", AggressiveInstCombinePass())
185 FUNCTION_PASS("assume-builder", AssumeBuilderPass())
186 FUNCTION_PASS("assume-simplify", AssumeSimplifyPass())
187 FUNCTION_PASS("alignment-from-assumptions", AlignmentFromAssumptionsPass())
188 FUNCTION_PASS("bdce", BDCEPass())
189 FUNCTION_PASS("bounds-checking", BoundsCheckingPass())
190 FUNCTION_PASS("break-crit-edges", BreakCriticalEdgesPass())
191 FUNCTION_PASS("callsite-splitting", CallSiteSplittingPass())
192 FUNCTION_PASS("consthoist", ConstantHoistingPass())
193 FUNCTION_PASS("constraint-elimination", ConstraintEliminationPass())
194 FUNCTION_PASS("chr", ControlHeightReductionPass())
195 FUNCTION_PASS("coro-early", CoroEarlyPass())
196 FUNCTION_PASS("coro-elide", CoroElidePass())
197 FUNCTION_PASS("coro-cleanup", CoroCleanupPass())
198 FUNCTION_PASS("correlated-propagation", CorrelatedValuePropagationPass())
199 FUNCTION_PASS("dce", DCEPass())
200 FUNCTION_PASS("div-rem-pairs", DivRemPairsPass())
201 FUNCTION_PASS("dse", DSEPass())
202 FUNCTION_PASS("dot-cfg", CFGPrinterPass())
203 FUNCTION_PASS("dot-cfg-only", CFGOnlyPrinterPass())
204 FUNCTION_PASS("early-cse", EarlyCSEPass(/*UseMemorySSA=*/false))
205 FUNCTION_PASS("early-cse-memssa", EarlyCSEPass(/*UseMemorySSA=*/true))
206 FUNCTION_PASS("ee-instrument", EntryExitInstrumenterPass(/*PostInlining=*/false))
207 FUNCTION_PASS("make-guards-explicit", MakeGuardsExplicitPass())
208 FUNCTION_PASS("post-inline-ee-instrument", EntryExitInstrumenterPass(/*PostInlining=*/true))
209 FUNCTION_PASS("gvn-hoist", GVNHoistPass())
210 FUNCTION_PASS("gvn-sink", GVNSinkPass())
211 FUNCTION_PASS("helloworld", HelloWorldPass())
212 FUNCTION_PASS("instcombine", InstCombinePass())
213 FUNCTION_PASS("instcount", InstCountPass())
214 FUNCTION_PASS("instsimplify", InstSimplifyPass())
215 FUNCTION_PASS("invalidate<all>", InvalidateAllAnalysesPass())
216 FUNCTION_PASS("irce", IRCEPass())
217 FUNCTION_PASS("float2int", Float2IntPass())
218 FUNCTION_PASS("no-op-function", NoOpFunctionPass())
219 FUNCTION_PASS("libcalls-shrinkwrap", LibCallsShrinkWrapPass())
220 FUNCTION_PASS("lint", LintPass())
221 FUNCTION_PASS("inject-tli-mappings", InjectTLIMappings())
222 FUNCTION_PASS("loweratomic", LowerAtomicPass())
223 FUNCTION_PASS("lower-expect", LowerExpectIntrinsicPass())
224 FUNCTION_PASS("lower-guard-intrinsic", LowerGuardIntrinsicPass())
225 FUNCTION_PASS("lower-constant-intrinsics", LowerConstantIntrinsicsPass())
226 FUNCTION_PASS("lower-matrix-intrinsics", LowerMatrixIntrinsicsPass())
227 FUNCTION_PASS("lower-widenable-condition", LowerWidenableConditionPass())
228 FUNCTION_PASS("guard-widening", GuardWideningPass())
229 FUNCTION_PASS("load-store-vectorizer", LoadStoreVectorizerPass())
230 FUNCTION_PASS("loop-simplify", LoopSimplifyPass())
231 FUNCTION_PASS("loop-sink", LoopSinkPass())
232 FUNCTION_PASS("loop-unroll-and-jam", LoopUnrollAndJamPass())
233 FUNCTION_PASS("lowerinvoke", LowerInvokePass())
234 FUNCTION_PASS("lowerswitch", LowerSwitchPass())
235 FUNCTION_PASS("mem2reg", PromotePass())
236 FUNCTION_PASS("memcpyopt", MemCpyOptPass())
237 FUNCTION_PASS("mergeicmps", MergeICmpsPass())
238 FUNCTION_PASS("nary-reassociate", NaryReassociatePass())
239 FUNCTION_PASS("newgvn", NewGVNPass())
240 FUNCTION_PASS("jump-threading", JumpThreadingPass())
241 FUNCTION_PASS("partially-inline-libcalls", PartiallyInlineLibCallsPass())
242 FUNCTION_PASS("lcssa", LCSSAPass())
243 FUNCTION_PASS("loop-data-prefetch", LoopDataPrefetchPass())
244 FUNCTION_PASS("loop-load-elim", LoopLoadEliminationPass())
245 FUNCTION_PASS("loop-fusion", LoopFusePass())
246 FUNCTION_PASS("loop-distribute", LoopDistributePass())
247 FUNCTION_PASS("loop-versioning", LoopVersioningPass())
248 FUNCTION_PASS("pgo-memop-opt", PGOMemOPSizeOpt())
249 FUNCTION_PASS("print", PrintFunctionPass(dbgs()))
250 FUNCTION_PASS("print<assumptions>", AssumptionPrinterPass(dbgs()))
251 FUNCTION_PASS("print<block-freq>", BlockFrequencyPrinterPass(dbgs()))
252 FUNCTION_PASS("print<branch-prob>", BranchProbabilityPrinterPass(dbgs()))
253 FUNCTION_PASS("print<da>", DependenceAnalysisPrinterPass(dbgs()))
254 FUNCTION_PASS("print<domtree>", DominatorTreePrinterPass(dbgs()))
255 FUNCTION_PASS("print<postdomtree>", PostDominatorTreePrinterPass(dbgs()))
256 FUNCTION_PASS("print<delinearization>", DelinearizationPrinterPass(dbgs()))
257 FUNCTION_PASS("print<demanded-bits>", DemandedBitsPrinterPass(dbgs()))
258 FUNCTION_PASS("print<domfrontier>", DominanceFrontierPrinterPass(dbgs()))
259 FUNCTION_PASS("print<func-properties>", FunctionPropertiesPrinterPass(dbgs()))
260 FUNCTION_PASS("print<inline-cost>", InlineCostAnnotationPrinterPass(dbgs()))
261 FUNCTION_PASS("print<inliner-size-estimator>", 
262   InlineSizeEstimatorAnalysisPrinterPass(dbgs()))
263 FUNCTION_PASS("print<loops>", LoopPrinterPass(dbgs()))
264 FUNCTION_PASS("print<memoryssa>", MemorySSAPrinterPass(dbgs()))
265 FUNCTION_PASS("print<phi-values>", PhiValuesPrinterPass(dbgs()))
266 FUNCTION_PASS("print<regions>", RegionInfoPrinterPass(dbgs()))
267 FUNCTION_PASS("print<scalar-evolution>", ScalarEvolutionPrinterPass(dbgs()))
268 FUNCTION_PASS("print<stack-safety-local>", StackSafetyPrinterPass(dbgs()))
269 // TODO: rename to print<alias-sets> after NPM switch
270 FUNCTION_PASS("print-alias-sets", AliasSetsPrinterPass(dbgs()))
271 FUNCTION_PASS("print-predicateinfo", PredicateInfoPrinterPass(dbgs()))
272 FUNCTION_PASS("reassociate", ReassociatePass())
273 FUNCTION_PASS("scalarizer", ScalarizerPass())
274 FUNCTION_PASS("sccp", SCCPPass())
275 FUNCTION_PASS("simplifycfg", SimplifyCFGPass())
276 FUNCTION_PASS("sink", SinkingPass())
277 FUNCTION_PASS("slp-vectorizer", SLPVectorizerPass())
278 FUNCTION_PASS("speculative-execution", SpeculativeExecutionPass())
279 FUNCTION_PASS("spec-phis", SpeculateAroundPHIsPass())
280 FUNCTION_PASS("sroa", SROA())
281 FUNCTION_PASS("tailcallelim", TailCallElimPass())
282 FUNCTION_PASS("vector-combine", VectorCombinePass())
283 FUNCTION_PASS("verify", VerifierPass())
284 FUNCTION_PASS("verify<domtree>", DominatorTreeVerifierPass())
285 FUNCTION_PASS("verify<loops>", LoopVerifierPass())
286 FUNCTION_PASS("verify<memoryssa>", MemorySSAVerifierPass())
287 FUNCTION_PASS("verify<regions>", RegionInfoVerifierPass())
288 FUNCTION_PASS("verify<safepoint-ir>", SafepointIRVerifierPass())
289 FUNCTION_PASS("verify<scalar-evolution>", ScalarEvolutionVerifierPass())
290 FUNCTION_PASS("view-cfg", CFGViewerPass())
291 FUNCTION_PASS("view-cfg-only", CFGOnlyViewerPass())
292 FUNCTION_PASS("transform-warning", WarnMissedTransformationsPass())
293 FUNCTION_PASS("asan", AddressSanitizerPass(false, false, false))
294 FUNCTION_PASS("kasan", AddressSanitizerPass(true, false, false))
295 FUNCTION_PASS("msan", MemorySanitizerPass({}))
296 FUNCTION_PASS("kmsan", MemorySanitizerPass({0, false, /*Kernel=*/true}))
297 FUNCTION_PASS("tsan", ThreadSanitizerPass())
298 FUNCTION_PASS("memprof", MemProfilerPass())
299 #undef FUNCTION_PASS
300
301 #ifndef FUNCTION_PASS_WITH_PARAMS
302 #define FUNCTION_PASS_WITH_PARAMS(NAME, CREATE_PASS, PARSER)
303 #endif
304 FUNCTION_PASS_WITH_PARAMS("loop-unroll",
305                            [](LoopUnrollOptions Opts) {
306                              return LoopUnrollPass(Opts);
307                            },
308                            parseLoopUnrollOptions)
309 FUNCTION_PASS_WITH_PARAMS("msan",
310                            [](MemorySanitizerOptions Opts) {
311                              return MemorySanitizerPass(Opts);
312                            },
313                            parseMSanPassOptions)
314 FUNCTION_PASS_WITH_PARAMS("simplify-cfg",
315                            [](SimplifyCFGOptions Opts) {
316                              return SimplifyCFGPass(Opts);
317                            },
318                            parseSimplifyCFGOptions)
319 FUNCTION_PASS_WITH_PARAMS("loop-vectorize",
320                            [](LoopVectorizeOptions Opts) {
321                              return LoopVectorizePass(Opts);
322                            },
323                            parseLoopVectorizeOptions)
324 FUNCTION_PASS_WITH_PARAMS("mldst-motion",
325                            [](MergedLoadStoreMotionOptions Opts) {
326                              return MergedLoadStoreMotionPass(Opts);
327                            },
328                            parseMergedLoadStoreMotionOptions)
329 FUNCTION_PASS_WITH_PARAMS("gvn",
330                            [](GVNOptions Opts) {
331                              return GVN(Opts);
332                            },
333                            parseGVNOptions)
334 FUNCTION_PASS_WITH_PARAMS("print<stack-lifetime>",
335                            [](StackLifetime::LivenessType Type) {
336                              return StackLifetimePrinterPass(dbgs(), Type);
337                            },
338                            parseStackLifetimeOptions)
339 #undef FUNCTION_PASS_WITH_PARAMS
340
341 #ifndef LOOP_ANALYSIS
342 #define LOOP_ANALYSIS(NAME, CREATE_PASS)
343 #endif
344 LOOP_ANALYSIS("no-op-loop", NoOpLoopAnalysis())
345 LOOP_ANALYSIS("access-info", LoopAccessAnalysis())
346 LOOP_ANALYSIS("ddg", DDGAnalysis())
347 LOOP_ANALYSIS("iv-users", IVUsersAnalysis())
348 LOOP_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis(PIC))
349 #undef LOOP_ANALYSIS
350
351 #ifndef LOOP_PASS
352 #define LOOP_PASS(NAME, CREATE_PASS)
353 #endif
354 LOOP_PASS("canon-freeze", CanonicalizeFreezeInLoopsPass())
355 LOOP_PASS("invalidate<all>", InvalidateAllAnalysesPass())
356 LOOP_PASS("licm", LICMPass())
357 LOOP_PASS("loop-idiom", LoopIdiomRecognizePass())
358 LOOP_PASS("loop-instsimplify", LoopInstSimplifyPass())
359 LOOP_PASS("loop-rotate", LoopRotatePass())
360 LOOP_PASS("no-op-loop", NoOpLoopPass())
361 LOOP_PASS("print", PrintLoopPass(dbgs()))
362 LOOP_PASS("loop-deletion", LoopDeletionPass())
363 LOOP_PASS("loop-flatten", LoopFlattenPass())
364 LOOP_PASS("loop-simplifycfg", LoopSimplifyCFGPass())
365 LOOP_PASS("loop-reduce", LoopStrengthReducePass())
366 LOOP_PASS("indvars", IndVarSimplifyPass())
367 LOOP_PASS("loop-unroll-full", LoopFullUnrollPass())
368 LOOP_PASS("print-access-info", LoopAccessInfoPrinterPass(dbgs()))
369 LOOP_PASS("print<ddg>", DDGAnalysisPrinterPass(dbgs()))
370 LOOP_PASS("print<iv-users>", IVUsersPrinterPass(dbgs()))
371 LOOP_PASS("print<loopnest>", LoopNestPrinterPass(dbgs()))
372 LOOP_PASS("print<loop-cache-cost>", LoopCachePrinterPass(dbgs()))
373 LOOP_PASS("loop-predication", LoopPredicationPass())
374 LOOP_PASS("guard-widening", GuardWideningPass())
375 LOOP_PASS("simple-loop-unswitch", SimpleLoopUnswitchPass())
376 LOOP_PASS("loop-reroll", LoopRerollPass())
377 #undef LOOP_PASS
378
379 #ifndef LOOP_PASS_WITH_PARAMS
380 #define LOOP_PASS_WITH_PARAMS(NAME, CREATE_PASS, PARSER)
381 #endif
382 LOOP_PASS_WITH_PARAMS("unswitch",
383                            [](bool NonTrivial) {
384                              return SimpleLoopUnswitchPass(NonTrivial);
385                            },
386                            parseLoopUnswitchOptions)
387 #undef LOOP_PASS_WITH_PARAMS