blob: a53f6f8d0f1bafafc6a7c3fbe367a4cbf16313a8 [file] [log] [blame]
Owen Anderson78b15242010-10-07 18:41:20 +00001//===-- 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
18using namespace llvm;
19
20/// initializeCodeGen - Initialize all passes linked into the CodeGen library.
21void llvm::initializeCodeGen(PassRegistry &Registry) {
Andrew Trick61f1e3d2012-02-08 21:22:48 +000022 initializeBranchFolderPassPass(Registry);
Owen Anderson78b15242010-10-07 18:41:20 +000023 initializeCalculateSpillWeightsPass(Registry);
Andrew Trick1dd8c852012-02-08 21:23:13 +000024 initializeCodePlacementOptPass(Registry);
Owen Anderson78b15242010-10-07 18:41:20 +000025 initializeDeadMachineInstructionElimPass(Registry);
Jakob Stoklund Olesen33242fd2012-07-04 00:09:54 +000026 initializeEarlyIfConverterPass(Registry);
Andrew Trick1dd8c852012-02-08 21:23:13 +000027 initializeExpandPostRAPass(Registry);
28 initializeExpandISelPseudosPass(Registry);
29 initializeFinalizeMachineBundlesPass(Registry);
30 initializeGCMachineCodeAnalysisPass(Registry);
Owen Anderson78b15242010-10-07 18:41:20 +000031 initializeGCModuleInfoPass(Registry);
32 initializeIfConverterPass(Registry);
Jakob Stoklund Olesenbb7b23f2010-11-30 02:17:10 +000033 initializeLiveDebugVariablesPass(Registry);
Owen Anderson78b15242010-10-07 18:41:20 +000034 initializeLiveIntervalsPass(Registry);
35 initializeLiveStacksPass(Registry);
36 initializeLiveVariablesPass(Registry);
Andrew Trick1dd8c852012-02-08 21:23:13 +000037 initializeLocalStackSlotPassPass(Registry);
Jakub Staszakf55c1c82011-07-25 19:25:40 +000038 initializeMachineBlockFrequencyInfoPass(Registry);
Chandler Carruthdb350872011-10-21 06:46:38 +000039 initializeMachineBlockPlacementPass(Registry);
Chandler Carruth37efc9f2011-11-02 07:17:12 +000040 initializeMachineBlockPlacementStatsPass(Registry);
Andrew Trick1dd8c852012-02-08 21:23:13 +000041 initializeMachineCopyPropagationPass(Registry);
Owen Anderson78b15242010-10-07 18:41:20 +000042 initializeMachineCSEPass(Registry);
43 initializeMachineDominatorTreePass(Registry);
Tom Stellarda52c3ac2012-09-17 14:08:37 +000044 initializeMachinePostDominatorTreePass(Registry);
Owen Anderson78b15242010-10-07 18:41:20 +000045 initializeMachineLICMPass(Registry);
46 initializeMachineLoopInfoPass(Registry);
47 initializeMachineModuleInfoPass(Registry);
Andrew Trick1dd8c852012-02-08 21:23:13 +000048 initializeMachineSchedulerPass(Registry);
Owen Anderson78b15242010-10-07 18:41:20 +000049 initializeMachineSinkingPass(Registry);
50 initializeMachineVerifierPassPass(Registry);
51 initializeOptimizePHIsPass(Registry);
52 initializePHIEliminationPass(Registry);
53 initializePeepholeOptimizerPass(Registry);
Andrew Trick1dd8c852012-02-08 21:23:13 +000054 initializePostRASchedulerPass(Registry);
Owen Anderson78b15242010-10-07 18:41:20 +000055 initializeProcessImplicitDefsPass(Registry);
56 initializePEIPass(Registry);
Rafael Espindola5b220212011-06-26 22:34:10 +000057 initializeRegisterCoalescerPass(Registry);
Owen Anderson78b15242010-10-07 18:41:20 +000058 initializeSlotIndexesPass(Registry);
Owen Anderson78b15242010-10-07 18:41:20 +000059 initializeStackProtectorPass(Registry);
Nadav Rotemc05d3062012-09-06 09:17:37 +000060 initializeStackColoringPass(Registry);
Owen Anderson78b15242010-10-07 18:41:20 +000061 initializeStackSlotColoringPass(Registry);
62 initializeStrongPHIEliminationPass(Registry);
Andrew Trick1dd8c852012-02-08 21:23:13 +000063 initializeTailDuplicatePassPass(Registry);
Andrew Trick74613342012-02-04 02:56:45 +000064 initializeTargetPassConfigPass(Registry);
Owen Anderson78b15242010-10-07 18:41:20 +000065 initializeTwoAddressInstructionPassPass(Registry);
Andrew Trick1dd8c852012-02-08 21:23:13 +000066 initializeUnpackMachineBundlesPass(Registry);
Owen Anderson78b15242010-10-07 18:41:20 +000067 initializeUnreachableBlockElimPass(Registry);
68 initializeUnreachableMachineBlockElimPass(Registry);
69 initializeVirtRegMapPass(Registry);
Jakob Stoklund Olesen05ec7122012-06-08 23:44:45 +000070 initializeVirtRegRewriterPass(Registry);
Owen Anderson081c34b2010-10-19 17:21:58 +000071 initializeLowerIntrinsicsPass(Registry);
Bob Wilson6e1b8122012-05-30 00:17:12 +000072 initializeMachineFunctionPrinterPassPass(Registry);
Owen Anderson78b15242010-10-07 18:41:20 +000073}
74
75void LLVMInitializeCodeGen(LLVMPassRegistryRef R) {
76 initializeCodeGen(*unwrap(R));
77}