PassRegistry.def revision 283625
1184610Salfred//===- PassRegistry.def - Registry of passes --------------------*- C++ -*-===// 2184610Salfred// 3184610Salfred// The LLVM Compiler Infrastructure 4184610Salfred// 5184610Salfred// This file is distributed under the University of Illinois Open Source 6184610Salfred// License. See LICENSE.TXT for details. 7184610Salfred// 8184610Salfred//===----------------------------------------------------------------------===// 9184610Salfred// 10184610Salfred// This file is used as the registry of passes that are part of the core LLVM 11184610Salfred// libraries. This file describes both transformation passes and analyses 12184610Salfred// Analyses are registered while transformation passes have names registered 13184610Salfred// that can be used when providing a textual pass pipeline. 14184610Salfred// 15184610Salfred//===----------------------------------------------------------------------===// 16184610Salfred 17184610Salfred// NOTE: NO INCLUDE GUARD DESIRED! 18184610Salfred 19184610Salfred#ifndef MODULE_ANALYSIS 20184610Salfred#define MODULE_ANALYSIS(NAME, CREATE_PASS) 21184610Salfred#endif 22184610SalfredMODULE_ANALYSIS("lcg", LazyCallGraphAnalysis()) 23184610SalfredMODULE_ANALYSIS("no-op-module", NoOpModuleAnalysis()) 24184610SalfredMODULE_ANALYSIS("targetlibinfo", TargetLibraryAnalysis()) 25184610Salfred#undef MODULE_ANALYSIS 26188746Sthompsa 27188942Sthompsa#ifndef MODULE_PASS 28188942Sthompsa#define MODULE_PASS(NAME, CREATE_PASS) 29188942Sthompsa#endif 30188942SthompsaMODULE_PASS("invalidate<all>", InvalidateAllAnalysesPass()) 31184610SalfredMODULE_PASS("no-op-module", NoOpModulePass()) 32184610SalfredMODULE_PASS("print", PrintModulePass(dbgs())) 33184610SalfredMODULE_PASS("print-cg", LazyCallGraphPrinterPass(dbgs())) 34188942SthompsaMODULE_PASS("verify", VerifierPass()) 35188942Sthompsa#undef MODULE_PASS 36188942Sthompsa 37188942Sthompsa#ifndef CGSCC_ANALYSIS 38188942Sthompsa#define CGSCC_ANALYSIS(NAME, CREATE_PASS) 39188942Sthompsa#endif 40184610SalfredCGSCC_ANALYSIS("no-op-cgscc", NoOpCGSCCAnalysis()) 41188942Sthompsa#undef CGSCC_ANALYSIS 42184610Salfred 43184610Salfred#ifndef CGSCC_PASS 44184610Salfred#define CGSCC_PASS(NAME, CREATE_PASS) 45184610Salfred#endif 46184610SalfredCGSCC_PASS("invalidate<all>", InvalidateAllAnalysesPass()) 47184610SalfredCGSCC_PASS("no-op-cgscc", NoOpCGSCCPass()) 48184610Salfred#undef CGSCC_PASS 49184610Salfred 50184610Salfred#ifndef FUNCTION_ANALYSIS 51184610Salfred#define FUNCTION_ANALYSIS(NAME, CREATE_PASS) 52184610Salfred#endif 53184610SalfredFUNCTION_ANALYSIS("assumptions", AssumptionAnalysis()) 54184610SalfredFUNCTION_ANALYSIS("domtree", DominatorTreeAnalysis()) 55184610SalfredFUNCTION_ANALYSIS("loops", LoopAnalysis()) 56184610SalfredFUNCTION_ANALYSIS("no-op-function", NoOpFunctionAnalysis()) 57184610SalfredFUNCTION_ANALYSIS("targetlibinfo", TargetLibraryAnalysis()) 58184610SalfredFUNCTION_ANALYSIS("targetir", 59184610Salfred TM ? TM->getTargetIRAnalysis() : TargetIRAnalysis()) 60184610Salfred#undef FUNCTION_ANALYSIS 61184610Salfred 62184610Salfred#ifndef FUNCTION_PASS 63184610Salfred#define FUNCTION_PASS(NAME, CREATE_PASS) 64187259Sthompsa#endif 65187259SthompsaFUNCTION_PASS("early-cse", EarlyCSEPass()) 66187259SthompsaFUNCTION_PASS("instcombine", InstCombinePass()) 67188413SthompsaFUNCTION_PASS("invalidate<all>", InvalidateAllAnalysesPass()) 68187259SthompsaFUNCTION_PASS("no-op-function", NoOpFunctionPass()) 69187259SthompsaFUNCTION_PASS("lower-expect", LowerExpectIntrinsicPass()) 70184610SalfredFUNCTION_PASS("print", PrintFunctionPass(dbgs())) 71184610SalfredFUNCTION_PASS("print<assumptions>", AssumptionPrinterPass(dbgs())) 72184610SalfredFUNCTION_PASS("print<domtree>", DominatorTreePrinterPass(dbgs())) 73184610SalfredFUNCTION_PASS("print<loops>", LoopPrinterPass(dbgs())) 74184610SalfredFUNCTION_PASS("simplify-cfg", SimplifyCFGPass()) 75184610SalfredFUNCTION_PASS("verify", VerifierPass()) 76189265SthompsaFUNCTION_PASS("verify<domtree>", DominatorTreeVerifierPass()) 77184610Salfred#undef FUNCTION_PASS 78184610Salfred