blob: 5a3d63a6a786e6723d55162825e1473d7ef8935a [file] [log] [blame]
Chandler Carruth58944182014-04-21 08:08:50 +00001//===- 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
Chandler Carruth43173422014-04-21 08:20:10 +000019#ifndef MODULE_ANALYSIS
20#define MODULE_ANALYSIS(NAME, CREATE_PASS)
21#endif
22MODULE_ANALYSIS("lcg", LazyCallGraphAnalysis())
Chandler Carruth0b576b32015-01-06 02:50:06 +000023MODULE_ANALYSIS("no-op-module", NoOpModuleAnalysis())
Chandler Carruth8ca43222015-01-15 11:39:46 +000024MODULE_ANALYSIS("targetlibinfo", TargetLibraryAnalysis())
Chandler Carruth43173422014-04-21 08:20:10 +000025#undef MODULE_ANALYSIS
26
Chandler Carruth58944182014-04-21 08:08:50 +000027#ifndef MODULE_PASS
28#define MODULE_PASS(NAME, CREATE_PASS)
29#endif
Chandler Carruthf49f1a872015-12-27 08:13:45 +000030MODULE_PASS("forceattrs", ForceFunctionAttrsPass())
Chandler Carruth3a040e62015-12-27 08:41:34 +000031MODULE_PASS("inferattrs", InferFunctionAttrsPass())
Chandler Carruth4e107caf2015-01-06 09:06:35 +000032MODULE_PASS("invalidate<all>", InvalidateAllAnalysesPass())
Chandler Carrutha872f3f2015-01-06 02:37:55 +000033MODULE_PASS("no-op-module", NoOpModulePass())
Chandler Carruth58944182014-04-21 08:08:50 +000034MODULE_PASS("print", PrintModulePass(dbgs()))
35MODULE_PASS("print-cg", LazyCallGraphPrinterPass(dbgs()))
Justin Bogner21e15372015-10-30 23:28:12 +000036MODULE_PASS("strip-dead-prototypes", StripDeadPrototypesPass())
Chandler Carruth9c31db42015-01-05 00:08:53 +000037MODULE_PASS("verify", VerifierPass())
Chandler Carruth58944182014-04-21 08:08:50 +000038#undef MODULE_PASS
39
Chandler Carruth572e3402014-04-21 11:12:00 +000040#ifndef CGSCC_ANALYSIS
41#define CGSCC_ANALYSIS(NAME, CREATE_PASS)
42#endif
Chandler Carruth0b576b32015-01-06 02:50:06 +000043CGSCC_ANALYSIS("no-op-cgscc", NoOpCGSCCAnalysis())
Chandler Carruth572e3402014-04-21 11:12:00 +000044#undef CGSCC_ANALYSIS
45
46#ifndef CGSCC_PASS
47#define CGSCC_PASS(NAME, CREATE_PASS)
48#endif
Chandler Carruth4e107caf2015-01-06 09:06:35 +000049CGSCC_PASS("invalidate<all>", InvalidateAllAnalysesPass())
Chandler Carrutha872f3f2015-01-06 02:37:55 +000050CGSCC_PASS("no-op-cgscc", NoOpCGSCCPass())
Chandler Carruth572e3402014-04-21 11:12:00 +000051#undef CGSCC_PASS
52
Chandler Carruth43173422014-04-21 08:20:10 +000053#ifndef FUNCTION_ANALYSIS
54#define FUNCTION_ANALYSIS(NAME, CREATE_PASS)
55#endif
Chandler Carruth6f5770b102016-02-13 23:32:00 +000056FUNCTION_ANALYSIS("aa", AAManager())
Chandler Carruthdf8b2232015-01-22 21:53:09 +000057FUNCTION_ANALYSIS("assumptions", AssumptionAnalysis())
Chandler Carruth64764b42015-01-14 10:19:28 +000058FUNCTION_ANALYSIS("domtree", DominatorTreeAnalysis())
Chandler Carruthaaf0b4c2015-01-20 10:58:50 +000059FUNCTION_ANALYSIS("loops", LoopAnalysis())
Chandler Carruth0b576b32015-01-06 02:50:06 +000060FUNCTION_ANALYSIS("no-op-function", NoOpFunctionAnalysis())
Chandler Carruth2f1fd162015-08-17 02:08:17 +000061FUNCTION_ANALYSIS("scalar-evolution", ScalarEvolutionAnalysis())
Chandler Carruthc0291862015-01-24 02:06:09 +000062FUNCTION_ANALYSIS("targetlibinfo", TargetLibraryAnalysis())
Chandler Carruthe0385522015-02-01 10:11:22 +000063FUNCTION_ANALYSIS("targetir",
64 TM ? TM->getTargetIRAnalysis() : TargetIRAnalysis())
Chandler Carruth43173422014-04-21 08:20:10 +000065#undef FUNCTION_ANALYSIS
66
Chandler Carruth58944182014-04-21 08:08:50 +000067#ifndef FUNCTION_PASS
68#define FUNCTION_PASS(NAME, CREATE_PASS)
69#endif
Justin Bogner19b67992015-10-30 23:13:18 +000070FUNCTION_PASS("adce", ADCEPass())
Chandler Carruthe8c686a2015-02-01 10:51:23 +000071FUNCTION_PASS("early-cse", EarlyCSEPass())
Chandler Carruth83ba2692015-01-24 04:19:17 +000072FUNCTION_PASS("instcombine", InstCombinePass())
Chandler Carruth4e107caf2015-01-06 09:06:35 +000073FUNCTION_PASS("invalidate<all>", InvalidateAllAnalysesPass())
Chandler Carrutha872f3f2015-01-06 02:37:55 +000074FUNCTION_PASS("no-op-function", NoOpFunctionPass())
Chandler Carruth43e590e2015-01-24 11:13:02 +000075FUNCTION_PASS("lower-expect", LowerExpectIntrinsicPass())
Chandler Carruth58944182014-04-21 08:08:50 +000076FUNCTION_PASS("print", PrintFunctionPass(dbgs()))
Chandler Carruthdf8b2232015-01-22 21:53:09 +000077FUNCTION_PASS("print<assumptions>", AssumptionPrinterPass(dbgs()))
Chandler Carruth64764b42015-01-14 10:19:28 +000078FUNCTION_PASS("print<domtree>", DominatorTreePrinterPass(dbgs()))
Chandler Carruthaaf0b4c2015-01-20 10:58:50 +000079FUNCTION_PASS("print<loops>", LoopPrinterPass(dbgs()))
Chandler Carruth2f1fd162015-08-17 02:08:17 +000080FUNCTION_PASS("print<scalar-evolution>", ScalarEvolutionPrinterPass(dbgs()))
Chandler Carruthfdffd872015-02-01 11:34:21 +000081FUNCTION_PASS("simplify-cfg", SimplifyCFGPass())
Chandler Carruth29a18a42015-09-12 09:09:14 +000082FUNCTION_PASS("sroa", SROA())
Chandler Carruth9c31db42015-01-05 00:08:53 +000083FUNCTION_PASS("verify", VerifierPass())
Chandler Carruth64764b42015-01-14 10:19:28 +000084FUNCTION_PASS("verify<domtree>", DominatorTreeVerifierPass())
Chandler Carruth58944182014-04-21 08:08:50 +000085#undef FUNCTION_PASS