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) { 22 initializeBranchFolderPassPass(Registry); 23 initializeCalculateSpillWeightsPass(Registry); 24 initializeCodePlacementOptPass(Registry); 25 initializeDeadMachineInstructionElimPass(Registry); 26 initializeExpandPostRAPass(Registry); 27 initializeExpandISelPseudosPass(Registry); 28 initializeFinalizeMachineBundlesPass(Registry); 29 initializeGCMachineCodeAnalysisPass(Registry); 30 initializeGCModuleInfoPass(Registry); 31 initializeIfConverterPass(Registry); 32 initializeLiveDebugVariablesPass(Registry); 33 initializeLiveIntervalsPass(Registry); 34 initializeLiveStacksPass(Registry); 35 initializeLiveVariablesPass(Registry); 36 initializeLocalStackSlotPassPass(Registry); 37 initializeMachineBlockFrequencyInfoPass(Registry); 38 initializeMachineBlockPlacementPass(Registry); 39 initializeMachineBlockPlacementStatsPass(Registry); 40 initializeMachineCopyPropagationPass(Registry); 41 initializeMachineCSEPass(Registry); 42 initializeMachineDominatorTreePass(Registry); 43 initializeMachineLICMPass(Registry); 44 initializeMachineLoopInfoPass(Registry); 45 initializeMachineModuleInfoPass(Registry); 46 initializeMachineSchedulerPass(Registry); 47 initializeMachineSinkingPass(Registry); 48 initializeMachineVerifierPassPass(Registry); 49 initializeOptimizePHIsPass(Registry); 50 initializePHIEliminationPass(Registry); 51 initializePeepholeOptimizerPass(Registry); 52 initializePostRASchedulerPass(Registry); 53 initializeProcessImplicitDefsPass(Registry); 54 initializePEIPass(Registry); 55 initializeRegisterCoalescerPass(Registry); 56 initializeRenderMachineFunctionPass(Registry); 57 initializeSlotIndexesPass(Registry); 58 initializeStackProtectorPass(Registry); 59 initializeStackSlotColoringPass(Registry); 60 initializeStrongPHIEliminationPass(Registry); 61 initializeTailDuplicatePassPass(Registry); 62 initializeTargetPassConfigPass(Registry); 63 initializeTwoAddressInstructionPassPass(Registry); 64 initializeUnpackMachineBundlesPass(Registry); 65 initializeUnreachableBlockElimPass(Registry); 66 initializeUnreachableMachineBlockElimPass(Registry); 67 initializeVirtRegMapPass(Registry); 68 initializeLowerIntrinsicsPass(Registry); 69 } 70 71 void LLVMInitializeCodeGen(LLVMPassRegistryRef R) { 72 initializeCodeGen(*unwrap(R)); 73 } 74