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. 22 void llvm::initializeCodeGen(PassRegistry &Registry) { 23 initializeAtomicExpandLoadLinkedPass(Registry); 24 initializeBasicTTIPass(Registry); 25 initializeBranchFolderPassPass(Registry); 26 initializeCodeGenPreparePass(Registry); 27 initializeDeadMachineInstructionElimPass(Registry); 28 initializeEarlyIfConverterPass(Registry); 29 initializeExpandPostRAPass(Registry); 30 initializeExpandISelPseudosPass(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 initializeMachineBlockFrequencyInfoPass(Registry); 41 initializeMachineBlockPlacementPass(Registry); 42 initializeMachineBlockPlacementStatsPass(Registry); 43 initializeMachineCopyPropagationPass(Registry); 44 initializeMachineCSEPass(Registry); 45 initializeMachineDominatorTreePass(Registry); 46 initializeMachinePostDominatorTreePass(Registry); 47 initializeMachineLICMPass(Registry); 48 initializeMachineLoopInfoPass(Registry); 49 initializeMachineModuleInfoPass(Registry); 50 initializeMachineSchedulerPass(Registry); 51 initializeMachineSinkingPass(Registry); 52 initializeMachineVerifierPassPass(Registry); 53 initializeOptimizePHIsPass(Registry); 54 initializePHIEliminationPass(Registry); 55 initializePeepholeOptimizerPass(Registry); 56 initializePostMachineSchedulerPass(Registry); 57 initializePostRASchedulerPass(Registry); 58 initializeProcessImplicitDefsPass(Registry); 59 initializePEIPass(Registry); 60 initializeRegisterCoalescerPass(Registry); 61 initializeSlotIndexesPass(Registry); 62 initializeStackProtectorPass(Registry); 63 initializeStackColoringPass(Registry); 64 initializeStackSlotColoringPass(Registry); 65 initializeTailDuplicatePassPass(Registry); 66 initializeTargetPassConfigPass(Registry); 67 initializeTwoAddressInstructionPassPass(Registry); 68 initializeUnpackMachineBundlesPass(Registry); 69 initializeUnreachableBlockElimPass(Registry); 70 initializeUnreachableMachineBlockElimPass(Registry); 71 initializeVirtRegMapPass(Registry); 72 initializeVirtRegRewriterPass(Registry); 73 initializeLowerIntrinsicsPass(Registry); 74 initializeMachineFunctionPrinterPassPass(Registry); 75 initializeStackMapLivenessPass(Registry); 76 } 77 78 void LLVMInitializeCodeGen(LLVMPassRegistryRef R) { 79 initializeCodeGen(*unwrap(R)); 80 } 81