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("called-value-propagation", CalledValuePropagationPass()) 48MODULE_PASS("canonicalize-aliases", CanonicalizeAliasesPass()) 49MODULE_PASS("cg-profile", CGProfilePass()) 50MODULE_PASS("constmerge", ConstantMergePass()) 51MODULE_PASS("cross-dso-cfi", CrossDSOCFIPass()) 52MODULE_PASS("deadargelim", DeadArgumentEliminationPass()) 53MODULE_PASS("elim-avail-extern", EliminateAvailableExternallyPass()) 54MODULE_PASS("extract-blocks", BlockExtractorPass()) 55MODULE_PASS("forceattrs", ForceFunctionAttrsPass()) 56MODULE_PASS("function-import", FunctionImportPass()) 57MODULE_PASS("globaldce", GlobalDCEPass()) 58MODULE_PASS("globalopt", GlobalOptPass()) 59MODULE_PASS("globalsplit", GlobalSplitPass()) 60MODULE_PASS("hotcoldsplit", HotColdSplittingPass()) 61MODULE_PASS("hwasan", HWAddressSanitizerPass(false, false)) 62MODULE_PASS("khwasan", HWAddressSanitizerPass(true, true)) 63MODULE_PASS("inferattrs", InferFunctionAttrsPass()) 64MODULE_PASS("inliner-wrapper", ModuleInlinerWrapperPass()) 65MODULE_PASS("inliner-wrapper-no-mandatory-first", ModuleInlinerWrapperPass( 66 getInlineParams(), 67 DebugLogging, 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("rewrite-statepoints-for-gc", RewriteStatepointsForGC()) 97MODULE_PASS("rewrite-symbols", RewriteSymbolPass()) 98MODULE_PASS("rpo-function-attrs", ReversePostOrderFunctionAttrsPass()) 99MODULE_PASS("sample-profile", SampleProfileLoaderPass()) 100MODULE_PASS("scc-oz-module-inliner", 101 buildInlinerPipeline(OptimizationLevel::Oz, ThinOrFullLTOPhase::None)) 102MODULE_PASS("loop-extract-single", LoopExtractorPass(1)) 103MODULE_PASS("strip", StripSymbolsPass()) 104MODULE_PASS("strip-dead-debug-info", StripDeadDebugInfoPass()) 105MODULE_PASS("pseudo-probe", SampleProfileProbePass(TM)) 106MODULE_PASS("strip-dead-prototypes", StripDeadPrototypesPass()) 107MODULE_PASS("strip-debug-declare", StripDebugDeclarePass()) 108MODULE_PASS("strip-nondebug", StripNonDebugSymbolsPass()) 109MODULE_PASS("strip-nonlinetable-debuginfo", StripNonLineTableDebugInfoPass()) 110MODULE_PASS("synthetic-counts-propagation", SyntheticCountsPropagation()) 111MODULE_PASS("unique-internal-linkage-names", UniqueInternalLinkageNamesPass()) 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("openmpopt", OpenMPOptPass()) 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)) 175 176#ifndef FUNCTION_ALIAS_ANALYSIS 177#define FUNCTION_ALIAS_ANALYSIS(NAME, CREATE_PASS) \ 178 FUNCTION_ANALYSIS(NAME, CREATE_PASS) 179#endif 180FUNCTION_ALIAS_ANALYSIS("basic-aa", BasicAA()) 181FUNCTION_ALIAS_ANALYSIS("cfl-anders-aa", CFLAndersAA()) 182FUNCTION_ALIAS_ANALYSIS("cfl-steens-aa", CFLSteensAA()) 183FUNCTION_ALIAS_ANALYSIS("objc-arc-aa", objcarc::ObjCARCAA()) 184FUNCTION_ALIAS_ANALYSIS("scev-aa", SCEVAA()) 185FUNCTION_ALIAS_ANALYSIS("scoped-noalias-aa", ScopedNoAliasAA()) 186FUNCTION_ALIAS_ANALYSIS("tbaa", TypeBasedAA()) 187#undef FUNCTION_ALIAS_ANALYSIS 188#undef FUNCTION_ANALYSIS 189 190#ifndef FUNCTION_PASS 191#define FUNCTION_PASS(NAME, CREATE_PASS) 192#endif 193FUNCTION_PASS("aa-eval", AAEvaluator()) 194FUNCTION_PASS("adce", ADCEPass()) 195FUNCTION_PASS("add-discriminators", AddDiscriminatorsPass()) 196FUNCTION_PASS("aggressive-instcombine", AggressiveInstCombinePass()) 197FUNCTION_PASS("assume-builder", AssumeBuilderPass()) 198FUNCTION_PASS("assume-simplify", AssumeSimplifyPass()) 199FUNCTION_PASS("alignment-from-assumptions", AlignmentFromAssumptionsPass()) 200FUNCTION_PASS("annotation-remarks", AnnotationRemarksPass()) 201FUNCTION_PASS("bdce", BDCEPass()) 202FUNCTION_PASS("bounds-checking", BoundsCheckingPass()) 203FUNCTION_PASS("break-crit-edges", BreakCriticalEdgesPass()) 204FUNCTION_PASS("callsite-splitting", CallSiteSplittingPass()) 205FUNCTION_PASS("consthoist", ConstantHoistingPass()) 206FUNCTION_PASS("constraint-elimination", ConstraintEliminationPass()) 207FUNCTION_PASS("chr", ControlHeightReductionPass()) 208FUNCTION_PASS("coro-early", CoroEarlyPass()) 209FUNCTION_PASS("coro-elide", CoroElidePass()) 210FUNCTION_PASS("coro-cleanup", CoroCleanupPass()) 211FUNCTION_PASS("correlated-propagation", CorrelatedValuePropagationPass()) 212FUNCTION_PASS("dce", DCEPass()) 213FUNCTION_PASS("div-rem-pairs", DivRemPairsPass()) 214FUNCTION_PASS("dse", DSEPass()) 215FUNCTION_PASS("dot-cfg", CFGPrinterPass()) 216FUNCTION_PASS("dot-cfg-only", CFGOnlyPrinterPass()) 217FUNCTION_PASS("early-cse", EarlyCSEPass(/*UseMemorySSA=*/false)) 218FUNCTION_PASS("early-cse-memssa", EarlyCSEPass(/*UseMemorySSA=*/true)) 219FUNCTION_PASS("ee-instrument", EntryExitInstrumenterPass(/*PostInlining=*/false)) 220FUNCTION_PASS("fix-irreducible", FixIrreduciblePass()) 221FUNCTION_PASS("make-guards-explicit", MakeGuardsExplicitPass()) 222FUNCTION_PASS("post-inline-ee-instrument", EntryExitInstrumenterPass(/*PostInlining=*/true)) 223FUNCTION_PASS("gvn-hoist", GVNHoistPass()) 224FUNCTION_PASS("gvn-sink", GVNSinkPass()) 225FUNCTION_PASS("helloworld", HelloWorldPass()) 226FUNCTION_PASS("infer-address-spaces", InferAddressSpacesPass()) 227FUNCTION_PASS("instcombine", InstCombinePass()) 228FUNCTION_PASS("instcount", InstCountPass()) 229FUNCTION_PASS("instsimplify", InstSimplifyPass()) 230FUNCTION_PASS("invalidate<all>", InvalidateAllAnalysesPass()) 231FUNCTION_PASS("irce", IRCEPass()) 232FUNCTION_PASS("float2int", Float2IntPass()) 233FUNCTION_PASS("no-op-function", NoOpFunctionPass()) 234FUNCTION_PASS("libcalls-shrinkwrap", LibCallsShrinkWrapPass()) 235FUNCTION_PASS("lint", LintPass()) 236FUNCTION_PASS("inject-tli-mappings", InjectTLIMappings()) 237FUNCTION_PASS("instnamer", InstructionNamerPass()) 238FUNCTION_PASS("loweratomic", LowerAtomicPass()) 239FUNCTION_PASS("lower-expect", LowerExpectIntrinsicPass()) 240FUNCTION_PASS("lower-guard-intrinsic", LowerGuardIntrinsicPass()) 241FUNCTION_PASS("lower-constant-intrinsics", LowerConstantIntrinsicsPass()) 242FUNCTION_PASS("lower-matrix-intrinsics", LowerMatrixIntrinsicsPass()) 243FUNCTION_PASS("lower-matrix-intrinsics-minimal", LowerMatrixIntrinsicsPass(true)) 244FUNCTION_PASS("lower-widenable-condition", LowerWidenableConditionPass()) 245FUNCTION_PASS("guard-widening", GuardWideningPass()) 246FUNCTION_PASS("load-store-vectorizer", LoadStoreVectorizerPass()) 247FUNCTION_PASS("loop-simplify", LoopSimplifyPass()) 248FUNCTION_PASS("loop-sink", LoopSinkPass()) 249FUNCTION_PASS("loop-unroll-and-jam", LoopUnrollAndJamPass()) 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<domtree>", DominatorTreePrinterPass(dbgs())) 277FUNCTION_PASS("print<postdomtree>", PostDominatorTreePrinterPass(dbgs())) 278FUNCTION_PASS("print<delinearization>", DelinearizationPrinterPass(dbgs())) 279FUNCTION_PASS("print<demanded-bits>", DemandedBitsPrinterPass(dbgs())) 280FUNCTION_PASS("print<domfrontier>", DominanceFrontierPrinterPass(dbgs())) 281FUNCTION_PASS("print<func-properties>", FunctionPropertiesPrinterPass(dbgs())) 282FUNCTION_PASS("print<inline-cost>", InlineCostAnnotationPrinterPass(dbgs())) 283FUNCTION_PASS("print<inliner-size-estimator>", 284 InlineSizeEstimatorAnalysisPrinterPass(dbgs())) 285FUNCTION_PASS("print<loops>", LoopPrinterPass(dbgs())) 286FUNCTION_PASS("print<memoryssa>", MemorySSAPrinterPass(dbgs())) 287FUNCTION_PASS("print<phi-values>", PhiValuesPrinterPass(dbgs())) 288FUNCTION_PASS("print<regions>", RegionInfoPrinterPass(dbgs())) 289FUNCTION_PASS("print<scalar-evolution>", ScalarEvolutionPrinterPass(dbgs())) 290FUNCTION_PASS("print<stack-safety-local>", StackSafetyPrinterPass(dbgs())) 291// TODO: rename to print<foo> after NPM switch 292FUNCTION_PASS("print-alias-sets", AliasSetsPrinterPass(dbgs())) 293FUNCTION_PASS("print-predicateinfo", PredicateInfoPrinterPass(dbgs())) 294FUNCTION_PASS("print-mustexecute", MustExecutePrinterPass(dbgs())) 295FUNCTION_PASS("print-memderefs", MemDerefPrinterPass(dbgs())) 296FUNCTION_PASS("reassociate", ReassociatePass()) 297FUNCTION_PASS("redundant-dbg-inst-elim", RedundantDbgInstEliminationPass()) 298FUNCTION_PASS("reg2mem", RegToMemPass()) 299FUNCTION_PASS("scalarize-masked-mem-intrin", ScalarizeMaskedMemIntrinPass()) 300FUNCTION_PASS("scalarizer", ScalarizerPass()) 301FUNCTION_PASS("separate-const-offset-from-gep", SeparateConstOffsetFromGEPPass()) 302FUNCTION_PASS("sccp", SCCPPass()) 303FUNCTION_PASS("simplifycfg", SimplifyCFGPass()) 304FUNCTION_PASS("sink", SinkingPass()) 305FUNCTION_PASS("slp-vectorizer", SLPVectorizerPass()) 306FUNCTION_PASS("slsr", StraightLineStrengthReducePass()) 307FUNCTION_PASS("speculative-execution", SpeculativeExecutionPass()) 308FUNCTION_PASS("spec-phis", SpeculateAroundPHIsPass()) 309FUNCTION_PASS("sroa", SROA()) 310FUNCTION_PASS("strip-gc-relocates", StripGCRelocates()) 311FUNCTION_PASS("structurizecfg", StructurizeCFGPass()) 312FUNCTION_PASS("tailcallelim", TailCallElimPass()) 313FUNCTION_PASS("unify-loop-exits", UnifyLoopExitsPass()) 314FUNCTION_PASS("vector-combine", VectorCombinePass()) 315FUNCTION_PASS("verify", VerifierPass()) 316FUNCTION_PASS("verify<domtree>", DominatorTreeVerifierPass()) 317FUNCTION_PASS("verify<loops>", LoopVerifierPass()) 318FUNCTION_PASS("verify<memoryssa>", MemorySSAVerifierPass()) 319FUNCTION_PASS("verify<regions>", RegionInfoVerifierPass()) 320FUNCTION_PASS("verify<safepoint-ir>", SafepointIRVerifierPass()) 321FUNCTION_PASS("verify<scalar-evolution>", ScalarEvolutionVerifierPass()) 322FUNCTION_PASS("view-cfg", CFGViewerPass()) 323FUNCTION_PASS("view-cfg-only", CFGOnlyViewerPass()) 324FUNCTION_PASS("transform-warning", WarnMissedTransformationsPass()) 325FUNCTION_PASS("asan", AddressSanitizerPass(false, false, false)) 326FUNCTION_PASS("kasan", AddressSanitizerPass(true, false, false)) 327FUNCTION_PASS("msan", MemorySanitizerPass({})) 328FUNCTION_PASS("kmsan", MemorySanitizerPass({0, false, /*Kernel=*/true})) 329FUNCTION_PASS("tsan", ThreadSanitizerPass()) 330FUNCTION_PASS("memprof", MemProfilerPass()) 331#undef FUNCTION_PASS 332 333#ifndef FUNCTION_PASS_WITH_PARAMS 334#define FUNCTION_PASS_WITH_PARAMS(NAME, CREATE_PASS, PARSER) 335#endif 336FUNCTION_PASS_WITH_PARAMS("loop-unroll", 337 [](LoopUnrollOptions Opts) { 338 return LoopUnrollPass(Opts); 339 }, 340 parseLoopUnrollOptions) 341FUNCTION_PASS_WITH_PARAMS("msan", 342 [](MemorySanitizerOptions Opts) { 343 return MemorySanitizerPass(Opts); 344 }, 345 parseMSanPassOptions) 346FUNCTION_PASS_WITH_PARAMS("simplify-cfg", 347 [](SimplifyCFGOptions Opts) { 348 return SimplifyCFGPass(Opts); 349 }, 350 parseSimplifyCFGOptions) 351FUNCTION_PASS_WITH_PARAMS("loop-vectorize", 352 [](LoopVectorizeOptions Opts) { 353 return LoopVectorizePass(Opts); 354 }, 355 parseLoopVectorizeOptions) 356FUNCTION_PASS_WITH_PARAMS("mldst-motion", 357 [](MergedLoadStoreMotionOptions Opts) { 358 return MergedLoadStoreMotionPass(Opts); 359 }, 360 parseMergedLoadStoreMotionOptions) 361FUNCTION_PASS_WITH_PARAMS("gvn", 362 [](GVNOptions Opts) { 363 return GVN(Opts); 364 }, 365 parseGVNOptions) 366FUNCTION_PASS_WITH_PARAMS("print<stack-lifetime>", 367 [](StackLifetime::LivenessType Type) { 368 return StackLifetimePrinterPass(dbgs(), Type); 369 }, 370 parseStackLifetimeOptions) 371#undef FUNCTION_PASS_WITH_PARAMS 372 373#ifndef LOOP_ANALYSIS 374#define LOOP_ANALYSIS(NAME, CREATE_PASS) 375#endif 376LOOP_ANALYSIS("no-op-loop", NoOpLoopAnalysis()) 377LOOP_ANALYSIS("access-info", LoopAccessAnalysis()) 378LOOP_ANALYSIS("ddg", DDGAnalysis()) 379LOOP_ANALYSIS("iv-users", IVUsersAnalysis()) 380LOOP_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis(PIC)) 381#undef LOOP_ANALYSIS 382 383#ifndef LOOP_PASS 384#define LOOP_PASS(NAME, CREATE_PASS) 385#endif 386LOOP_PASS("canon-freeze", CanonicalizeFreezeInLoopsPass()) 387LOOP_PASS("dot-ddg", DDGDotPrinterPass()) 388LOOP_PASS("invalidate<all>", InvalidateAllAnalysesPass()) 389LOOP_PASS("licm", LICMPass()) 390LOOP_PASS("loop-idiom", LoopIdiomRecognizePass()) 391LOOP_PASS("loop-instsimplify", LoopInstSimplifyPass()) 392LOOP_PASS("loop-interchange", LoopInterchangePass()) 393LOOP_PASS("loop-rotate", LoopRotatePass()) 394LOOP_PASS("no-op-loop", NoOpLoopPass()) 395LOOP_PASS("print", PrintLoopPass(dbgs())) 396LOOP_PASS("loop-deletion", LoopDeletionPass()) 397LOOP_PASS("loop-simplifycfg", LoopSimplifyCFGPass()) 398LOOP_PASS("loop-reduce", LoopStrengthReducePass()) 399LOOP_PASS("indvars", IndVarSimplifyPass()) 400LOOP_PASS("loop-unroll-full", LoopFullUnrollPass()) 401LOOP_PASS("print-access-info", LoopAccessInfoPrinterPass(dbgs())) 402LOOP_PASS("print<ddg>", DDGAnalysisPrinterPass(dbgs())) 403LOOP_PASS("print<iv-users>", IVUsersPrinterPass(dbgs())) 404LOOP_PASS("print<loopnest>", LoopNestPrinterPass(dbgs())) 405LOOP_PASS("print<loop-cache-cost>", LoopCachePrinterPass(dbgs())) 406LOOP_PASS("loop-predication", LoopPredicationPass()) 407LOOP_PASS("guard-widening", GuardWideningPass()) 408LOOP_PASS("simple-loop-unswitch", SimpleLoopUnswitchPass()) 409LOOP_PASS("loop-reroll", LoopRerollPass()) 410LOOP_PASS("loop-versioning-licm", LoopVersioningLICMPass()) 411#undef LOOP_PASS 412 413#ifndef LOOP_PASS_WITH_PARAMS 414#define LOOP_PASS_WITH_PARAMS(NAME, CREATE_PASS, PARSER) 415#endif 416LOOP_PASS_WITH_PARAMS("unswitch", 417 [](bool NonTrivial) { 418 return SimpleLoopUnswitchPass(NonTrivial); 419 }, 420 parseLoopUnswitchOptions) 421#undef LOOP_PASS_WITH_PARAMS 422