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