xref: /freebsd/contrib/llvm-project/llvm/lib/Passes/PassRegistry.def (revision e8d8bef961a50d4dc22501cde4fb9fb0be1b2532)
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())
305ffd83dbSDimitry AndricMODULE_ANALYSIS("inline-advisor", InlineAdvisorAnalysis())
31*e8d8bef9SDimitry AndricMODULE_ANALYSIS("ir-similarity", IRSimilarityAnalysis())
320b57cec5SDimitry Andric
330b57cec5SDimitry Andric#ifndef MODULE_ALIAS_ANALYSIS
340b57cec5SDimitry Andric#define MODULE_ALIAS_ANALYSIS(NAME, CREATE_PASS)                               \
350b57cec5SDimitry Andric  MODULE_ANALYSIS(NAME, CREATE_PASS)
360b57cec5SDimitry Andric#endif
370b57cec5SDimitry AndricMODULE_ALIAS_ANALYSIS("globals-aa", GlobalsAA())
380b57cec5SDimitry Andric#undef MODULE_ALIAS_ANALYSIS
390b57cec5SDimitry Andric#undef MODULE_ANALYSIS
400b57cec5SDimitry Andric
410b57cec5SDimitry Andric#ifndef MODULE_PASS
420b57cec5SDimitry Andric#define MODULE_PASS(NAME, CREATE_PASS)
430b57cec5SDimitry Andric#endif
440b57cec5SDimitry AndricMODULE_PASS("always-inline", AlwaysInlinerPass())
450b57cec5SDimitry AndricMODULE_PASS("attributor", AttributorPass())
46*e8d8bef9SDimitry AndricMODULE_PASS("annotation2metadata", Annotation2MetadataPass())
470b57cec5SDimitry AndricMODULE_PASS("called-value-propagation", CalledValuePropagationPass())
480b57cec5SDimitry AndricMODULE_PASS("canonicalize-aliases", CanonicalizeAliasesPass())
490b57cec5SDimitry AndricMODULE_PASS("cg-profile", CGProfilePass())
500b57cec5SDimitry AndricMODULE_PASS("constmerge", ConstantMergePass())
510b57cec5SDimitry AndricMODULE_PASS("cross-dso-cfi", CrossDSOCFIPass())
520b57cec5SDimitry AndricMODULE_PASS("deadargelim", DeadArgumentEliminationPass())
530b57cec5SDimitry AndricMODULE_PASS("elim-avail-extern", EliminateAvailableExternallyPass())
54*e8d8bef9SDimitry AndricMODULE_PASS("extract-blocks", BlockExtractorPass())
550b57cec5SDimitry AndricMODULE_PASS("forceattrs", ForceFunctionAttrsPass())
560b57cec5SDimitry AndricMODULE_PASS("function-import", FunctionImportPass())
570b57cec5SDimitry AndricMODULE_PASS("globaldce", GlobalDCEPass())
580b57cec5SDimitry AndricMODULE_PASS("globalopt", GlobalOptPass())
590b57cec5SDimitry AndricMODULE_PASS("globalsplit", GlobalSplitPass())
600b57cec5SDimitry AndricMODULE_PASS("hotcoldsplit", HotColdSplittingPass())
610b57cec5SDimitry AndricMODULE_PASS("hwasan", HWAddressSanitizerPass(false, false))
620b57cec5SDimitry AndricMODULE_PASS("khwasan", HWAddressSanitizerPass(true, true))
630b57cec5SDimitry AndricMODULE_PASS("inferattrs", InferFunctionAttrsPass())
645ffd83dbSDimitry AndricMODULE_PASS("inliner-wrapper", ModuleInlinerWrapperPass())
65*e8d8bef9SDimitry AndricMODULE_PASS("inliner-wrapper-no-mandatory-first", ModuleInlinerWrapperPass(
66*e8d8bef9SDimitry Andric  getInlineParams(),
67*e8d8bef9SDimitry Andric  DebugLogging,
68*e8d8bef9SDimitry Andric  false))
690b57cec5SDimitry AndricMODULE_PASS("insert-gcov-profiling", GCOVProfilerPass())
700b57cec5SDimitry AndricMODULE_PASS("instrorderfile", InstrOrderFilePass())
710b57cec5SDimitry AndricMODULE_PASS("instrprof", InstrProfiling())
720b57cec5SDimitry AndricMODULE_PASS("internalize", InternalizePass())
730b57cec5SDimitry AndricMODULE_PASS("invalidate<all>", InvalidateAllAnalysesPass())
740b57cec5SDimitry AndricMODULE_PASS("ipsccp", IPSCCPPass())
75*e8d8bef9SDimitry AndricMODULE_PASS("iroutliner", IROutlinerPass())
76*e8d8bef9SDimitry AndricMODULE_PASS("print-ir-similarity", IRSimilarityAnalysisPrinterPass(dbgs()))
77*e8d8bef9SDimitry AndricMODULE_PASS("loop-extract", LoopExtractorPass())
78*e8d8bef9SDimitry AndricMODULE_PASS("lowertypetests", LowerTypeTestsPass())
79*e8d8bef9SDimitry AndricMODULE_PASS("metarenamer", MetaRenamerPass())
80480093f4SDimitry AndricMODULE_PASS("mergefunc", MergeFunctionsPass())
810b57cec5SDimitry AndricMODULE_PASS("name-anon-globals", NameAnonGlobalPass())
820b57cec5SDimitry AndricMODULE_PASS("no-op-module", NoOpModulePass())
83*e8d8bef9SDimitry AndricMODULE_PASS("objc-arc-apelim", ObjCARCAPElimPass())
840b57cec5SDimitry AndricMODULE_PASS("partial-inliner", PartialInlinerPass())
850b57cec5SDimitry AndricMODULE_PASS("pgo-icall-prom", PGOIndirectCallPromotion())
860b57cec5SDimitry AndricMODULE_PASS("pgo-instr-gen", PGOInstrumentationGen())
870b57cec5SDimitry AndricMODULE_PASS("pgo-instr-use", PGOInstrumentationUse())
880b57cec5SDimitry AndricMODULE_PASS("print-profile-summary", ProfileSummaryPrinterPass(dbgs()))
890b57cec5SDimitry AndricMODULE_PASS("print-callgraph", CallGraphPrinterPass(dbgs()))
900b57cec5SDimitry AndricMODULE_PASS("print", PrintModulePass(dbgs()))
910b57cec5SDimitry AndricMODULE_PASS("print-lcg", LazyCallGraphPrinterPass(dbgs()))
920b57cec5SDimitry AndricMODULE_PASS("print-lcg-dot", LazyCallGraphDOTPrinterPass(dbgs()))
93*e8d8bef9SDimitry AndricMODULE_PASS("print-must-be-executed-contexts", MustBeExecutedContextPrinterPass(dbgs()))
940b57cec5SDimitry AndricMODULE_PASS("print-stack-safety", StackSafetyGlobalPrinterPass(dbgs()))
95*e8d8bef9SDimitry AndricMODULE_PASS("print<module-debuginfo>", ModuleDebugInfoPrinterPass(dbgs()))
960b57cec5SDimitry AndricMODULE_PASS("rewrite-statepoints-for-gc", RewriteStatepointsForGC())
970b57cec5SDimitry AndricMODULE_PASS("rewrite-symbols", RewriteSymbolPass())
98*e8d8bef9SDimitry AndricMODULE_PASS("rpo-function-attrs", ReversePostOrderFunctionAttrsPass())
990b57cec5SDimitry AndricMODULE_PASS("sample-profile", SampleProfileLoaderPass())
1005ffd83dbSDimitry AndricMODULE_PASS("scc-oz-module-inliner",
101*e8d8bef9SDimitry Andric  buildInlinerPipeline(OptimizationLevel::Oz, ThinOrFullLTOPhase::None))
102*e8d8bef9SDimitry AndricMODULE_PASS("loop-extract-single", LoopExtractorPass(1))
103*e8d8bef9SDimitry AndricMODULE_PASS("strip", StripSymbolsPass())
104*e8d8bef9SDimitry AndricMODULE_PASS("strip-dead-debug-info", StripDeadDebugInfoPass())
105*e8d8bef9SDimitry AndricMODULE_PASS("pseudo-probe", SampleProfileProbePass(TM))
1060b57cec5SDimitry AndricMODULE_PASS("strip-dead-prototypes", StripDeadPrototypesPass())
107*e8d8bef9SDimitry AndricMODULE_PASS("strip-debug-declare", StripDebugDeclarePass())
108*e8d8bef9SDimitry AndricMODULE_PASS("strip-nondebug", StripNonDebugSymbolsPass())
109*e8d8bef9SDimitry AndricMODULE_PASS("strip-nonlinetable-debuginfo", StripNonLineTableDebugInfoPass())
1100b57cec5SDimitry AndricMODULE_PASS("synthetic-counts-propagation", SyntheticCountsPropagation())
111*e8d8bef9SDimitry AndricMODULE_PASS("unique-internal-linkage-names", UniqueInternalLinkageNamesPass())
1120b57cec5SDimitry AndricMODULE_PASS("verify", VerifierPass())
113*e8d8bef9SDimitry AndricMODULE_PASS("wholeprogramdevirt", WholeProgramDevirtPass())
114*e8d8bef9SDimitry AndricMODULE_PASS("dfsan", DataFlowSanitizerPass())
1150b57cec5SDimitry AndricMODULE_PASS("asan-module", ModuleAddressSanitizerPass(/*CompileKernel=*/false, false, true, false))
1168bcb0991SDimitry AndricMODULE_PASS("msan-module", MemorySanitizerPass({}))
1178bcb0991SDimitry AndricMODULE_PASS("tsan-module", ThreadSanitizerPass())
1180b57cec5SDimitry AndricMODULE_PASS("kasan-module", ModuleAddressSanitizerPass(/*CompileKernel=*/true, false, true, false))
1198bcb0991SDimitry AndricMODULE_PASS("sancov-module", ModuleSanitizerCoveragePass())
120*e8d8bef9SDimitry AndricMODULE_PASS("memprof-module", ModuleMemProfilerPass())
1210b57cec5SDimitry AndricMODULE_PASS("poison-checking", PoisonCheckingPass())
1220b57cec5SDimitry Andric#undef MODULE_PASS
1230b57cec5SDimitry Andric
1240b57cec5SDimitry Andric#ifndef CGSCC_ANALYSIS
1250b57cec5SDimitry Andric#define CGSCC_ANALYSIS(NAME, CREATE_PASS)
1260b57cec5SDimitry Andric#endif
1270b57cec5SDimitry AndricCGSCC_ANALYSIS("no-op-cgscc", NoOpCGSCCAnalysis())
1280b57cec5SDimitry AndricCGSCC_ANALYSIS("fam-proxy", FunctionAnalysisManagerCGSCCProxy())
1290b57cec5SDimitry AndricCGSCC_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis(PIC))
1300b57cec5SDimitry Andric#undef CGSCC_ANALYSIS
1310b57cec5SDimitry Andric
1320b57cec5SDimitry Andric#ifndef CGSCC_PASS
1330b57cec5SDimitry Andric#define CGSCC_PASS(NAME, CREATE_PASS)
1340b57cec5SDimitry Andric#endif
1350b57cec5SDimitry AndricCGSCC_PASS("argpromotion", ArgumentPromotionPass())
1360b57cec5SDimitry AndricCGSCC_PASS("invalidate<all>", InvalidateAllAnalysesPass())
1370b57cec5SDimitry AndricCGSCC_PASS("function-attrs", PostOrderFunctionAttrsPass())
1385ffd83dbSDimitry AndricCGSCC_PASS("attributor-cgscc", AttributorCGSCCPass())
1390b57cec5SDimitry AndricCGSCC_PASS("inline", InlinerPass())
1405ffd83dbSDimitry AndricCGSCC_PASS("openmpopt", OpenMPOptPass())
1415ffd83dbSDimitry AndricCGSCC_PASS("coro-split", CoroSplitPass())
1420b57cec5SDimitry AndricCGSCC_PASS("no-op-cgscc", NoOpCGSCCPass())
1430b57cec5SDimitry Andric#undef CGSCC_PASS
1440b57cec5SDimitry Andric
1450b57cec5SDimitry Andric#ifndef FUNCTION_ANALYSIS
1460b57cec5SDimitry Andric#define FUNCTION_ANALYSIS(NAME, CREATE_PASS)
1470b57cec5SDimitry Andric#endif
1480b57cec5SDimitry AndricFUNCTION_ANALYSIS("aa", AAManager())
1490b57cec5SDimitry AndricFUNCTION_ANALYSIS("assumptions", AssumptionAnalysis())
1500b57cec5SDimitry AndricFUNCTION_ANALYSIS("block-freq", BlockFrequencyAnalysis())
1510b57cec5SDimitry AndricFUNCTION_ANALYSIS("branch-prob", BranchProbabilityAnalysis())
1520b57cec5SDimitry AndricFUNCTION_ANALYSIS("domtree", DominatorTreeAnalysis())
1530b57cec5SDimitry AndricFUNCTION_ANALYSIS("postdomtree", PostDominatorTreeAnalysis())
1540b57cec5SDimitry AndricFUNCTION_ANALYSIS("demanded-bits", DemandedBitsAnalysis())
1550b57cec5SDimitry AndricFUNCTION_ANALYSIS("domfrontier", DominanceFrontierAnalysis())
156*e8d8bef9SDimitry AndricFUNCTION_ANALYSIS("func-properties", FunctionPropertiesAnalysis())
1570b57cec5SDimitry AndricFUNCTION_ANALYSIS("loops", LoopAnalysis())
1580b57cec5SDimitry AndricFUNCTION_ANALYSIS("lazy-value-info", LazyValueAnalysis())
1590b57cec5SDimitry AndricFUNCTION_ANALYSIS("da", DependenceAnalysis())
1605ffd83dbSDimitry AndricFUNCTION_ANALYSIS("inliner-size-estimator", InlineSizeEstimatorAnalysis())
1610b57cec5SDimitry AndricFUNCTION_ANALYSIS("memdep", MemoryDependenceAnalysis())
1620b57cec5SDimitry AndricFUNCTION_ANALYSIS("memoryssa", MemorySSAAnalysis())
1630b57cec5SDimitry AndricFUNCTION_ANALYSIS("phi-values", PhiValuesAnalysis())
1640b57cec5SDimitry AndricFUNCTION_ANALYSIS("regions", RegionInfoAnalysis())
1650b57cec5SDimitry AndricFUNCTION_ANALYSIS("no-op-function", NoOpFunctionAnalysis())
1660b57cec5SDimitry AndricFUNCTION_ANALYSIS("opt-remark-emit", OptimizationRemarkEmitterAnalysis())
1670b57cec5SDimitry AndricFUNCTION_ANALYSIS("scalar-evolution", ScalarEvolutionAnalysis())
1680b57cec5SDimitry AndricFUNCTION_ANALYSIS("stack-safety-local", StackSafetyAnalysis())
1690b57cec5SDimitry AndricFUNCTION_ANALYSIS("targetlibinfo", TargetLibraryAnalysis())
1700b57cec5SDimitry AndricFUNCTION_ANALYSIS("targetir",
1710b57cec5SDimitry Andric                  TM ? TM->getTargetIRAnalysis() : TargetIRAnalysis())
1720b57cec5SDimitry AndricFUNCTION_ANALYSIS("verify", VerifierAnalysis())
1730b57cec5SDimitry AndricFUNCTION_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis(PIC))
1740b57cec5SDimitry Andric
1750b57cec5SDimitry Andric#ifndef FUNCTION_ALIAS_ANALYSIS
1760b57cec5SDimitry Andric#define FUNCTION_ALIAS_ANALYSIS(NAME, CREATE_PASS)                             \
1770b57cec5SDimitry Andric  FUNCTION_ANALYSIS(NAME, CREATE_PASS)
1780b57cec5SDimitry Andric#endif
1790b57cec5SDimitry AndricFUNCTION_ALIAS_ANALYSIS("basic-aa", BasicAA())
1800b57cec5SDimitry AndricFUNCTION_ALIAS_ANALYSIS("cfl-anders-aa", CFLAndersAA())
1810b57cec5SDimitry AndricFUNCTION_ALIAS_ANALYSIS("cfl-steens-aa", CFLSteensAA())
182*e8d8bef9SDimitry AndricFUNCTION_ALIAS_ANALYSIS("objc-arc-aa", objcarc::ObjCARCAA())
1830b57cec5SDimitry AndricFUNCTION_ALIAS_ANALYSIS("scev-aa", SCEVAA())
1840b57cec5SDimitry AndricFUNCTION_ALIAS_ANALYSIS("scoped-noalias-aa", ScopedNoAliasAA())
185*e8d8bef9SDimitry AndricFUNCTION_ALIAS_ANALYSIS("tbaa", TypeBasedAA())
1860b57cec5SDimitry Andric#undef FUNCTION_ALIAS_ANALYSIS
1870b57cec5SDimitry Andric#undef FUNCTION_ANALYSIS
1880b57cec5SDimitry Andric
1890b57cec5SDimitry Andric#ifndef FUNCTION_PASS
1900b57cec5SDimitry Andric#define FUNCTION_PASS(NAME, CREATE_PASS)
1910b57cec5SDimitry Andric#endif
1920b57cec5SDimitry AndricFUNCTION_PASS("aa-eval", AAEvaluator())
1930b57cec5SDimitry AndricFUNCTION_PASS("adce", ADCEPass())
1940b57cec5SDimitry AndricFUNCTION_PASS("add-discriminators", AddDiscriminatorsPass())
1950b57cec5SDimitry AndricFUNCTION_PASS("aggressive-instcombine", AggressiveInstCombinePass())
1965ffd83dbSDimitry AndricFUNCTION_PASS("assume-builder", AssumeBuilderPass())
1975ffd83dbSDimitry AndricFUNCTION_PASS("assume-simplify", AssumeSimplifyPass())
1980b57cec5SDimitry AndricFUNCTION_PASS("alignment-from-assumptions", AlignmentFromAssumptionsPass())
199*e8d8bef9SDimitry AndricFUNCTION_PASS("annotation-remarks", AnnotationRemarksPass())
2000b57cec5SDimitry AndricFUNCTION_PASS("bdce", BDCEPass())
2010b57cec5SDimitry AndricFUNCTION_PASS("bounds-checking", BoundsCheckingPass())
2020b57cec5SDimitry AndricFUNCTION_PASS("break-crit-edges", BreakCriticalEdgesPass())
2030b57cec5SDimitry AndricFUNCTION_PASS("callsite-splitting", CallSiteSplittingPass())
2040b57cec5SDimitry AndricFUNCTION_PASS("consthoist", ConstantHoistingPass())
205*e8d8bef9SDimitry AndricFUNCTION_PASS("constraint-elimination", ConstraintEliminationPass())
2060b57cec5SDimitry AndricFUNCTION_PASS("chr", ControlHeightReductionPass())
2075ffd83dbSDimitry AndricFUNCTION_PASS("coro-early", CoroEarlyPass())
2085ffd83dbSDimitry AndricFUNCTION_PASS("coro-elide", CoroElidePass())
2095ffd83dbSDimitry AndricFUNCTION_PASS("coro-cleanup", CoroCleanupPass())
2100b57cec5SDimitry AndricFUNCTION_PASS("correlated-propagation", CorrelatedValuePropagationPass())
2110b57cec5SDimitry AndricFUNCTION_PASS("dce", DCEPass())
2120b57cec5SDimitry AndricFUNCTION_PASS("div-rem-pairs", DivRemPairsPass())
2130b57cec5SDimitry AndricFUNCTION_PASS("dse", DSEPass())
2140b57cec5SDimitry AndricFUNCTION_PASS("dot-cfg", CFGPrinterPass())
2150b57cec5SDimitry AndricFUNCTION_PASS("dot-cfg-only", CFGOnlyPrinterPass())
2160b57cec5SDimitry AndricFUNCTION_PASS("early-cse", EarlyCSEPass(/*UseMemorySSA=*/false))
2170b57cec5SDimitry AndricFUNCTION_PASS("early-cse-memssa", EarlyCSEPass(/*UseMemorySSA=*/true))
2180b57cec5SDimitry AndricFUNCTION_PASS("ee-instrument", EntryExitInstrumenterPass(/*PostInlining=*/false))
219*e8d8bef9SDimitry AndricFUNCTION_PASS("fix-irreducible", FixIrreduciblePass())
2200b57cec5SDimitry AndricFUNCTION_PASS("make-guards-explicit", MakeGuardsExplicitPass())
2210b57cec5SDimitry AndricFUNCTION_PASS("post-inline-ee-instrument", EntryExitInstrumenterPass(/*PostInlining=*/true))
2220b57cec5SDimitry AndricFUNCTION_PASS("gvn-hoist", GVNHoistPass())
223*e8d8bef9SDimitry AndricFUNCTION_PASS("gvn-sink", GVNSinkPass())
224*e8d8bef9SDimitry AndricFUNCTION_PASS("helloworld", HelloWorldPass())
225*e8d8bef9SDimitry AndricFUNCTION_PASS("infer-address-spaces", InferAddressSpacesPass())
2260b57cec5SDimitry AndricFUNCTION_PASS("instcombine", InstCombinePass())
227*e8d8bef9SDimitry AndricFUNCTION_PASS("instcount", InstCountPass())
2280b57cec5SDimitry AndricFUNCTION_PASS("instsimplify", InstSimplifyPass())
2290b57cec5SDimitry AndricFUNCTION_PASS("invalidate<all>", InvalidateAllAnalysesPass())
2305ffd83dbSDimitry AndricFUNCTION_PASS("irce", IRCEPass())
2310b57cec5SDimitry AndricFUNCTION_PASS("float2int", Float2IntPass())
2320b57cec5SDimitry AndricFUNCTION_PASS("no-op-function", NoOpFunctionPass())
2330b57cec5SDimitry AndricFUNCTION_PASS("libcalls-shrinkwrap", LibCallsShrinkWrapPass())
234*e8d8bef9SDimitry AndricFUNCTION_PASS("lint", LintPass())
235480093f4SDimitry AndricFUNCTION_PASS("inject-tli-mappings", InjectTLIMappings())
236*e8d8bef9SDimitry AndricFUNCTION_PASS("instnamer", InstructionNamerPass())
2370b57cec5SDimitry AndricFUNCTION_PASS("loweratomic", LowerAtomicPass())
2380b57cec5SDimitry AndricFUNCTION_PASS("lower-expect", LowerExpectIntrinsicPass())
2390b57cec5SDimitry AndricFUNCTION_PASS("lower-guard-intrinsic", LowerGuardIntrinsicPass())
2408bcb0991SDimitry AndricFUNCTION_PASS("lower-constant-intrinsics", LowerConstantIntrinsicsPass())
241480093f4SDimitry AndricFUNCTION_PASS("lower-matrix-intrinsics", LowerMatrixIntrinsicsPass())
242*e8d8bef9SDimitry AndricFUNCTION_PASS("lower-matrix-intrinsics-minimal", LowerMatrixIntrinsicsPass(true))
2430b57cec5SDimitry AndricFUNCTION_PASS("lower-widenable-condition", LowerWidenableConditionPass())
2440b57cec5SDimitry AndricFUNCTION_PASS("guard-widening", GuardWideningPass())
2450b57cec5SDimitry AndricFUNCTION_PASS("load-store-vectorizer", LoadStoreVectorizerPass())
2460b57cec5SDimitry AndricFUNCTION_PASS("loop-simplify", LoopSimplifyPass())
2470b57cec5SDimitry AndricFUNCTION_PASS("loop-sink", LoopSinkPass())
2485ffd83dbSDimitry AndricFUNCTION_PASS("loop-unroll-and-jam", LoopUnrollAndJamPass())
249*e8d8bef9SDimitry AndricFUNCTION_PASS("loop-flatten", LoopFlattenPass())
2500b57cec5SDimitry AndricFUNCTION_PASS("lowerinvoke", LowerInvokePass())
251*e8d8bef9SDimitry AndricFUNCTION_PASS("lowerswitch", LowerSwitchPass())
2520b57cec5SDimitry AndricFUNCTION_PASS("mem2reg", PromotePass())
2530b57cec5SDimitry AndricFUNCTION_PASS("memcpyopt", MemCpyOptPass())
2540b57cec5SDimitry AndricFUNCTION_PASS("mergeicmps", MergeICmpsPass())
255*e8d8bef9SDimitry AndricFUNCTION_PASS("mergereturn", UnifyFunctionExitNodesPass())
2560b57cec5SDimitry AndricFUNCTION_PASS("nary-reassociate", NaryReassociatePass())
2570b57cec5SDimitry AndricFUNCTION_PASS("newgvn", NewGVNPass())
2580b57cec5SDimitry AndricFUNCTION_PASS("jump-threading", JumpThreadingPass())
2590b57cec5SDimitry AndricFUNCTION_PASS("partially-inline-libcalls", PartiallyInlineLibCallsPass())
2600b57cec5SDimitry AndricFUNCTION_PASS("lcssa", LCSSAPass())
2610b57cec5SDimitry AndricFUNCTION_PASS("loop-data-prefetch", LoopDataPrefetchPass())
2620b57cec5SDimitry AndricFUNCTION_PASS("loop-load-elim", LoopLoadEliminationPass())
2635ffd83dbSDimitry AndricFUNCTION_PASS("loop-fusion", LoopFusePass())
2640b57cec5SDimitry AndricFUNCTION_PASS("loop-distribute", LoopDistributePass())
265*e8d8bef9SDimitry AndricFUNCTION_PASS("loop-versioning", LoopVersioningPass())
266*e8d8bef9SDimitry AndricFUNCTION_PASS("objc-arc", ObjCARCOptPass())
267*e8d8bef9SDimitry AndricFUNCTION_PASS("objc-arc-contract", ObjCARCContractPass())
268*e8d8bef9SDimitry AndricFUNCTION_PASS("objc-arc-expand", ObjCARCExpandPass())
2690b57cec5SDimitry AndricFUNCTION_PASS("pgo-memop-opt", PGOMemOPSizeOpt())
2700b57cec5SDimitry AndricFUNCTION_PASS("print", PrintFunctionPass(dbgs()))
2710b57cec5SDimitry AndricFUNCTION_PASS("print<assumptions>", AssumptionPrinterPass(dbgs()))
2720b57cec5SDimitry AndricFUNCTION_PASS("print<block-freq>", BlockFrequencyPrinterPass(dbgs()))
2730b57cec5SDimitry AndricFUNCTION_PASS("print<branch-prob>", BranchProbabilityPrinterPass(dbgs()))
2740b57cec5SDimitry AndricFUNCTION_PASS("print<da>", DependenceAnalysisPrinterPass(dbgs()))
2750b57cec5SDimitry AndricFUNCTION_PASS("print<domtree>", DominatorTreePrinterPass(dbgs()))
2760b57cec5SDimitry AndricFUNCTION_PASS("print<postdomtree>", PostDominatorTreePrinterPass(dbgs()))
277*e8d8bef9SDimitry AndricFUNCTION_PASS("print<delinearization>", DelinearizationPrinterPass(dbgs()))
2780b57cec5SDimitry AndricFUNCTION_PASS("print<demanded-bits>", DemandedBitsPrinterPass(dbgs()))
2790b57cec5SDimitry AndricFUNCTION_PASS("print<domfrontier>", DominanceFrontierPrinterPass(dbgs()))
280*e8d8bef9SDimitry AndricFUNCTION_PASS("print<func-properties>", FunctionPropertiesPrinterPass(dbgs()))
2815ffd83dbSDimitry AndricFUNCTION_PASS("print<inline-cost>", InlineCostAnnotationPrinterPass(dbgs()))
282*e8d8bef9SDimitry AndricFUNCTION_PASS("print<inliner-size-estimator>",
283*e8d8bef9SDimitry Andric  InlineSizeEstimatorAnalysisPrinterPass(dbgs()))
2840b57cec5SDimitry AndricFUNCTION_PASS("print<loops>", LoopPrinterPass(dbgs()))
2850b57cec5SDimitry AndricFUNCTION_PASS("print<memoryssa>", MemorySSAPrinterPass(dbgs()))
2860b57cec5SDimitry AndricFUNCTION_PASS("print<phi-values>", PhiValuesPrinterPass(dbgs()))
2870b57cec5SDimitry AndricFUNCTION_PASS("print<regions>", RegionInfoPrinterPass(dbgs()))
2880b57cec5SDimitry AndricFUNCTION_PASS("print<scalar-evolution>", ScalarEvolutionPrinterPass(dbgs()))
2890b57cec5SDimitry AndricFUNCTION_PASS("print<stack-safety-local>", StackSafetyPrinterPass(dbgs()))
290*e8d8bef9SDimitry Andric// TODO: rename to print<foo> after NPM switch
291*e8d8bef9SDimitry AndricFUNCTION_PASS("print-alias-sets", AliasSetsPrinterPass(dbgs()))
2925ffd83dbSDimitry AndricFUNCTION_PASS("print-predicateinfo", PredicateInfoPrinterPass(dbgs()))
293*e8d8bef9SDimitry AndricFUNCTION_PASS("print-mustexecute", MustExecutePrinterPass(dbgs()))
294*e8d8bef9SDimitry AndricFUNCTION_PASS("print-memderefs", MemDerefPrinterPass(dbgs()))
2950b57cec5SDimitry AndricFUNCTION_PASS("reassociate", ReassociatePass())
296*e8d8bef9SDimitry AndricFUNCTION_PASS("redundant-dbg-inst-elim", RedundantDbgInstEliminationPass())
297*e8d8bef9SDimitry AndricFUNCTION_PASS("reg2mem", RegToMemPass())
298*e8d8bef9SDimitry AndricFUNCTION_PASS("scalarize-masked-mem-intrin", ScalarizeMaskedMemIntrinPass())
2990b57cec5SDimitry AndricFUNCTION_PASS("scalarizer", ScalarizerPass())
300*e8d8bef9SDimitry AndricFUNCTION_PASS("separate-const-offset-from-gep", SeparateConstOffsetFromGEPPass())
3010b57cec5SDimitry AndricFUNCTION_PASS("sccp", SCCPPass())
3025ffd83dbSDimitry AndricFUNCTION_PASS("simplifycfg", SimplifyCFGPass())
3030b57cec5SDimitry AndricFUNCTION_PASS("sink", SinkingPass())
3040b57cec5SDimitry AndricFUNCTION_PASS("slp-vectorizer", SLPVectorizerPass())
305*e8d8bef9SDimitry AndricFUNCTION_PASS("slsr", StraightLineStrengthReducePass())
3060b57cec5SDimitry AndricFUNCTION_PASS("speculative-execution", SpeculativeExecutionPass())
3070b57cec5SDimitry AndricFUNCTION_PASS("spec-phis", SpeculateAroundPHIsPass())
3080b57cec5SDimitry AndricFUNCTION_PASS("sroa", SROA())
309*e8d8bef9SDimitry AndricFUNCTION_PASS("strip-gc-relocates", StripGCRelocates())
310*e8d8bef9SDimitry AndricFUNCTION_PASS("structurizecfg", StructurizeCFGPass())
3110b57cec5SDimitry AndricFUNCTION_PASS("tailcallelim", TailCallElimPass())
312*e8d8bef9SDimitry AndricFUNCTION_PASS("unify-loop-exits", UnifyLoopExitsPass())
3135ffd83dbSDimitry AndricFUNCTION_PASS("vector-combine", VectorCombinePass())
3140b57cec5SDimitry AndricFUNCTION_PASS("verify", VerifierPass())
3150b57cec5SDimitry AndricFUNCTION_PASS("verify<domtree>", DominatorTreeVerifierPass())
3160b57cec5SDimitry AndricFUNCTION_PASS("verify<loops>", LoopVerifierPass())
3170b57cec5SDimitry AndricFUNCTION_PASS("verify<memoryssa>", MemorySSAVerifierPass())
3180b57cec5SDimitry AndricFUNCTION_PASS("verify<regions>", RegionInfoVerifierPass())
3190b57cec5SDimitry AndricFUNCTION_PASS("verify<safepoint-ir>", SafepointIRVerifierPass())
320480093f4SDimitry AndricFUNCTION_PASS("verify<scalar-evolution>", ScalarEvolutionVerifierPass())
3210b57cec5SDimitry AndricFUNCTION_PASS("view-cfg", CFGViewerPass())
3220b57cec5SDimitry AndricFUNCTION_PASS("view-cfg-only", CFGOnlyViewerPass())
3230b57cec5SDimitry AndricFUNCTION_PASS("transform-warning", WarnMissedTransformationsPass())
3240b57cec5SDimitry AndricFUNCTION_PASS("asan", AddressSanitizerPass(false, false, false))
3250b57cec5SDimitry AndricFUNCTION_PASS("kasan", AddressSanitizerPass(true, false, false))
3260b57cec5SDimitry AndricFUNCTION_PASS("msan", MemorySanitizerPass({}))
3270b57cec5SDimitry AndricFUNCTION_PASS("kmsan", MemorySanitizerPass({0, false, /*Kernel=*/true}))
3280b57cec5SDimitry AndricFUNCTION_PASS("tsan", ThreadSanitizerPass())
329*e8d8bef9SDimitry AndricFUNCTION_PASS("memprof", MemProfilerPass())
3300b57cec5SDimitry Andric#undef FUNCTION_PASS
3310b57cec5SDimitry Andric
3320b57cec5SDimitry Andric#ifndef FUNCTION_PASS_WITH_PARAMS
3330b57cec5SDimitry Andric#define FUNCTION_PASS_WITH_PARAMS(NAME, CREATE_PASS, PARSER)
3340b57cec5SDimitry Andric#endif
3355ffd83dbSDimitry AndricFUNCTION_PASS_WITH_PARAMS("loop-unroll",
3360b57cec5SDimitry Andric                           [](LoopUnrollOptions Opts) {
3370b57cec5SDimitry Andric                             return LoopUnrollPass(Opts);
3380b57cec5SDimitry Andric                           },
3390b57cec5SDimitry Andric                           parseLoopUnrollOptions)
3400b57cec5SDimitry AndricFUNCTION_PASS_WITH_PARAMS("msan",
3410b57cec5SDimitry Andric                           [](MemorySanitizerOptions Opts) {
3420b57cec5SDimitry Andric                             return MemorySanitizerPass(Opts);
3430b57cec5SDimitry Andric                           },
3440b57cec5SDimitry Andric                           parseMSanPassOptions)
3450b57cec5SDimitry AndricFUNCTION_PASS_WITH_PARAMS("simplify-cfg",
3460b57cec5SDimitry Andric                           [](SimplifyCFGOptions Opts) {
3470b57cec5SDimitry Andric                             return SimplifyCFGPass(Opts);
3480b57cec5SDimitry Andric                           },
3490b57cec5SDimitry Andric                           parseSimplifyCFGOptions)
3500b57cec5SDimitry AndricFUNCTION_PASS_WITH_PARAMS("loop-vectorize",
3510b57cec5SDimitry Andric                           [](LoopVectorizeOptions Opts) {
3520b57cec5SDimitry Andric                             return LoopVectorizePass(Opts);
3530b57cec5SDimitry Andric                           },
3540b57cec5SDimitry Andric                           parseLoopVectorizeOptions)
3558bcb0991SDimitry AndricFUNCTION_PASS_WITH_PARAMS("mldst-motion",
3568bcb0991SDimitry Andric                           [](MergedLoadStoreMotionOptions Opts) {
3578bcb0991SDimitry Andric                             return MergedLoadStoreMotionPass(Opts);
3588bcb0991SDimitry Andric                           },
3598bcb0991SDimitry Andric                           parseMergedLoadStoreMotionOptions)
3605ffd83dbSDimitry AndricFUNCTION_PASS_WITH_PARAMS("gvn",
3615ffd83dbSDimitry Andric                           [](GVNOptions Opts) {
3625ffd83dbSDimitry Andric                             return GVN(Opts);
3635ffd83dbSDimitry Andric                           },
3645ffd83dbSDimitry Andric                           parseGVNOptions)
3655ffd83dbSDimitry AndricFUNCTION_PASS_WITH_PARAMS("print<stack-lifetime>",
3665ffd83dbSDimitry Andric                           [](StackLifetime::LivenessType Type) {
3675ffd83dbSDimitry Andric                             return StackLifetimePrinterPass(dbgs(), Type);
3685ffd83dbSDimitry Andric                           },
3695ffd83dbSDimitry Andric                           parseStackLifetimeOptions)
3700b57cec5SDimitry Andric#undef FUNCTION_PASS_WITH_PARAMS
3710b57cec5SDimitry Andric
3720b57cec5SDimitry Andric#ifndef LOOP_ANALYSIS
3730b57cec5SDimitry Andric#define LOOP_ANALYSIS(NAME, CREATE_PASS)
3740b57cec5SDimitry Andric#endif
3750b57cec5SDimitry AndricLOOP_ANALYSIS("no-op-loop", NoOpLoopAnalysis())
3760b57cec5SDimitry AndricLOOP_ANALYSIS("access-info", LoopAccessAnalysis())
3778bcb0991SDimitry AndricLOOP_ANALYSIS("ddg", DDGAnalysis())
378*e8d8bef9SDimitry AndricLOOP_ANALYSIS("iv-users", IVUsersAnalysis())
3790b57cec5SDimitry AndricLOOP_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis(PIC))
3800b57cec5SDimitry Andric#undef LOOP_ANALYSIS
3810b57cec5SDimitry Andric
3820b57cec5SDimitry Andric#ifndef LOOP_PASS
3830b57cec5SDimitry Andric#define LOOP_PASS(NAME, CREATE_PASS)
3840b57cec5SDimitry Andric#endif
3855ffd83dbSDimitry AndricLOOP_PASS("canon-freeze", CanonicalizeFreezeInLoopsPass())
386*e8d8bef9SDimitry AndricLOOP_PASS("dot-ddg", DDGDotPrinterPass())
3870b57cec5SDimitry AndricLOOP_PASS("invalidate<all>", InvalidateAllAnalysesPass())
3880b57cec5SDimitry AndricLOOP_PASS("licm", LICMPass())
3890b57cec5SDimitry AndricLOOP_PASS("loop-idiom", LoopIdiomRecognizePass())
3900b57cec5SDimitry AndricLOOP_PASS("loop-instsimplify", LoopInstSimplifyPass())
391*e8d8bef9SDimitry AndricLOOP_PASS("loop-interchange", LoopInterchangePass())
392*e8d8bef9SDimitry AndricLOOP_PASS("loop-rotate", LoopRotatePass())
3930b57cec5SDimitry AndricLOOP_PASS("no-op-loop", NoOpLoopPass())
3940b57cec5SDimitry AndricLOOP_PASS("print", PrintLoopPass(dbgs()))
3950b57cec5SDimitry AndricLOOP_PASS("loop-deletion", LoopDeletionPass())
396*e8d8bef9SDimitry AndricLOOP_PASS("loop-simplifycfg", LoopSimplifyCFGPass())
3975ffd83dbSDimitry AndricLOOP_PASS("loop-reduce", LoopStrengthReducePass())
3980b57cec5SDimitry AndricLOOP_PASS("indvars", IndVarSimplifyPass())
3995ffd83dbSDimitry AndricLOOP_PASS("loop-unroll-full", LoopFullUnrollPass())
4000b57cec5SDimitry AndricLOOP_PASS("print-access-info", LoopAccessInfoPrinterPass(dbgs()))
4018bcb0991SDimitry AndricLOOP_PASS("print<ddg>", DDGAnalysisPrinterPass(dbgs()))
402*e8d8bef9SDimitry AndricLOOP_PASS("print<iv-users>", IVUsersPrinterPass(dbgs()))
4035ffd83dbSDimitry AndricLOOP_PASS("print<loopnest>", LoopNestPrinterPass(dbgs()))
4048bcb0991SDimitry AndricLOOP_PASS("print<loop-cache-cost>", LoopCachePrinterPass(dbgs()))
4050b57cec5SDimitry AndricLOOP_PASS("loop-predication", LoopPredicationPass())
4060b57cec5SDimitry AndricLOOP_PASS("guard-widening", GuardWideningPass())
4075ffd83dbSDimitry AndricLOOP_PASS("simple-loop-unswitch", SimpleLoopUnswitchPass())
408*e8d8bef9SDimitry AndricLOOP_PASS("loop-reroll", LoopRerollPass())
409*e8d8bef9SDimitry AndricLOOP_PASS("loop-versioning-licm", LoopVersioningLICMPass())
4100b57cec5SDimitry Andric#undef LOOP_PASS
4110b57cec5SDimitry Andric
4120b57cec5SDimitry Andric#ifndef LOOP_PASS_WITH_PARAMS
4130b57cec5SDimitry Andric#define LOOP_PASS_WITH_PARAMS(NAME, CREATE_PASS, PARSER)
4140b57cec5SDimitry Andric#endif
4150b57cec5SDimitry AndricLOOP_PASS_WITH_PARAMS("unswitch",
4160b57cec5SDimitry Andric                           [](bool NonTrivial) {
4170b57cec5SDimitry Andric                             return SimpleLoopUnswitchPass(NonTrivial);
4180b57cec5SDimitry Andric                           },
4190b57cec5SDimitry Andric                           parseLoopUnswitchOptions)
4200b57cec5SDimitry Andric#undef LOOP_PASS_WITH_PARAMS
421