Home | History | Annotate | Download | only in CodeGen
      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   initializeCalculateSpillWeightsPass(Registry);
     23   initializeDeadMachineInstructionElimPass(Registry);
     24   initializeGCModuleInfoPass(Registry);
     25   initializeIfConverterPass(Registry);
     26   initializeLiveDebugVariablesPass(Registry);
     27   initializeLiveIntervalsPass(Registry);
     28   initializeLiveStacksPass(Registry);
     29   initializeLiveVariablesPass(Registry);
     30   initializeMachineBlockFrequencyInfoPass(Registry);
     31   initializeMachineCSEPass(Registry);
     32   initializeMachineDominatorTreePass(Registry);
     33   initializeMachineLICMPass(Registry);
     34   initializeMachineLoopInfoPass(Registry);
     35   initializeMachineModuleInfoPass(Registry);
     36   initializeMachineSinkingPass(Registry);
     37   initializeMachineVerifierPassPass(Registry);
     38   initializeOptimizePHIsPass(Registry);
     39   initializePHIEliminationPass(Registry);
     40   initializePeepholeOptimizerPass(Registry);
     41   initializeProcessImplicitDefsPass(Registry);
     42   initializePEIPass(Registry);
     43   initializeRALinScanPass(Registry);
     44   initializeRegisterCoalescerPass(Registry);
     45   initializeRenderMachineFunctionPass(Registry);
     46   initializeSlotIndexesPass(Registry);
     47   initializeLoopSplitterPass(Registry);
     48   initializeStackProtectorPass(Registry);
     49   initializeStackSlotColoringPass(Registry);
     50   initializeStrongPHIEliminationPass(Registry);
     51   initializeTwoAddressInstructionPassPass(Registry);
     52   initializeUnreachableBlockElimPass(Registry);
     53   initializeUnreachableMachineBlockElimPass(Registry);
     54   initializeVirtRegMapPass(Registry);
     55   initializeLowerIntrinsicsPass(Registry);
     56 }
     57 
     58 void LLVMInitializeCodeGen(LLVMPassRegistryRef R) {
     59   initializeCodeGen(*unwrap(R));
     60 }
     61