xref: /freebsd/contrib/llvm-project/llvm/lib/Passes/PassRegistry.def (revision 8bcb0991864975618c09697b1aca10683346d9f0)
10b57cec5SDimitry Andric//===- PassRegistry.def - Registry of passes --------------------*- C++ -*-===//
20b57cec5SDimitry Andric//
30b57cec5SDimitry Andric// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40b57cec5SDimitry Andric// See https://llvm.org/LICENSE.txt for license information.
50b57cec5SDimitry Andric// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60b57cec5SDimitry Andric//
70b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
80b57cec5SDimitry Andric//
90b57cec5SDimitry Andric// This file is used as the registry of passes that are part of the core LLVM
100b57cec5SDimitry Andric// libraries. This file describes both transformation passes and analyses
110b57cec5SDimitry Andric// Analyses are registered while transformation passes have names registered
120b57cec5SDimitry Andric// that can be used when providing a textual pass pipeline.
130b57cec5SDimitry Andric//
140b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
150b57cec5SDimitry Andric
160b57cec5SDimitry Andric// NOTE: NO INCLUDE GUARD DESIRED!
170b57cec5SDimitry Andric
180b57cec5SDimitry Andric#ifndef MODULE_ANALYSIS
190b57cec5SDimitry Andric#define MODULE_ANALYSIS(NAME, CREATE_PASS)
200b57cec5SDimitry Andric#endif
210b57cec5SDimitry AndricMODULE_ANALYSIS("callgraph", CallGraphAnalysis())
220b57cec5SDimitry AndricMODULE_ANALYSIS("lcg", LazyCallGraphAnalysis())
230b57cec5SDimitry AndricMODULE_ANALYSIS("module-summary", ModuleSummaryIndexAnalysis())
240b57cec5SDimitry AndricMODULE_ANALYSIS("no-op-module", NoOpModuleAnalysis())
250b57cec5SDimitry AndricMODULE_ANALYSIS("profile-summary", ProfileSummaryAnalysis())
260b57cec5SDimitry AndricMODULE_ANALYSIS("stack-safety", StackSafetyGlobalAnalysis())
270b57cec5SDimitry AndricMODULE_ANALYSIS("verify", VerifierAnalysis())
280b57cec5SDimitry AndricMODULE_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis(PIC))
290b57cec5SDimitry AndricMODULE_ANALYSIS("asan-globals-md", ASanGlobalsMetadataAnalysis())
300b57cec5SDimitry Andric
310b57cec5SDimitry Andric#ifndef MODULE_ALIAS_ANALYSIS
320b57cec5SDimitry Andric#define MODULE_ALIAS_ANALYSIS(NAME, CREATE_PASS)                               \
330b57cec5SDimitry Andric  MODULE_ANALYSIS(NAME, CREATE_PASS)
340b57cec5SDimitry Andric#endif
350b57cec5SDimitry AndricMODULE_ALIAS_ANALYSIS("globals-aa", GlobalsAA())
360b57cec5SDimitry Andric#undef MODULE_ALIAS_ANALYSIS
370b57cec5SDimitry Andric#undef MODULE_ANALYSIS
380b57cec5SDimitry Andric
390b57cec5SDimitry Andric#ifndef MODULE_PASS
400b57cec5SDimitry Andric#define MODULE_PASS(NAME, CREATE_PASS)
410b57cec5SDimitry Andric#endif
420b57cec5SDimitry AndricMODULE_PASS("always-inline", AlwaysInlinerPass())
430b57cec5SDimitry AndricMODULE_PASS("attributor", AttributorPass())
440b57cec5SDimitry AndricMODULE_PASS("called-value-propagation", CalledValuePropagationPass())
450b57cec5SDimitry AndricMODULE_PASS("canonicalize-aliases", CanonicalizeAliasesPass())
460b57cec5SDimitry AndricMODULE_PASS("cg-profile", CGProfilePass())
470b57cec5SDimitry AndricMODULE_PASS("constmerge", ConstantMergePass())
480b57cec5SDimitry AndricMODULE_PASS("cross-dso-cfi", CrossDSOCFIPass())
490b57cec5SDimitry AndricMODULE_PASS("deadargelim", DeadArgumentEliminationPass())
500b57cec5SDimitry AndricMODULE_PASS("elim-avail-extern", EliminateAvailableExternallyPass())
510b57cec5SDimitry AndricMODULE_PASS("forceattrs", ForceFunctionAttrsPass())
520b57cec5SDimitry AndricMODULE_PASS("function-import", FunctionImportPass())
530b57cec5SDimitry AndricMODULE_PASS("globaldce", GlobalDCEPass())
540b57cec5SDimitry AndricMODULE_PASS("globalopt", GlobalOptPass())
550b57cec5SDimitry AndricMODULE_PASS("globalsplit", GlobalSplitPass())
560b57cec5SDimitry AndricMODULE_PASS("hotcoldsplit", HotColdSplittingPass())
570b57cec5SDimitry AndricMODULE_PASS("hwasan", HWAddressSanitizerPass(false, false))
580b57cec5SDimitry AndricMODULE_PASS("khwasan", HWAddressSanitizerPass(true, true))
590b57cec5SDimitry AndricMODULE_PASS("inferattrs", InferFunctionAttrsPass())
600b57cec5SDimitry AndricMODULE_PASS("insert-gcov-profiling", GCOVProfilerPass())
610b57cec5SDimitry AndricMODULE_PASS("instrorderfile", InstrOrderFilePass())
620b57cec5SDimitry AndricMODULE_PASS("instrprof", InstrProfiling())
630b57cec5SDimitry AndricMODULE_PASS("internalize", InternalizePass())
640b57cec5SDimitry AndricMODULE_PASS("invalidate<all>", InvalidateAllAnalysesPass())
650b57cec5SDimitry AndricMODULE_PASS("ipsccp", IPSCCPPass())
660b57cec5SDimitry AndricMODULE_PASS("lowertypetests", LowerTypeTestsPass(nullptr, nullptr))
670b57cec5SDimitry AndricMODULE_PASS("name-anon-globals", NameAnonGlobalPass())
680b57cec5SDimitry AndricMODULE_PASS("no-op-module", NoOpModulePass())
690b57cec5SDimitry AndricMODULE_PASS("partial-inliner", PartialInlinerPass())
700b57cec5SDimitry AndricMODULE_PASS("pgo-icall-prom", PGOIndirectCallPromotion())
710b57cec5SDimitry AndricMODULE_PASS("pgo-instr-gen", PGOInstrumentationGen())
720b57cec5SDimitry AndricMODULE_PASS("pgo-instr-use", PGOInstrumentationUse())
730b57cec5SDimitry AndricMODULE_PASS("pre-isel-intrinsic-lowering", PreISelIntrinsicLoweringPass())
740b57cec5SDimitry AndricMODULE_PASS("print-profile-summary", ProfileSummaryPrinterPass(dbgs()))
750b57cec5SDimitry AndricMODULE_PASS("print-callgraph", CallGraphPrinterPass(dbgs()))
760b57cec5SDimitry AndricMODULE_PASS("print", PrintModulePass(dbgs()))
770b57cec5SDimitry AndricMODULE_PASS("print-lcg", LazyCallGraphPrinterPass(dbgs()))
780b57cec5SDimitry AndricMODULE_PASS("print-lcg-dot", LazyCallGraphDOTPrinterPass(dbgs()))
790b57cec5SDimitry AndricMODULE_PASS("print-stack-safety", StackSafetyGlobalPrinterPass(dbgs()))
800b57cec5SDimitry AndricMODULE_PASS("rewrite-statepoints-for-gc", RewriteStatepointsForGC())
810b57cec5SDimitry AndricMODULE_PASS("rewrite-symbols", RewriteSymbolPass())
820b57cec5SDimitry AndricMODULE_PASS("rpo-functionattrs", ReversePostOrderFunctionAttrsPass())
830b57cec5SDimitry AndricMODULE_PASS("sample-profile", SampleProfileLoaderPass())
840b57cec5SDimitry AndricMODULE_PASS("strip-dead-prototypes", StripDeadPrototypesPass())
850b57cec5SDimitry AndricMODULE_PASS("synthetic-counts-propagation", SyntheticCountsPropagation())
860b57cec5SDimitry AndricMODULE_PASS("wholeprogramdevirt", WholeProgramDevirtPass(nullptr, nullptr))
870b57cec5SDimitry AndricMODULE_PASS("verify", VerifierPass())
880b57cec5SDimitry AndricMODULE_PASS("asan-module", ModuleAddressSanitizerPass(/*CompileKernel=*/false, false, true, false))
89*8bcb0991SDimitry AndricMODULE_PASS("msan-module", MemorySanitizerPass({}))
90*8bcb0991SDimitry AndricMODULE_PASS("tsan-module", ThreadSanitizerPass())
910b57cec5SDimitry AndricMODULE_PASS("kasan-module", ModuleAddressSanitizerPass(/*CompileKernel=*/true, false, true, false))
92*8bcb0991SDimitry AndricMODULE_PASS("sancov-module", ModuleSanitizerCoveragePass())
930b57cec5SDimitry AndricMODULE_PASS("poison-checking", PoisonCheckingPass())
940b57cec5SDimitry Andric#undef MODULE_PASS
950b57cec5SDimitry Andric
960b57cec5SDimitry Andric#ifndef CGSCC_ANALYSIS
970b57cec5SDimitry Andric#define CGSCC_ANALYSIS(NAME, CREATE_PASS)
980b57cec5SDimitry Andric#endif
990b57cec5SDimitry AndricCGSCC_ANALYSIS("no-op-cgscc", NoOpCGSCCAnalysis())
1000b57cec5SDimitry AndricCGSCC_ANALYSIS("fam-proxy", FunctionAnalysisManagerCGSCCProxy())
1010b57cec5SDimitry AndricCGSCC_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis(PIC))
1020b57cec5SDimitry Andric#undef CGSCC_ANALYSIS
1030b57cec5SDimitry Andric
1040b57cec5SDimitry Andric#ifndef CGSCC_PASS
1050b57cec5SDimitry Andric#define CGSCC_PASS(NAME, CREATE_PASS)
1060b57cec5SDimitry Andric#endif
1070b57cec5SDimitry AndricCGSCC_PASS("argpromotion", ArgumentPromotionPass())
1080b57cec5SDimitry AndricCGSCC_PASS("invalidate<all>", InvalidateAllAnalysesPass())
1090b57cec5SDimitry AndricCGSCC_PASS("function-attrs", PostOrderFunctionAttrsPass())
1100b57cec5SDimitry AndricCGSCC_PASS("inline", InlinerPass())
1110b57cec5SDimitry AndricCGSCC_PASS("no-op-cgscc", NoOpCGSCCPass())
1120b57cec5SDimitry Andric#undef CGSCC_PASS
1130b57cec5SDimitry Andric
1140b57cec5SDimitry Andric#ifndef FUNCTION_ANALYSIS
1150b57cec5SDimitry Andric#define FUNCTION_ANALYSIS(NAME, CREATE_PASS)
1160b57cec5SDimitry Andric#endif
1170b57cec5SDimitry AndricFUNCTION_ANALYSIS("aa", AAManager())
1180b57cec5SDimitry AndricFUNCTION_ANALYSIS("assumptions", AssumptionAnalysis())
1190b57cec5SDimitry AndricFUNCTION_ANALYSIS("block-freq", BlockFrequencyAnalysis())
1200b57cec5SDimitry AndricFUNCTION_ANALYSIS("branch-prob", BranchProbabilityAnalysis())
1210b57cec5SDimitry AndricFUNCTION_ANALYSIS("domtree", DominatorTreeAnalysis())
1220b57cec5SDimitry AndricFUNCTION_ANALYSIS("postdomtree", PostDominatorTreeAnalysis())
1230b57cec5SDimitry AndricFUNCTION_ANALYSIS("demanded-bits", DemandedBitsAnalysis())
1240b57cec5SDimitry AndricFUNCTION_ANALYSIS("domfrontier", DominanceFrontierAnalysis())
1250b57cec5SDimitry AndricFUNCTION_ANALYSIS("loops", LoopAnalysis())
1260b57cec5SDimitry AndricFUNCTION_ANALYSIS("lazy-value-info", LazyValueAnalysis())
1270b57cec5SDimitry AndricFUNCTION_ANALYSIS("da", DependenceAnalysis())
1280b57cec5SDimitry AndricFUNCTION_ANALYSIS("memdep", MemoryDependenceAnalysis())
1290b57cec5SDimitry AndricFUNCTION_ANALYSIS("memoryssa", MemorySSAAnalysis())
1300b57cec5SDimitry AndricFUNCTION_ANALYSIS("phi-values", PhiValuesAnalysis())
1310b57cec5SDimitry AndricFUNCTION_ANALYSIS("regions", RegionInfoAnalysis())
1320b57cec5SDimitry AndricFUNCTION_ANALYSIS("no-op-function", NoOpFunctionAnalysis())
1330b57cec5SDimitry AndricFUNCTION_ANALYSIS("opt-remark-emit", OptimizationRemarkEmitterAnalysis())
1340b57cec5SDimitry AndricFUNCTION_ANALYSIS("scalar-evolution", ScalarEvolutionAnalysis())
1350b57cec5SDimitry AndricFUNCTION_ANALYSIS("stack-safety-local", StackSafetyAnalysis())
1360b57cec5SDimitry AndricFUNCTION_ANALYSIS("targetlibinfo", TargetLibraryAnalysis())
1370b57cec5SDimitry AndricFUNCTION_ANALYSIS("targetir",
1380b57cec5SDimitry Andric                  TM ? TM->getTargetIRAnalysis() : TargetIRAnalysis())
1390b57cec5SDimitry AndricFUNCTION_ANALYSIS("verify", VerifierAnalysis())
1400b57cec5SDimitry AndricFUNCTION_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis(PIC))
1410b57cec5SDimitry Andric
1420b57cec5SDimitry Andric#ifndef FUNCTION_ALIAS_ANALYSIS
1430b57cec5SDimitry Andric#define FUNCTION_ALIAS_ANALYSIS(NAME, CREATE_PASS)                             \
1440b57cec5SDimitry Andric  FUNCTION_ANALYSIS(NAME, CREATE_PASS)
1450b57cec5SDimitry Andric#endif
1460b57cec5SDimitry AndricFUNCTION_ALIAS_ANALYSIS("basic-aa", BasicAA())
1470b57cec5SDimitry AndricFUNCTION_ALIAS_ANALYSIS("cfl-anders-aa", CFLAndersAA())
1480b57cec5SDimitry AndricFUNCTION_ALIAS_ANALYSIS("cfl-steens-aa", CFLSteensAA())
1490b57cec5SDimitry AndricFUNCTION_ALIAS_ANALYSIS("scev-aa", SCEVAA())
1500b57cec5SDimitry AndricFUNCTION_ALIAS_ANALYSIS("scoped-noalias-aa", ScopedNoAliasAA())
1510b57cec5SDimitry AndricFUNCTION_ALIAS_ANALYSIS("type-based-aa", TypeBasedAA())
1520b57cec5SDimitry Andric#undef FUNCTION_ALIAS_ANALYSIS
1530b57cec5SDimitry Andric#undef FUNCTION_ANALYSIS
1540b57cec5SDimitry Andric
1550b57cec5SDimitry Andric#ifndef FUNCTION_PASS
1560b57cec5SDimitry Andric#define FUNCTION_PASS(NAME, CREATE_PASS)
1570b57cec5SDimitry Andric#endif
1580b57cec5SDimitry AndricFUNCTION_PASS("aa-eval", AAEvaluator())
1590b57cec5SDimitry AndricFUNCTION_PASS("adce", ADCEPass())
1600b57cec5SDimitry AndricFUNCTION_PASS("add-discriminators", AddDiscriminatorsPass())
1610b57cec5SDimitry AndricFUNCTION_PASS("aggressive-instcombine", AggressiveInstCombinePass())
1620b57cec5SDimitry AndricFUNCTION_PASS("alignment-from-assumptions", AlignmentFromAssumptionsPass())
1630b57cec5SDimitry AndricFUNCTION_PASS("bdce", BDCEPass())
1640b57cec5SDimitry AndricFUNCTION_PASS("bounds-checking", BoundsCheckingPass())
1650b57cec5SDimitry AndricFUNCTION_PASS("break-crit-edges", BreakCriticalEdgesPass())
1660b57cec5SDimitry AndricFUNCTION_PASS("callsite-splitting", CallSiteSplittingPass())
1670b57cec5SDimitry AndricFUNCTION_PASS("consthoist", ConstantHoistingPass())
1680b57cec5SDimitry AndricFUNCTION_PASS("chr", ControlHeightReductionPass())
1690b57cec5SDimitry AndricFUNCTION_PASS("correlated-propagation", CorrelatedValuePropagationPass())
1700b57cec5SDimitry AndricFUNCTION_PASS("dce", DCEPass())
1710b57cec5SDimitry AndricFUNCTION_PASS("div-rem-pairs", DivRemPairsPass())
1720b57cec5SDimitry AndricFUNCTION_PASS("dse", DSEPass())
1730b57cec5SDimitry AndricFUNCTION_PASS("dot-cfg", CFGPrinterPass())
1740b57cec5SDimitry AndricFUNCTION_PASS("dot-cfg-only", CFGOnlyPrinterPass())
1750b57cec5SDimitry AndricFUNCTION_PASS("early-cse", EarlyCSEPass(/*UseMemorySSA=*/false))
1760b57cec5SDimitry AndricFUNCTION_PASS("early-cse-memssa", EarlyCSEPass(/*UseMemorySSA=*/true))
1770b57cec5SDimitry AndricFUNCTION_PASS("ee-instrument", EntryExitInstrumenterPass(/*PostInlining=*/false))
1780b57cec5SDimitry AndricFUNCTION_PASS("make-guards-explicit", MakeGuardsExplicitPass())
1790b57cec5SDimitry AndricFUNCTION_PASS("post-inline-ee-instrument", EntryExitInstrumenterPass(/*PostInlining=*/true))
1800b57cec5SDimitry AndricFUNCTION_PASS("gvn-hoist", GVNHoistPass())
1810b57cec5SDimitry AndricFUNCTION_PASS("instcombine", InstCombinePass())
1820b57cec5SDimitry AndricFUNCTION_PASS("instsimplify", InstSimplifyPass())
1830b57cec5SDimitry AndricFUNCTION_PASS("invalidate<all>", InvalidateAllAnalysesPass())
1840b57cec5SDimitry AndricFUNCTION_PASS("float2int", Float2IntPass())
1850b57cec5SDimitry AndricFUNCTION_PASS("no-op-function", NoOpFunctionPass())
1860b57cec5SDimitry AndricFUNCTION_PASS("libcalls-shrinkwrap", LibCallsShrinkWrapPass())
1870b57cec5SDimitry AndricFUNCTION_PASS("loweratomic", LowerAtomicPass())
1880b57cec5SDimitry AndricFUNCTION_PASS("lower-expect", LowerExpectIntrinsicPass())
1890b57cec5SDimitry AndricFUNCTION_PASS("lower-guard-intrinsic", LowerGuardIntrinsicPass())
190*8bcb0991SDimitry AndricFUNCTION_PASS("lower-constant-intrinsics", LowerConstantIntrinsicsPass())
1910b57cec5SDimitry AndricFUNCTION_PASS("lower-widenable-condition", LowerWidenableConditionPass())
1920b57cec5SDimitry AndricFUNCTION_PASS("guard-widening", GuardWideningPass())
1930b57cec5SDimitry AndricFUNCTION_PASS("gvn", GVN())
1940b57cec5SDimitry AndricFUNCTION_PASS("load-store-vectorizer", LoadStoreVectorizerPass())
1950b57cec5SDimitry AndricFUNCTION_PASS("loop-simplify", LoopSimplifyPass())
1960b57cec5SDimitry AndricFUNCTION_PASS("loop-sink", LoopSinkPass())
1970b57cec5SDimitry AndricFUNCTION_PASS("lowerinvoke", LowerInvokePass())
1980b57cec5SDimitry AndricFUNCTION_PASS("mem2reg", PromotePass())
1990b57cec5SDimitry AndricFUNCTION_PASS("memcpyopt", MemCpyOptPass())
2000b57cec5SDimitry AndricFUNCTION_PASS("mergeicmps", MergeICmpsPass())
2010b57cec5SDimitry AndricFUNCTION_PASS("nary-reassociate", NaryReassociatePass())
2020b57cec5SDimitry AndricFUNCTION_PASS("newgvn", NewGVNPass())
2030b57cec5SDimitry AndricFUNCTION_PASS("jump-threading", JumpThreadingPass())
2040b57cec5SDimitry AndricFUNCTION_PASS("partially-inline-libcalls", PartiallyInlineLibCallsPass())
2050b57cec5SDimitry AndricFUNCTION_PASS("lcssa", LCSSAPass())
2060b57cec5SDimitry AndricFUNCTION_PASS("loop-data-prefetch", LoopDataPrefetchPass())
2070b57cec5SDimitry AndricFUNCTION_PASS("loop-load-elim", LoopLoadEliminationPass())
2080b57cec5SDimitry AndricFUNCTION_PASS("loop-fuse", LoopFusePass())
2090b57cec5SDimitry AndricFUNCTION_PASS("loop-distribute", LoopDistributePass())
2100b57cec5SDimitry AndricFUNCTION_PASS("pgo-memop-opt", PGOMemOPSizeOpt())
2110b57cec5SDimitry AndricFUNCTION_PASS("print", PrintFunctionPass(dbgs()))
2120b57cec5SDimitry AndricFUNCTION_PASS("print<assumptions>", AssumptionPrinterPass(dbgs()))
2130b57cec5SDimitry AndricFUNCTION_PASS("print<block-freq>", BlockFrequencyPrinterPass(dbgs()))
2140b57cec5SDimitry AndricFUNCTION_PASS("print<branch-prob>", BranchProbabilityPrinterPass(dbgs()))
2150b57cec5SDimitry AndricFUNCTION_PASS("print<da>", DependenceAnalysisPrinterPass(dbgs()))
2160b57cec5SDimitry AndricFUNCTION_PASS("print<domtree>", DominatorTreePrinterPass(dbgs()))
2170b57cec5SDimitry AndricFUNCTION_PASS("print<postdomtree>", PostDominatorTreePrinterPass(dbgs()))
2180b57cec5SDimitry AndricFUNCTION_PASS("print<demanded-bits>", DemandedBitsPrinterPass(dbgs()))
2190b57cec5SDimitry AndricFUNCTION_PASS("print<domfrontier>", DominanceFrontierPrinterPass(dbgs()))
2200b57cec5SDimitry AndricFUNCTION_PASS("print<loops>", LoopPrinterPass(dbgs()))
2210b57cec5SDimitry AndricFUNCTION_PASS("print<memoryssa>", MemorySSAPrinterPass(dbgs()))
2220b57cec5SDimitry AndricFUNCTION_PASS("print<phi-values>", PhiValuesPrinterPass(dbgs()))
2230b57cec5SDimitry AndricFUNCTION_PASS("print<regions>", RegionInfoPrinterPass(dbgs()))
2240b57cec5SDimitry AndricFUNCTION_PASS("print<scalar-evolution>", ScalarEvolutionPrinterPass(dbgs()))
2250b57cec5SDimitry AndricFUNCTION_PASS("print<stack-safety-local>", StackSafetyPrinterPass(dbgs()))
2260b57cec5SDimitry AndricFUNCTION_PASS("reassociate", ReassociatePass())
2270b57cec5SDimitry AndricFUNCTION_PASS("scalarizer", ScalarizerPass())
2280b57cec5SDimitry AndricFUNCTION_PASS("sccp", SCCPPass())
2290b57cec5SDimitry AndricFUNCTION_PASS("sink", SinkingPass())
2300b57cec5SDimitry AndricFUNCTION_PASS("slp-vectorizer", SLPVectorizerPass())
2310b57cec5SDimitry AndricFUNCTION_PASS("speculative-execution", SpeculativeExecutionPass())
2320b57cec5SDimitry AndricFUNCTION_PASS("spec-phis", SpeculateAroundPHIsPass())
2330b57cec5SDimitry AndricFUNCTION_PASS("sroa", SROA())
2340b57cec5SDimitry AndricFUNCTION_PASS("tailcallelim", TailCallElimPass())
2350b57cec5SDimitry AndricFUNCTION_PASS("unreachableblockelim", UnreachableBlockElimPass())
2360b57cec5SDimitry AndricFUNCTION_PASS("verify", VerifierPass())
2370b57cec5SDimitry AndricFUNCTION_PASS("verify<domtree>", DominatorTreeVerifierPass())
2380b57cec5SDimitry AndricFUNCTION_PASS("verify<loops>", LoopVerifierPass())
2390b57cec5SDimitry AndricFUNCTION_PASS("verify<memoryssa>", MemorySSAVerifierPass())
2400b57cec5SDimitry AndricFUNCTION_PASS("verify<regions>", RegionInfoVerifierPass())
2410b57cec5SDimitry AndricFUNCTION_PASS("verify<safepoint-ir>", SafepointIRVerifierPass())
2420b57cec5SDimitry AndricFUNCTION_PASS("view-cfg", CFGViewerPass())
2430b57cec5SDimitry AndricFUNCTION_PASS("view-cfg-only", CFGOnlyViewerPass())
2440b57cec5SDimitry AndricFUNCTION_PASS("transform-warning", WarnMissedTransformationsPass())
2450b57cec5SDimitry AndricFUNCTION_PASS("asan", AddressSanitizerPass(false, false, false))
2460b57cec5SDimitry AndricFUNCTION_PASS("kasan", AddressSanitizerPass(true, false, false))
2470b57cec5SDimitry AndricFUNCTION_PASS("msan", MemorySanitizerPass({}))
2480b57cec5SDimitry AndricFUNCTION_PASS("kmsan", MemorySanitizerPass({0, false, /*Kernel=*/true}))
2490b57cec5SDimitry AndricFUNCTION_PASS("tsan", ThreadSanitizerPass())
2500b57cec5SDimitry Andric#undef FUNCTION_PASS
2510b57cec5SDimitry Andric
2520b57cec5SDimitry Andric#ifndef FUNCTION_PASS_WITH_PARAMS
2530b57cec5SDimitry Andric#define FUNCTION_PASS_WITH_PARAMS(NAME, CREATE_PASS, PARSER)
2540b57cec5SDimitry Andric#endif
2550b57cec5SDimitry AndricFUNCTION_PASS_WITH_PARAMS("unroll",
2560b57cec5SDimitry Andric                           [](LoopUnrollOptions Opts) {
2570b57cec5SDimitry Andric                             return LoopUnrollPass(Opts);
2580b57cec5SDimitry Andric                           },
2590b57cec5SDimitry Andric                           parseLoopUnrollOptions)
2600b57cec5SDimitry AndricFUNCTION_PASS_WITH_PARAMS("msan",
2610b57cec5SDimitry Andric                           [](MemorySanitizerOptions Opts) {
2620b57cec5SDimitry Andric                             return MemorySanitizerPass(Opts);
2630b57cec5SDimitry Andric                           },
2640b57cec5SDimitry Andric                           parseMSanPassOptions)
2650b57cec5SDimitry AndricFUNCTION_PASS_WITH_PARAMS("simplify-cfg",
2660b57cec5SDimitry Andric                           [](SimplifyCFGOptions Opts) {
2670b57cec5SDimitry Andric                             return SimplifyCFGPass(Opts);
2680b57cec5SDimitry Andric                           },
2690b57cec5SDimitry Andric                           parseSimplifyCFGOptions)
2700b57cec5SDimitry AndricFUNCTION_PASS_WITH_PARAMS("loop-vectorize",
2710b57cec5SDimitry Andric                           [](LoopVectorizeOptions Opts) {
2720b57cec5SDimitry Andric                             return LoopVectorizePass(Opts);
2730b57cec5SDimitry Andric                           },
2740b57cec5SDimitry Andric                           parseLoopVectorizeOptions)
275*8bcb0991SDimitry AndricFUNCTION_PASS_WITH_PARAMS("mldst-motion",
276*8bcb0991SDimitry Andric                           [](MergedLoadStoreMotionOptions Opts) {
277*8bcb0991SDimitry Andric                             return MergedLoadStoreMotionPass(Opts);
278*8bcb0991SDimitry Andric                           },
279*8bcb0991SDimitry Andric                           parseMergedLoadStoreMotionOptions)
2800b57cec5SDimitry Andric#undef FUNCTION_PASS_WITH_PARAMS
2810b57cec5SDimitry Andric
2820b57cec5SDimitry Andric#ifndef LOOP_ANALYSIS
2830b57cec5SDimitry Andric#define LOOP_ANALYSIS(NAME, CREATE_PASS)
2840b57cec5SDimitry Andric#endif
2850b57cec5SDimitry AndricLOOP_ANALYSIS("no-op-loop", NoOpLoopAnalysis())
2860b57cec5SDimitry AndricLOOP_ANALYSIS("access-info", LoopAccessAnalysis())
287*8bcb0991SDimitry AndricLOOP_ANALYSIS("ddg", DDGAnalysis())
2880b57cec5SDimitry AndricLOOP_ANALYSIS("ivusers", IVUsersAnalysis())
2890b57cec5SDimitry AndricLOOP_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis(PIC))
2900b57cec5SDimitry Andric#undef LOOP_ANALYSIS
2910b57cec5SDimitry Andric
2920b57cec5SDimitry Andric#ifndef LOOP_PASS
2930b57cec5SDimitry Andric#define LOOP_PASS(NAME, CREATE_PASS)
2940b57cec5SDimitry Andric#endif
2950b57cec5SDimitry AndricLOOP_PASS("invalidate<all>", InvalidateAllAnalysesPass())
2960b57cec5SDimitry AndricLOOP_PASS("licm", LICMPass())
2970b57cec5SDimitry AndricLOOP_PASS("loop-idiom", LoopIdiomRecognizePass())
2980b57cec5SDimitry AndricLOOP_PASS("loop-instsimplify", LoopInstSimplifyPass())
2990b57cec5SDimitry AndricLOOP_PASS("rotate", LoopRotatePass())
3000b57cec5SDimitry AndricLOOP_PASS("no-op-loop", NoOpLoopPass())
3010b57cec5SDimitry AndricLOOP_PASS("print", PrintLoopPass(dbgs()))
3020b57cec5SDimitry AndricLOOP_PASS("loop-deletion", LoopDeletionPass())
3030b57cec5SDimitry AndricLOOP_PASS("simplify-cfg", LoopSimplifyCFGPass())
3040b57cec5SDimitry AndricLOOP_PASS("strength-reduce", LoopStrengthReducePass())
3050b57cec5SDimitry AndricLOOP_PASS("indvars", IndVarSimplifyPass())
3060b57cec5SDimitry AndricLOOP_PASS("irce", IRCEPass())
3070b57cec5SDimitry AndricLOOP_PASS("unroll-and-jam", LoopUnrollAndJamPass())
3080b57cec5SDimitry AndricLOOP_PASS("unroll-full", LoopFullUnrollPass())
3090b57cec5SDimitry AndricLOOP_PASS("print-access-info", LoopAccessInfoPrinterPass(dbgs()))
310*8bcb0991SDimitry AndricLOOP_PASS("print<ddg>", DDGAnalysisPrinterPass(dbgs()))
3110b57cec5SDimitry AndricLOOP_PASS("print<ivusers>", IVUsersPrinterPass(dbgs()))
312*8bcb0991SDimitry AndricLOOP_PASS("print<loop-cache-cost>", LoopCachePrinterPass(dbgs()))
3130b57cec5SDimitry AndricLOOP_PASS("loop-predication", LoopPredicationPass())
3140b57cec5SDimitry AndricLOOP_PASS("guard-widening", GuardWideningPass())
3150b57cec5SDimitry Andric#undef LOOP_PASS
3160b57cec5SDimitry Andric
3170b57cec5SDimitry Andric#ifndef LOOP_PASS_WITH_PARAMS
3180b57cec5SDimitry Andric#define LOOP_PASS_WITH_PARAMS(NAME, CREATE_PASS, PARSER)
3190b57cec5SDimitry Andric#endif
3200b57cec5SDimitry AndricLOOP_PASS_WITH_PARAMS("unswitch",
3210b57cec5SDimitry Andric                           [](bool NonTrivial) {
3220b57cec5SDimitry Andric                             return SimpleLoopUnswitchPass(NonTrivial);
3230b57cec5SDimitry Andric                           },
3240b57cec5SDimitry Andric                           parseLoopUnswitchOptions)
3250b57cec5SDimitry Andric#undef LOOP_PASS_WITH_PARAMS
326