1//===- PassRegistry.def - Registry of passes --------------------*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9// 10// This file is used as the registry of passes that are part of the core LLVM 11// libraries. This file describes both transformation passes and analyses 12// Analyses are registered while transformation passes have names registered 13// that can be used when providing a textual pass pipeline. 14// 15//===----------------------------------------------------------------------===// 16 17// NOTE: NO INCLUDE GUARD DESIRED! 18 19#ifndef MODULE_ANALYSIS 20#define MODULE_ANALYSIS(NAME, CREATE_PASS) 21#endif 22MODULE_ANALYSIS("callgraph", CallGraphAnalysis()) 23MODULE_ANALYSIS("lcg", LazyCallGraphAnalysis()) 24MODULE_ANALYSIS("no-op-module", NoOpModuleAnalysis()) 25MODULE_ANALYSIS("profile-summary", ProfileSummaryAnalysis()) 26MODULE_ANALYSIS("targetlibinfo", TargetLibraryAnalysis()) 27MODULE_ANALYSIS("verify", VerifierAnalysis()) 28 29#ifndef MODULE_ALIAS_ANALYSIS 30#define MODULE_ALIAS_ANALYSIS(NAME, CREATE_PASS) \ 31 MODULE_ANALYSIS(NAME, CREATE_PASS) 32#endif 33MODULE_ALIAS_ANALYSIS("globals-aa", GlobalsAA()) 34#undef MODULE_ALIAS_ANALYSIS 35#undef MODULE_ANALYSIS 36 37#ifndef MODULE_PASS 38#define MODULE_PASS(NAME, CREATE_PASS) 39#endif 40MODULE_PASS("constmerge", ConstantMergePass()) 41MODULE_PASS("cross-dso-cfi", CrossDSOCFIPass()) 42MODULE_PASS("deadargelim", DeadArgumentEliminationPass()) 43MODULE_PASS("elim-avail-extern", EliminateAvailableExternallyPass()) 44MODULE_PASS("forceattrs", ForceFunctionAttrsPass()) 45MODULE_PASS("globaldce", GlobalDCEPass()) 46MODULE_PASS("globalopt", GlobalOptPass()) 47MODULE_PASS("inferattrs", InferFunctionAttrsPass()) 48MODULE_PASS("insert-gcov-profiling", GCOVProfilerPass()) 49MODULE_PASS("instrprof", InstrProfiling()) 50MODULE_PASS("internalize", InternalizePass()) 51MODULE_PASS("invalidate<all>", InvalidateAllAnalysesPass()) 52MODULE_PASS("ipsccp", IPSCCPPass()) 53MODULE_PASS("lowertypetests", LowerTypeTestsPass()) 54MODULE_PASS("no-op-module", NoOpModulePass()) 55MODULE_PASS("partial-inliner", PartialInlinerPass()) 56MODULE_PASS("pgo-icall-prom", PGOIndirectCallPromotion()) 57MODULE_PASS("pgo-instr-gen", PGOInstrumentationGen()) 58MODULE_PASS("pgo-instr-use", PGOInstrumentationUse()) 59MODULE_PASS("pre-isel-intrinsic-lowering", PreISelIntrinsicLoweringPass()) 60MODULE_PASS("print-profile-summary", ProfileSummaryPrinterPass(dbgs())) 61MODULE_PASS("print-callgraph", CallGraphPrinterPass(dbgs())) 62MODULE_PASS("print", PrintModulePass(dbgs())) 63MODULE_PASS("print-lcg", LazyCallGraphPrinterPass(dbgs())) 64MODULE_PASS("print-lcg-dot", LazyCallGraphDOTPrinterPass(dbgs())) 65MODULE_PASS("rpo-functionattrs", ReversePostOrderFunctionAttrsPass()) 66MODULE_PASS("sample-profile", SampleProfileLoaderPass()) 67MODULE_PASS("strip-dead-prototypes", StripDeadPrototypesPass()) 68MODULE_PASS("wholeprogramdevirt", WholeProgramDevirtPass()) 69MODULE_PASS("verify", VerifierPass()) 70#undef MODULE_PASS 71 72#ifndef CGSCC_ANALYSIS 73#define CGSCC_ANALYSIS(NAME, CREATE_PASS) 74#endif 75CGSCC_ANALYSIS("no-op-cgscc", NoOpCGSCCAnalysis()) 76#undef CGSCC_ANALYSIS 77 78#ifndef CGSCC_PASS 79#define CGSCC_PASS(NAME, CREATE_PASS) 80#endif 81CGSCC_PASS("invalidate<all>", InvalidateAllAnalysesPass()) 82CGSCC_PASS("function-attrs", PostOrderFunctionAttrsPass()) 83CGSCC_PASS("no-op-cgscc", NoOpCGSCCPass()) 84#undef CGSCC_PASS 85 86#ifndef FUNCTION_ANALYSIS 87#define FUNCTION_ANALYSIS(NAME, CREATE_PASS) 88#endif 89FUNCTION_ANALYSIS("aa", AAManager()) 90FUNCTION_ANALYSIS("assumptions", AssumptionAnalysis()) 91FUNCTION_ANALYSIS("block-freq", BlockFrequencyAnalysis()) 92FUNCTION_ANALYSIS("branch-prob", BranchProbabilityAnalysis()) 93FUNCTION_ANALYSIS("domtree", DominatorTreeAnalysis()) 94FUNCTION_ANALYSIS("postdomtree", PostDominatorTreeAnalysis()) 95FUNCTION_ANALYSIS("demanded-bits", DemandedBitsAnalysis()) 96FUNCTION_ANALYSIS("domfrontier", DominanceFrontierAnalysis()) 97FUNCTION_ANALYSIS("loops", LoopAnalysis()) 98FUNCTION_ANALYSIS("lazy-value-info", LazyValueAnalysis()) 99FUNCTION_ANALYSIS("da", DependenceAnalysis()) 100FUNCTION_ANALYSIS("memdep", MemoryDependenceAnalysis()) 101FUNCTION_ANALYSIS("memoryssa", MemorySSAAnalysis()) 102FUNCTION_ANALYSIS("regions", RegionInfoAnalysis()) 103FUNCTION_ANALYSIS("no-op-function", NoOpFunctionAnalysis()) 104FUNCTION_ANALYSIS("scalar-evolution", ScalarEvolutionAnalysis()) 105FUNCTION_ANALYSIS("targetlibinfo", TargetLibraryAnalysis()) 106FUNCTION_ANALYSIS("targetir", 107 TM ? TM->getTargetIRAnalysis() : TargetIRAnalysis()) 108FUNCTION_ANALYSIS("verify", VerifierAnalysis()) 109 110#ifndef FUNCTION_ALIAS_ANALYSIS 111#define FUNCTION_ALIAS_ANALYSIS(NAME, CREATE_PASS) \ 112 FUNCTION_ANALYSIS(NAME, CREATE_PASS) 113#endif 114FUNCTION_ALIAS_ANALYSIS("basic-aa", BasicAA()) 115FUNCTION_ALIAS_ANALYSIS("cfl-anders-aa", CFLAndersAA()) 116FUNCTION_ALIAS_ANALYSIS("cfl-steens-aa", CFLSteensAA()) 117FUNCTION_ALIAS_ANALYSIS("scev-aa", SCEVAA()) 118FUNCTION_ALIAS_ANALYSIS("scoped-noalias-aa", ScopedNoAliasAA()) 119FUNCTION_ALIAS_ANALYSIS("type-based-aa", TypeBasedAA()) 120#undef FUNCTION_ALIAS_ANALYSIS 121#undef FUNCTION_ANALYSIS 122 123#ifndef FUNCTION_PASS 124#define FUNCTION_PASS(NAME, CREATE_PASS) 125#endif 126FUNCTION_PASS("aa-eval", AAEvaluator()) 127FUNCTION_PASS("adce", ADCEPass()) 128FUNCTION_PASS("add-discriminators", AddDiscriminatorsPass()) 129FUNCTION_PASS("alignment-from-assumptions", AlignmentFromAssumptionsPass()) 130FUNCTION_PASS("bdce", BDCEPass()) 131FUNCTION_PASS("consthoist", ConstantHoistingPass()) 132FUNCTION_PASS("correlated-propagation", CorrelatedValuePropagationPass()) 133FUNCTION_PASS("dce", DCEPass()) 134FUNCTION_PASS("dse", DSEPass()) 135FUNCTION_PASS("early-cse", EarlyCSEPass()) 136FUNCTION_PASS("instcombine", InstCombinePass()) 137FUNCTION_PASS("instsimplify", InstSimplifierPass()) 138FUNCTION_PASS("invalidate<all>", InvalidateAllAnalysesPass()) 139FUNCTION_PASS("float2int", Float2IntPass()) 140FUNCTION_PASS("no-op-function", NoOpFunctionPass()) 141FUNCTION_PASS("loweratomic", LowerAtomicPass()) 142FUNCTION_PASS("lower-expect", LowerExpectIntrinsicPass()) 143FUNCTION_PASS("guard-widening", GuardWideningPass()) 144FUNCTION_PASS("gvn", GVN()) 145FUNCTION_PASS("loop-simplify", LoopSimplifyPass()) 146FUNCTION_PASS("mem2reg", PromotePass()) 147FUNCTION_PASS("memcpyopt", MemCpyOptPass()) 148FUNCTION_PASS("mldst-motion", MergedLoadStoreMotionPass()) 149FUNCTION_PASS("jump-threading", JumpThreadingPass()) 150FUNCTION_PASS("partially-inline-libcalls", PartiallyInlineLibCallsPass()) 151FUNCTION_PASS("lcssa", LCSSAPass()) 152FUNCTION_PASS("loop-vectorize", LoopVectorizePass()) 153FUNCTION_PASS("print", PrintFunctionPass(dbgs())) 154FUNCTION_PASS("print<assumptions>", AssumptionPrinterPass(dbgs())) 155FUNCTION_PASS("print<block-freq>", BlockFrequencyPrinterPass(dbgs())) 156FUNCTION_PASS("print<branch-prob>", BranchProbabilityPrinterPass(dbgs())) 157FUNCTION_PASS("print<domtree>", DominatorTreePrinterPass(dbgs())) 158FUNCTION_PASS("print<postdomtree>", PostDominatorTreePrinterPass(dbgs())) 159FUNCTION_PASS("print<demanded-bits>", DemandedBitsPrinterPass(dbgs())) 160FUNCTION_PASS("print<domfrontier>", DominanceFrontierPrinterPass(dbgs())) 161FUNCTION_PASS("print<loops>", LoopPrinterPass(dbgs())) 162FUNCTION_PASS("print<memoryssa>", MemorySSAPrinterPass(dbgs())) 163FUNCTION_PASS("print<regions>", RegionInfoPrinterPass(dbgs())) 164FUNCTION_PASS("print<scalar-evolution>", ScalarEvolutionPrinterPass(dbgs())) 165FUNCTION_PASS("reassociate", ReassociatePass()) 166FUNCTION_PASS("sccp", SCCPPass()) 167FUNCTION_PASS("simplify-cfg", SimplifyCFGPass()) 168FUNCTION_PASS("sink", SinkingPass()) 169FUNCTION_PASS("slp-vectorizer", SLPVectorizerPass()) 170FUNCTION_PASS("sroa", SROA()) 171FUNCTION_PASS("tailcallelim", TailCallElimPass()) 172FUNCTION_PASS("unreachableblockelim", UnreachableBlockElimPass()) 173FUNCTION_PASS("verify", VerifierPass()) 174FUNCTION_PASS("verify<domtree>", DominatorTreeVerifierPass()) 175FUNCTION_PASS("verify<memoryssa>", MemorySSAVerifierPass()) 176FUNCTION_PASS("verify<regions>", RegionInfoVerifierPass()) 177#undef FUNCTION_PASS 178 179#ifndef LOOP_ANALYSIS 180#define LOOP_ANALYSIS(NAME, CREATE_PASS) 181#endif 182LOOP_ANALYSIS("no-op-loop", NoOpLoopAnalysis()) 183LOOP_ANALYSIS("access-info", LoopAccessAnalysis()) 184#undef LOOP_ANALYSIS 185 186#ifndef LOOP_PASS 187#define LOOP_PASS(NAME, CREATE_PASS) 188#endif 189LOOP_PASS("invalidate<all>", InvalidateAllAnalysesPass()) 190LOOP_PASS("licm", LICMPass()) 191LOOP_PASS("loop-idiom", LoopIdiomRecognizePass()) 192LOOP_PASS("rotate", LoopRotatePass()) 193LOOP_PASS("no-op-loop", NoOpLoopPass()) 194LOOP_PASS("print", PrintLoopPass(dbgs())) 195LOOP_PASS("loop-deletion", LoopDeletionPass()) 196LOOP_PASS("simplify-cfg", LoopSimplifyCFGPass()) 197LOOP_PASS("indvars", IndVarSimplifyPass()) 198LOOP_PASS("print-access-info", LoopAccessInfoPrinterPass(dbgs())) 199#undef LOOP_PASS 200