| Chandler Carruth | 5894418 | 2014-04-21 08:08:50 +0000 | [diff] [blame] | 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 | |
| Chandler Carruth | 4317342 | 2014-04-21 08:20:10 +0000 | [diff] [blame] | 19 | #ifndef MODULE_ANALYSIS |
| 20 | #define MODULE_ANALYSIS(NAME, CREATE_PASS) |
| 21 | #endif |
| 22 | MODULE_ANALYSIS("lcg", LazyCallGraphAnalysis()) |
| Chandler Carruth | 0b576b3 | 2015-01-06 02:50:06 +0000 | [diff] [blame] | 23 | MODULE_ANALYSIS("no-op-module", NoOpModuleAnalysis()) |
| Chandler Carruth | 8ca4322 | 2015-01-15 11:39:46 +0000 | [diff] [blame] | 24 | MODULE_ANALYSIS("targetlibinfo", TargetLibraryAnalysis()) |
| Chandler Carruth | 4317342 | 2014-04-21 08:20:10 +0000 | [diff] [blame] | 25 | #undef MODULE_ANALYSIS |
| 26 | |
| Chandler Carruth | 5894418 | 2014-04-21 08:08:50 +0000 | [diff] [blame] | 27 | #ifndef MODULE_PASS |
| 28 | #define MODULE_PASS(NAME, CREATE_PASS) |
| 29 | #endif |
| Chandler Carruth | f49f1a87 | 2015-12-27 08:13:45 +0000 | [diff] [blame] | 30 | MODULE_PASS("forceattrs", ForceFunctionAttrsPass()) |
| Chandler Carruth | 3a040e6 | 2015-12-27 08:41:34 +0000 | [diff] [blame] | 31 | MODULE_PASS("inferattrs", InferFunctionAttrsPass()) |
| Chandler Carruth | 4e107caf | 2015-01-06 09:06:35 +0000 | [diff] [blame] | 32 | MODULE_PASS("invalidate<all>", InvalidateAllAnalysesPass()) |
| Chandler Carruth | a872f3f | 2015-01-06 02:37:55 +0000 | [diff] [blame] | 33 | MODULE_PASS("no-op-module", NoOpModulePass()) |
| Chandler Carruth | 5894418 | 2014-04-21 08:08:50 +0000 | [diff] [blame] | 34 | MODULE_PASS("print", PrintModulePass(dbgs())) |
| 35 | MODULE_PASS("print-cg", LazyCallGraphPrinterPass(dbgs())) |
| Justin Bogner | 21e1537 | 2015-10-30 23:28:12 +0000 | [diff] [blame] | 36 | MODULE_PASS("strip-dead-prototypes", StripDeadPrototypesPass()) |
| Chandler Carruth | 9c31db4 | 2015-01-05 00:08:53 +0000 | [diff] [blame] | 37 | MODULE_PASS("verify", VerifierPass()) |
| Chandler Carruth | 5894418 | 2014-04-21 08:08:50 +0000 | [diff] [blame] | 38 | #undef MODULE_PASS |
| 39 | |
| Chandler Carruth | 572e340 | 2014-04-21 11:12:00 +0000 | [diff] [blame] | 40 | #ifndef CGSCC_ANALYSIS |
| 41 | #define CGSCC_ANALYSIS(NAME, CREATE_PASS) |
| 42 | #endif |
| Chandler Carruth | 0b576b3 | 2015-01-06 02:50:06 +0000 | [diff] [blame] | 43 | CGSCC_ANALYSIS("no-op-cgscc", NoOpCGSCCAnalysis()) |
| Chandler Carruth | 572e340 | 2014-04-21 11:12:00 +0000 | [diff] [blame] | 44 | #undef CGSCC_ANALYSIS |
| 45 | |
| 46 | #ifndef CGSCC_PASS |
| 47 | #define CGSCC_PASS(NAME, CREATE_PASS) |
| 48 | #endif |
| Chandler Carruth | 4e107caf | 2015-01-06 09:06:35 +0000 | [diff] [blame] | 49 | CGSCC_PASS("invalidate<all>", InvalidateAllAnalysesPass()) |
| Chandler Carruth | a872f3f | 2015-01-06 02:37:55 +0000 | [diff] [blame] | 50 | CGSCC_PASS("no-op-cgscc", NoOpCGSCCPass()) |
| Chandler Carruth | 572e340 | 2014-04-21 11:12:00 +0000 | [diff] [blame] | 51 | #undef CGSCC_PASS |
| 52 | |
| Chandler Carruth | 4317342 | 2014-04-21 08:20:10 +0000 | [diff] [blame] | 53 | #ifndef FUNCTION_ANALYSIS |
| 54 | #define FUNCTION_ANALYSIS(NAME, CREATE_PASS) |
| 55 | #endif |
| Chandler Carruth | 6f5770b10 | 2016-02-13 23:32:00 +0000 | [diff] [blame^] | 56 | FUNCTION_ANALYSIS("aa", AAManager()) |
| Chandler Carruth | df8b223 | 2015-01-22 21:53:09 +0000 | [diff] [blame] | 57 | FUNCTION_ANALYSIS("assumptions", AssumptionAnalysis()) |
| Chandler Carruth | 64764b4 | 2015-01-14 10:19:28 +0000 | [diff] [blame] | 58 | FUNCTION_ANALYSIS("domtree", DominatorTreeAnalysis()) |
| Chandler Carruth | aaf0b4c | 2015-01-20 10:58:50 +0000 | [diff] [blame] | 59 | FUNCTION_ANALYSIS("loops", LoopAnalysis()) |
| Chandler Carruth | 0b576b3 | 2015-01-06 02:50:06 +0000 | [diff] [blame] | 60 | FUNCTION_ANALYSIS("no-op-function", NoOpFunctionAnalysis()) |
| Chandler Carruth | 2f1fd16 | 2015-08-17 02:08:17 +0000 | [diff] [blame] | 61 | FUNCTION_ANALYSIS("scalar-evolution", ScalarEvolutionAnalysis()) |
| Chandler Carruth | c029186 | 2015-01-24 02:06:09 +0000 | [diff] [blame] | 62 | FUNCTION_ANALYSIS("targetlibinfo", TargetLibraryAnalysis()) |
| Chandler Carruth | e038552 | 2015-02-01 10:11:22 +0000 | [diff] [blame] | 63 | FUNCTION_ANALYSIS("targetir", |
| 64 | TM ? TM->getTargetIRAnalysis() : TargetIRAnalysis()) |
| Chandler Carruth | 4317342 | 2014-04-21 08:20:10 +0000 | [diff] [blame] | 65 | #undef FUNCTION_ANALYSIS |
| 66 | |
| Chandler Carruth | 5894418 | 2014-04-21 08:08:50 +0000 | [diff] [blame] | 67 | #ifndef FUNCTION_PASS |
| 68 | #define FUNCTION_PASS(NAME, CREATE_PASS) |
| 69 | #endif |
| Justin Bogner | 19b6799 | 2015-10-30 23:13:18 +0000 | [diff] [blame] | 70 | FUNCTION_PASS("adce", ADCEPass()) |
| Chandler Carruth | e8c686a | 2015-02-01 10:51:23 +0000 | [diff] [blame] | 71 | FUNCTION_PASS("early-cse", EarlyCSEPass()) |
| Chandler Carruth | 83ba269 | 2015-01-24 04:19:17 +0000 | [diff] [blame] | 72 | FUNCTION_PASS("instcombine", InstCombinePass()) |
| Chandler Carruth | 4e107caf | 2015-01-06 09:06:35 +0000 | [diff] [blame] | 73 | FUNCTION_PASS("invalidate<all>", InvalidateAllAnalysesPass()) |
| Chandler Carruth | a872f3f | 2015-01-06 02:37:55 +0000 | [diff] [blame] | 74 | FUNCTION_PASS("no-op-function", NoOpFunctionPass()) |
| Chandler Carruth | 43e590e | 2015-01-24 11:13:02 +0000 | [diff] [blame] | 75 | FUNCTION_PASS("lower-expect", LowerExpectIntrinsicPass()) |
| Chandler Carruth | 5894418 | 2014-04-21 08:08:50 +0000 | [diff] [blame] | 76 | FUNCTION_PASS("print", PrintFunctionPass(dbgs())) |
| Chandler Carruth | df8b223 | 2015-01-22 21:53:09 +0000 | [diff] [blame] | 77 | FUNCTION_PASS("print<assumptions>", AssumptionPrinterPass(dbgs())) |
| Chandler Carruth | 64764b4 | 2015-01-14 10:19:28 +0000 | [diff] [blame] | 78 | FUNCTION_PASS("print<domtree>", DominatorTreePrinterPass(dbgs())) |
| Chandler Carruth | aaf0b4c | 2015-01-20 10:58:50 +0000 | [diff] [blame] | 79 | FUNCTION_PASS("print<loops>", LoopPrinterPass(dbgs())) |
| Chandler Carruth | 2f1fd16 | 2015-08-17 02:08:17 +0000 | [diff] [blame] | 80 | FUNCTION_PASS("print<scalar-evolution>", ScalarEvolutionPrinterPass(dbgs())) |
| Chandler Carruth | fdffd87 | 2015-02-01 11:34:21 +0000 | [diff] [blame] | 81 | FUNCTION_PASS("simplify-cfg", SimplifyCFGPass()) |
| Chandler Carruth | 29a18a4 | 2015-09-12 09:09:14 +0000 | [diff] [blame] | 82 | FUNCTION_PASS("sroa", SROA()) |
| Chandler Carruth | 9c31db4 | 2015-01-05 00:08:53 +0000 | [diff] [blame] | 83 | FUNCTION_PASS("verify", VerifierPass()) |
| Chandler Carruth | 64764b4 | 2015-01-14 10:19:28 +0000 | [diff] [blame] | 84 | FUNCTION_PASS("verify<domtree>", DominatorTreeVerifierPass()) |
| Chandler Carruth | 5894418 | 2014-04-21 08:08:50 +0000 | [diff] [blame] | 85 | #undef FUNCTION_PASS |