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 22 MODULE_ANALYSIS("callgraph", CallGraphAnalysis()) 23 MODULE_ANALYSIS("lcg", LazyCallGraphAnalysis()) 24 MODULE_ANALYSIS("no-op-module", NoOpModuleAnalysis()) 25 MODULE_ANALYSIS("profile-summary", ProfileSummaryAnalysis()) 26 MODULE_ANALYSIS("targetlibinfo", TargetLibraryAnalysis()) 27 MODULE_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 33 MODULE_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 40 MODULE_PASS("constmerge", ConstantMergePass()) 41 MODULE_PASS("cross-dso-cfi", CrossDSOCFIPass()) 42 MODULE_PASS("deadargelim", DeadArgumentEliminationPass()) 43 MODULE_PASS("elim-avail-extern", EliminateAvailableExternallyPass()) 44 MODULE_PASS("forceattrs", ForceFunctionAttrsPass()) 45 MODULE_PASS("globaldce", GlobalDCEPass()) 46 MODULE_PASS("globalopt", GlobalOptPass()) 47 MODULE_PASS("inferattrs", InferFunctionAttrsPass()) 48 MODULE_PASS("insert-gcov-profiling", GCOVProfilerPass()) 49 MODULE_PASS("instrprof", InstrProfiling()) 50 MODULE_PASS("internalize", InternalizePass()) 51 MODULE_PASS("invalidate<all>", InvalidateAllAnalysesPass()) 52 MODULE_PASS("ipsccp", IPSCCPPass()) 53 MODULE_PASS("lowertypetests", LowerTypeTestsPass()) 54 MODULE_PASS("no-op-module", NoOpModulePass()) 55 MODULE_PASS("partial-inliner", PartialInlinerPass()) 56 MODULE_PASS("pgo-icall-prom", PGOIndirectCallPromotion()) 57 MODULE_PASS("pgo-instr-gen", PGOInstrumentationGen()) 58 MODULE_PASS("pgo-instr-use", PGOInstrumentationUse()) 59 MODULE_PASS("pre-isel-intrinsic-lowering", PreISelIntrinsicLoweringPass()) 60 MODULE_PASS("print-profile-summary", ProfileSummaryPrinterPass(dbgs())) 61 MODULE_PASS("print-callgraph", CallGraphPrinterPass(dbgs())) 62 MODULE_PASS("print", PrintModulePass(dbgs())) 63 MODULE_PASS("print-lcg", LazyCallGraphPrinterPass(dbgs())) 64 MODULE_PASS("print-lcg-dot", LazyCallGraphDOTPrinterPass(dbgs())) 65 MODULE_PASS("rpo-functionattrs", ReversePostOrderFunctionAttrsPass()) 66 MODULE_PASS("sample-profile", SampleProfileLoaderPass()) 67 MODULE_PASS("strip-dead-prototypes", StripDeadPrototypesPass()) 68 MODULE_PASS("wholeprogramdevirt", WholeProgramDevirtPass()) 69 MODULE_PASS("verify", VerifierPass()) 70 #undef MODULE_PASS 71 72 #ifndef CGSCC_ANALYSIS 73 #define CGSCC_ANALYSIS(NAME, CREATE_PASS) 74 #endif 75 CGSCC_ANALYSIS("no-op-cgscc", NoOpCGSCCAnalysis()) 76 #undef CGSCC_ANALYSIS 77 78 #ifndef CGSCC_PASS 79 #define CGSCC_PASS(NAME, CREATE_PASS) 80 #endif 81 CGSCC_PASS("invalidate<all>", InvalidateAllAnalysesPass()) 82 CGSCC_PASS("function-attrs", PostOrderFunctionAttrsPass()) 83 CGSCC_PASS("no-op-cgscc", NoOpCGSCCPass()) 84 #undef CGSCC_PASS 85 86 #ifndef FUNCTION_ANALYSIS 87 #define FUNCTION_ANALYSIS(NAME, CREATE_PASS) 88 #endif 89 FUNCTION_ANALYSIS("aa", AAManager()) 90 FUNCTION_ANALYSIS("assumptions", AssumptionAnalysis()) 91 FUNCTION_ANALYSIS("block-freq", BlockFrequencyAnalysis()) 92 FUNCTION_ANALYSIS("branch-prob", BranchProbabilityAnalysis()) 93 FUNCTION_ANALYSIS("domtree", DominatorTreeAnalysis()) 94 FUNCTION_ANALYSIS("postdomtree", PostDominatorTreeAnalysis()) 95 FUNCTION_ANALYSIS("demanded-bits", DemandedBitsAnalysis()) 96 FUNCTION_ANALYSIS("domfrontier", DominanceFrontierAnalysis()) 97 FUNCTION_ANALYSIS("loops", LoopAnalysis()) 98 FUNCTION_ANALYSIS("lazy-value-info", LazyValueAnalysis()) 99 FUNCTION_ANALYSIS("da", DependenceAnalysis()) 100 FUNCTION_ANALYSIS("memdep", MemoryDependenceAnalysis()) 101 FUNCTION_ANALYSIS("memoryssa", MemorySSAAnalysis()) 102 FUNCTION_ANALYSIS("regions", RegionInfoAnalysis()) 103 FUNCTION_ANALYSIS("no-op-function", NoOpFunctionAnalysis()) 104 FUNCTION_ANALYSIS("scalar-evolution", ScalarEvolutionAnalysis()) 105 FUNCTION_ANALYSIS("targetlibinfo", TargetLibraryAnalysis()) 106 FUNCTION_ANALYSIS("targetir", 107 TM ? TM->getTargetIRAnalysis() : TargetIRAnalysis()) 108 FUNCTION_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 114 FUNCTION_ALIAS_ANALYSIS("basic-aa", BasicAA()) 115 FUNCTION_ALIAS_ANALYSIS("cfl-anders-aa", CFLAndersAA()) 116 FUNCTION_ALIAS_ANALYSIS("cfl-steens-aa", CFLSteensAA()) 117 FUNCTION_ALIAS_ANALYSIS("scev-aa", SCEVAA()) 118 FUNCTION_ALIAS_ANALYSIS("scoped-noalias-aa", ScopedNoAliasAA()) 119 FUNCTION_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 126 FUNCTION_PASS("aa-eval", AAEvaluator()) 127 FUNCTION_PASS("adce", ADCEPass()) 128 FUNCTION_PASS("add-discriminators", AddDiscriminatorsPass()) 129 FUNCTION_PASS("alignment-from-assumptions", AlignmentFromAssumptionsPass()) 130 FUNCTION_PASS("bdce", BDCEPass()) 131 FUNCTION_PASS("consthoist", ConstantHoistingPass()) 132 FUNCTION_PASS("correlated-propagation", CorrelatedValuePropagationPass()) 133 FUNCTION_PASS("dce", DCEPass()) 134 FUNCTION_PASS("dse", DSEPass()) 135 FUNCTION_PASS("early-cse", EarlyCSEPass()) 136 FUNCTION_PASS("instcombine", InstCombinePass()) 137 FUNCTION_PASS("instsimplify", InstSimplifierPass()) 138 FUNCTION_PASS("invalidate<all>", InvalidateAllAnalysesPass()) 139 FUNCTION_PASS("float2int", Float2IntPass()) 140 FUNCTION_PASS("no-op-function", NoOpFunctionPass()) 141 FUNCTION_PASS("loweratomic", LowerAtomicPass()) 142 FUNCTION_PASS("lower-expect", LowerExpectIntrinsicPass()) 143 FUNCTION_PASS("guard-widening", GuardWideningPass()) 144 FUNCTION_PASS("gvn", GVN()) 145 FUNCTION_PASS("loop-simplify", LoopSimplifyPass()) 146 FUNCTION_PASS("mem2reg", PromotePass()) 147 FUNCTION_PASS("memcpyopt", MemCpyOptPass()) 148 FUNCTION_PASS("mldst-motion", MergedLoadStoreMotionPass()) 149 FUNCTION_PASS("jump-threading", JumpThreadingPass()) 150 FUNCTION_PASS("partially-inline-libcalls", PartiallyInlineLibCallsPass()) 151 FUNCTION_PASS("lcssa", LCSSAPass()) 152 FUNCTION_PASS("loop-vectorize", LoopVectorizePass()) 153 FUNCTION_PASS("print", PrintFunctionPass(dbgs())) 154 FUNCTION_PASS("print<assumptions>", AssumptionPrinterPass(dbgs())) 155 FUNCTION_PASS("print<block-freq>", BlockFrequencyPrinterPass(dbgs())) 156 FUNCTION_PASS("print<branch-prob>", BranchProbabilityPrinterPass(dbgs())) 157 FUNCTION_PASS("print<domtree>", DominatorTreePrinterPass(dbgs())) 158 FUNCTION_PASS("print<postdomtree>", PostDominatorTreePrinterPass(dbgs())) 159 FUNCTION_PASS("print<demanded-bits>", DemandedBitsPrinterPass(dbgs())) 160 FUNCTION_PASS("print<domfrontier>", DominanceFrontierPrinterPass(dbgs())) 161 FUNCTION_PASS("print<loops>", LoopPrinterPass(dbgs())) 162 FUNCTION_PASS("print<memoryssa>", MemorySSAPrinterPass(dbgs())) 163 FUNCTION_PASS("print<regions>", RegionInfoPrinterPass(dbgs())) 164 FUNCTION_PASS("print<scalar-evolution>", ScalarEvolutionPrinterPass(dbgs())) 165 FUNCTION_PASS("reassociate", ReassociatePass()) 166 FUNCTION_PASS("sccp", SCCPPass()) 167 FUNCTION_PASS("simplify-cfg", SimplifyCFGPass()) 168 FUNCTION_PASS("sink", SinkingPass()) 169 FUNCTION_PASS("slp-vectorizer", SLPVectorizerPass()) 170 FUNCTION_PASS("sroa", SROA()) 171 FUNCTION_PASS("tailcallelim", TailCallElimPass()) 172 FUNCTION_PASS("unreachableblockelim", UnreachableBlockElimPass()) 173 FUNCTION_PASS("verify", VerifierPass()) 174 FUNCTION_PASS("verify<domtree>", DominatorTreeVerifierPass()) 175 FUNCTION_PASS("verify<memoryssa>", MemorySSAVerifierPass()) 176 FUNCTION_PASS("verify<regions>", RegionInfoVerifierPass()) 177 #undef FUNCTION_PASS 178 179 #ifndef LOOP_ANALYSIS 180 #define LOOP_ANALYSIS(NAME, CREATE_PASS) 181 #endif 182 LOOP_ANALYSIS("no-op-loop", NoOpLoopAnalysis()) 183 LOOP_ANALYSIS("access-info", LoopAccessAnalysis()) 184 #undef LOOP_ANALYSIS 185 186 #ifndef LOOP_PASS 187 #define LOOP_PASS(NAME, CREATE_PASS) 188 #endif 189 LOOP_PASS("invalidate<all>", InvalidateAllAnalysesPass()) 190 LOOP_PASS("licm", LICMPass()) 191 LOOP_PASS("loop-idiom", LoopIdiomRecognizePass()) 192 LOOP_PASS("rotate", LoopRotatePass()) 193 LOOP_PASS("no-op-loop", NoOpLoopPass()) 194 LOOP_PASS("print", PrintLoopPass(dbgs())) 195 LOOP_PASS("loop-deletion", LoopDeletionPass()) 196 LOOP_PASS("simplify-cfg", LoopSimplifyCFGPass()) 197 LOOP_PASS("indvars", IndVarSimplifyPass()) 198 LOOP_PASS("print-access-info", LoopAccessInfoPrinterPass(dbgs())) 199 #undef LOOP_PASS 200