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