Owen Anderson | 78b1524 | 2010-10-07 18:41:20 +0000 | [diff] [blame] | 1 | //===-- CodeGen.cpp -------------------------------------------------------===// |
| 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 implements the common initialization routines for the |
| 11 | // CodeGen library. |
| 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | |
| 15 | #include "llvm/InitializePasses.h" |
| 16 | #include "llvm-c/Initialization.h" |
| 17 | |
| 18 | using namespace llvm; |
| 19 | |
| 20 | /// initializeCodeGen - Initialize all passes linked into the CodeGen library. |
| 21 | void llvm::initializeCodeGen(PassRegistry &Registry) { |
Andrew Trick | 61f1e3d | 2012-02-08 21:22:48 +0000 | [diff] [blame] | 22 | initializeBranchFolderPassPass(Registry); |
Owen Anderson | 78b1524 | 2010-10-07 18:41:20 +0000 | [diff] [blame] | 23 | initializeCalculateSpillWeightsPass(Registry); |
Andrew Trick | 1dd8c85 | 2012-02-08 21:23:13 +0000 | [diff] [blame] | 24 | initializeCodePlacementOptPass(Registry); |
Owen Anderson | 78b1524 | 2010-10-07 18:41:20 +0000 | [diff] [blame] | 25 | initializeDeadMachineInstructionElimPass(Registry); |
Jakob Stoklund Olesen | 33242fd | 2012-07-04 00:09:54 +0000 | [diff] [blame] | 26 | initializeEarlyIfConverterPass(Registry); |
Andrew Trick | 1dd8c85 | 2012-02-08 21:23:13 +0000 | [diff] [blame] | 27 | initializeExpandPostRAPass(Registry); |
| 28 | initializeExpandISelPseudosPass(Registry); |
| 29 | initializeFinalizeMachineBundlesPass(Registry); |
| 30 | initializeGCMachineCodeAnalysisPass(Registry); |
Owen Anderson | 78b1524 | 2010-10-07 18:41:20 +0000 | [diff] [blame] | 31 | initializeGCModuleInfoPass(Registry); |
| 32 | initializeIfConverterPass(Registry); |
Jakob Stoklund Olesen | bb7b23f | 2010-11-30 02:17:10 +0000 | [diff] [blame] | 33 | initializeLiveDebugVariablesPass(Registry); |
Owen Anderson | 78b1524 | 2010-10-07 18:41:20 +0000 | [diff] [blame] | 34 | initializeLiveIntervalsPass(Registry); |
| 35 | initializeLiveStacksPass(Registry); |
| 36 | initializeLiveVariablesPass(Registry); |
Andrew Trick | 1dd8c85 | 2012-02-08 21:23:13 +0000 | [diff] [blame] | 37 | initializeLocalStackSlotPassPass(Registry); |
Jakub Staszak | f55c1c8 | 2011-07-25 19:25:40 +0000 | [diff] [blame] | 38 | initializeMachineBlockFrequencyInfoPass(Registry); |
Chandler Carruth | db35087 | 2011-10-21 06:46:38 +0000 | [diff] [blame] | 39 | initializeMachineBlockPlacementPass(Registry); |
Chandler Carruth | 37efc9f | 2011-11-02 07:17:12 +0000 | [diff] [blame] | 40 | initializeMachineBlockPlacementStatsPass(Registry); |
Andrew Trick | 1dd8c85 | 2012-02-08 21:23:13 +0000 | [diff] [blame] | 41 | initializeMachineCopyPropagationPass(Registry); |
Owen Anderson | 78b1524 | 2010-10-07 18:41:20 +0000 | [diff] [blame] | 42 | initializeMachineCSEPass(Registry); |
| 43 | initializeMachineDominatorTreePass(Registry); |
Tom Stellard | a52c3ac | 2012-09-17 14:08:37 +0000 | [diff] [blame] | 44 | initializeMachinePostDominatorTreePass(Registry); |
Owen Anderson | 78b1524 | 2010-10-07 18:41:20 +0000 | [diff] [blame] | 45 | initializeMachineLICMPass(Registry); |
| 46 | initializeMachineLoopInfoPass(Registry); |
| 47 | initializeMachineModuleInfoPass(Registry); |
Andrew Trick | 1dd8c85 | 2012-02-08 21:23:13 +0000 | [diff] [blame] | 48 | initializeMachineSchedulerPass(Registry); |
Owen Anderson | 78b1524 | 2010-10-07 18:41:20 +0000 | [diff] [blame] | 49 | initializeMachineSinkingPass(Registry); |
| 50 | initializeMachineVerifierPassPass(Registry); |
| 51 | initializeOptimizePHIsPass(Registry); |
| 52 | initializePHIEliminationPass(Registry); |
| 53 | initializePeepholeOptimizerPass(Registry); |
Andrew Trick | 1dd8c85 | 2012-02-08 21:23:13 +0000 | [diff] [blame] | 54 | initializePostRASchedulerPass(Registry); |
Owen Anderson | 78b1524 | 2010-10-07 18:41:20 +0000 | [diff] [blame] | 55 | initializeProcessImplicitDefsPass(Registry); |
| 56 | initializePEIPass(Registry); |
Rafael Espindola | 5b22021 | 2011-06-26 22:34:10 +0000 | [diff] [blame] | 57 | initializeRegisterCoalescerPass(Registry); |
Owen Anderson | 78b1524 | 2010-10-07 18:41:20 +0000 | [diff] [blame] | 58 | initializeSlotIndexesPass(Registry); |
Owen Anderson | 78b1524 | 2010-10-07 18:41:20 +0000 | [diff] [blame] | 59 | initializeStackProtectorPass(Registry); |
Nadav Rotem | c05d306 | 2012-09-06 09:17:37 +0000 | [diff] [blame] | 60 | initializeStackColoringPass(Registry); |
Owen Anderson | 78b1524 | 2010-10-07 18:41:20 +0000 | [diff] [blame] | 61 | initializeStackSlotColoringPass(Registry); |
| 62 | initializeStrongPHIEliminationPass(Registry); |
Andrew Trick | 1dd8c85 | 2012-02-08 21:23:13 +0000 | [diff] [blame] | 63 | initializeTailDuplicatePassPass(Registry); |
Andrew Trick | 7461334 | 2012-02-04 02:56:45 +0000 | [diff] [blame] | 64 | initializeTargetPassConfigPass(Registry); |
Owen Anderson | 78b1524 | 2010-10-07 18:41:20 +0000 | [diff] [blame] | 65 | initializeTwoAddressInstructionPassPass(Registry); |
Andrew Trick | 1dd8c85 | 2012-02-08 21:23:13 +0000 | [diff] [blame] | 66 | initializeUnpackMachineBundlesPass(Registry); |
Owen Anderson | 78b1524 | 2010-10-07 18:41:20 +0000 | [diff] [blame] | 67 | initializeUnreachableBlockElimPass(Registry); |
| 68 | initializeUnreachableMachineBlockElimPass(Registry); |
| 69 | initializeVirtRegMapPass(Registry); |
Jakob Stoklund Olesen | 05ec712 | 2012-06-08 23:44:45 +0000 | [diff] [blame] | 70 | initializeVirtRegRewriterPass(Registry); |
Owen Anderson | 081c34b | 2010-10-19 17:21:58 +0000 | [diff] [blame] | 71 | initializeLowerIntrinsicsPass(Registry); |
Bob Wilson | 6e1b812 | 2012-05-30 00:17:12 +0000 | [diff] [blame] | 72 | initializeMachineFunctionPrinterPassPass(Registry); |
Owen Anderson | 78b1524 | 2010-10-07 18:41:20 +0000 | [diff] [blame] | 73 | } |
| 74 | |
| 75 | void LLVMInitializeCodeGen(LLVMPassRegistryRef R) { |
| 76 | initializeCodeGen(*unwrap(R)); |
| 77 | } |