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 #include "llvm/PassRegistry.h" 18 19 using namespace llvm; 20 21 /// initializeCodeGen - Initialize all passes linked into the CodeGen library. initializeCodeGen(PassRegistry & Registry)22void llvm::initializeCodeGen(PassRegistry &Registry) { 23 initializeAtomicExpandPass(Registry); 24 initializeBranchFolderPassPass(Registry); 25 initializeCodeGenPreparePass(Registry); 26 initializeDeadMachineInstructionElimPass(Registry); 27 initializeDwarfEHPreparePass(Registry); 28 initializeEarlyIfConverterPass(Registry); 29 initializeExpandISelPseudosPass(Registry); 30 initializeExpandPostRAPass(Registry); 31 initializeFinalizeMachineBundlesPass(Registry); 32 initializeGCMachineCodeAnalysisPass(Registry); 33 initializeGCModuleInfoPass(Registry); 34 initializeIfConverterPass(Registry); 35 initializeLiveDebugVariablesPass(Registry); 36 initializeLiveIntervalsPass(Registry); 37 initializeLiveStacksPass(Registry); 38 initializeLiveVariablesPass(Registry); 39 initializeLocalStackSlotPassPass(Registry); 40 initializeLowerIntrinsicsPass(Registry); 41 initializeMachineBlockFrequencyInfoPass(Registry); 42 initializeMachineBlockPlacementPass(Registry); 43 initializeMachineBlockPlacementStatsPass(Registry); 44 initializeMachineCSEPass(Registry); 45 initializeMachineCombinerPass(Registry); 46 initializeMachineCopyPropagationPass(Registry); 47 initializeMachineDominatorTreePass(Registry); 48 initializeMachineFunctionPrinterPassPass(Registry); 49 initializeMachineLICMPass(Registry); 50 initializeMachineLoopInfoPass(Registry); 51 initializeMachineModuleInfoPass(Registry); 52 initializeMachinePostDominatorTreePass(Registry); 53 initializeMachineSchedulerPass(Registry); 54 initializeMachineSinkingPass(Registry); 55 initializeMachineVerifierPassPass(Registry); 56 initializeOptimizePHIsPass(Registry); 57 initializePEIPass(Registry); 58 initializePHIEliminationPass(Registry); 59 initializePeepholeOptimizerPass(Registry); 60 initializePostMachineSchedulerPass(Registry); 61 initializePostRASchedulerPass(Registry); 62 initializeProcessImplicitDefsPass(Registry); 63 initializeRegisterCoalescerPass(Registry); 64 initializeSlotIndexesPass(Registry); 65 initializeStackColoringPass(Registry); 66 initializeStackMapLivenessPass(Registry); 67 initializeStackProtectorPass(Registry); 68 initializeStackSlotColoringPass(Registry); 69 initializeTailDuplicatePassPass(Registry); 70 initializeTargetPassConfigPass(Registry); 71 initializeTwoAddressInstructionPassPass(Registry); 72 initializeUnpackMachineBundlesPass(Registry); 73 initializeUnreachableBlockElimPass(Registry); 74 initializeUnreachableMachineBlockElimPass(Registry); 75 initializeVirtRegMapPass(Registry); 76 initializeVirtRegRewriterPass(Registry); 77 initializeWinEHPreparePass(Registry); 78 } 79 LLVMInitializeCodeGen(LLVMPassRegistryRef R)80void LLVMInitializeCodeGen(LLVMPassRegistryRef R) { 81 initializeCodeGen(*unwrap(R)); 82 } 83