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