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("lcg", LazyCallGraphAnalysis()) 23 MODULE_ANALYSIS("no-op-module", NoOpModuleAnalysis()) 24 MODULE_ANALYSIS("targetlibinfo", TargetLibraryAnalysis()) 25 #undef MODULE_ANALYSIS 26 27 #ifndef MODULE_PASS 28 #define MODULE_PASS(NAME, CREATE_PASS) 29 #endif 30 MODULE_PASS("invalidate<all>", InvalidateAllAnalysesPass()) 31 MODULE_PASS("no-op-module", NoOpModulePass()) 32 MODULE_PASS("print", PrintModulePass(dbgs())) 33 MODULE_PASS("print-cg", LazyCallGraphPrinterPass(dbgs())) 34 MODULE_PASS("strip-dead-prototypes", StripDeadPrototypesPass()) 35 MODULE_PASS("verify", VerifierPass()) 36 #undef MODULE_PASS 37 38 #ifndef CGSCC_ANALYSIS 39 #define CGSCC_ANALYSIS(NAME, CREATE_PASS) 40 #endif 41 CGSCC_ANALYSIS("no-op-cgscc", NoOpCGSCCAnalysis()) 42 #undef CGSCC_ANALYSIS 43 44 #ifndef CGSCC_PASS 45 #define CGSCC_PASS(NAME, CREATE_PASS) 46 #endif 47 CGSCC_PASS("invalidate<all>", InvalidateAllAnalysesPass()) 48 CGSCC_PASS("no-op-cgscc", NoOpCGSCCPass()) 49 #undef CGSCC_PASS 50 51 #ifndef FUNCTION_ANALYSIS 52 #define FUNCTION_ANALYSIS(NAME, CREATE_PASS) 53 #endif 54 FUNCTION_ANALYSIS("assumptions", AssumptionAnalysis()) 55 FUNCTION_ANALYSIS("domtree", DominatorTreeAnalysis()) 56 FUNCTION_ANALYSIS("loops", LoopAnalysis()) 57 FUNCTION_ANALYSIS("no-op-function", NoOpFunctionAnalysis()) 58 FUNCTION_ANALYSIS("scalar-evolution", ScalarEvolutionAnalysis()) 59 FUNCTION_ANALYSIS("targetlibinfo", TargetLibraryAnalysis()) 60 FUNCTION_ANALYSIS("targetir", 61 TM ? TM->getTargetIRAnalysis() : TargetIRAnalysis()) 62 #undef FUNCTION_ANALYSIS 63 64 #ifndef FUNCTION_PASS 65 #define FUNCTION_PASS(NAME, CREATE_PASS) 66 #endif 67 FUNCTION_PASS("adce", ADCEPass()) 68 FUNCTION_PASS("early-cse", EarlyCSEPass()) 69 FUNCTION_PASS("instcombine", InstCombinePass()) 70 FUNCTION_PASS("invalidate<all>", InvalidateAllAnalysesPass()) 71 FUNCTION_PASS("no-op-function", NoOpFunctionPass()) 72 FUNCTION_PASS("lower-expect", LowerExpectIntrinsicPass()) 73 FUNCTION_PASS("print", PrintFunctionPass(dbgs())) 74 FUNCTION_PASS("print<assumptions>", AssumptionPrinterPass(dbgs())) 75 FUNCTION_PASS("print<domtree>", DominatorTreePrinterPass(dbgs())) 76 FUNCTION_PASS("print<loops>", LoopPrinterPass(dbgs())) 77 FUNCTION_PASS("print<scalar-evolution>", ScalarEvolutionPrinterPass(dbgs())) 78 FUNCTION_PASS("simplify-cfg", SimplifyCFGPass()) 79 FUNCTION_PASS("sroa", SROA()) 80 FUNCTION_PASS("verify", VerifierPass()) 81 FUNCTION_PASS("verify<domtree>", DominatorTreeVerifierPass()) 82 #undef FUNCTION_PASS 83