• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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-c/Initialization.h"
16 #include "llvm/InitializePasses.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)22 void llvm::initializeCodeGen(PassRegistry &Registry) {
23   initializeAtomicExpandPass(Registry);
24   initializeBranchFolderPassPass(Registry);
25   initializeBranchRelaxationPass(Registry);
26   initializeCFIInstrInserterPass(Registry);
27   initializeCodeGenPreparePass(Registry);
28   initializeDeadMachineInstructionElimPass(Registry);
29   initializeDetectDeadLanesPass(Registry);
30   initializeDwarfEHPreparePass(Registry);
31   initializeEarlyIfConverterPass(Registry);
32   initializeEarlyMachineLICMPass(Registry);
33   initializeEarlyTailDuplicatePass(Registry);
34   initializeExpandISelPseudosPass(Registry);
35   initializeExpandMemCmpPassPass(Registry);
36   initializeExpandPostRAPass(Registry);
37   initializeFEntryInserterPass(Registry);
38   initializeFinalizeMachineBundlesPass(Registry);
39   initializeFuncletLayoutPass(Registry);
40   initializeGCMachineCodeAnalysisPass(Registry);
41   initializeGCModuleInfoPass(Registry);
42   initializeIfConverterPass(Registry);
43   initializeImplicitNullChecksPass(Registry);
44   initializeIndirectBrExpandPassPass(Registry);
45   initializeInterleavedAccessPass(Registry);
46   initializeLiveDebugValuesPass(Registry);
47   initializeLiveDebugVariablesPass(Registry);
48   initializeLiveIntervalsPass(Registry);
49   initializeLiveRangeShrinkPass(Registry);
50   initializeLiveStacksPass(Registry);
51   initializeLiveVariablesPass(Registry);
52   initializeLocalStackSlotPassPass(Registry);
53   initializeLowerIntrinsicsPass(Registry);
54   initializeMIRCanonicalizerPass(Registry);
55   initializeMachineBlockFrequencyInfoPass(Registry);
56   initializeMachineBlockPlacementPass(Registry);
57   initializeMachineBlockPlacementStatsPass(Registry);
58   initializeMachineCSEPass(Registry);
59   initializeMachineCombinerPass(Registry);
60   initializeMachineCopyPropagationPass(Registry);
61   initializeMachineDominatorTreePass(Registry);
62   initializeMachineFunctionPrinterPassPass(Registry);
63   initializeMachineLICMPass(Registry);
64   initializeMachineLoopInfoPass(Registry);
65   initializeMachineModuleInfoPass(Registry);
66   initializeMachineOptimizationRemarkEmitterPassPass(Registry);
67   initializeMachineOutlinerPass(Registry);
68   initializeMachinePipelinerPass(Registry);
69   initializeMachinePostDominatorTreePass(Registry);
70   initializeMachineRegionInfoPassPass(Registry);
71   initializeMachineSchedulerPass(Registry);
72   initializeMachineSinkingPass(Registry);
73   initializeMachineVerifierPassPass(Registry);
74   initializeOptimizePHIsPass(Registry);
75   initializePEIPass(Registry);
76   initializePHIEliminationPass(Registry);
77   initializePatchableFunctionPass(Registry);
78   initializePeepholeOptimizerPass(Registry);
79   initializePostMachineSchedulerPass(Registry);
80   initializePostRAHazardRecognizerPass(Registry);
81   initializePostRAMachineSinkingPass(Registry);
82   initializePostRASchedulerPass(Registry);
83   initializePreISelIntrinsicLoweringLegacyPassPass(Registry);
84   initializeProcessImplicitDefsPass(Registry);
85   initializeRABasicPass(Registry);
86   initializeRAGreedyPass(Registry);
87   initializeRegAllocFastPass(Registry);
88   initializeRegUsageInfoCollectorPass(Registry);
89   initializeRegUsageInfoPropagationPass(Registry);
90   initializeRegisterCoalescerPass(Registry);
91   initializeRenameIndependentSubregsPass(Registry);
92   initializeSafeStackLegacyPassPass(Registry);
93   initializeScalarizeMaskedMemIntrinPass(Registry);
94   initializeShrinkWrapPass(Registry);
95   initializeSlotIndexesPass(Registry);
96   initializeStackColoringPass(Registry);
97   initializeStackMapLivenessPass(Registry);
98   initializeStackProtectorPass(Registry);
99   initializeStackSlotColoringPass(Registry);
100   initializeTailDuplicatePass(Registry);
101   initializeTargetPassConfigPass(Registry);
102   initializeTwoAddressInstructionPassPass(Registry);
103   initializeUnpackMachineBundlesPass(Registry);
104   initializeUnreachableBlockElimLegacyPassPass(Registry);
105   initializeUnreachableMachineBlockElimPass(Registry);
106   initializeVirtRegMapPass(Registry);
107   initializeVirtRegRewriterPass(Registry);
108   initializeWasmEHPreparePass(Registry);
109   initializeWinEHPreparePass(Registry);
110   initializeXRayInstrumentationPass(Registry);
111 }
112 
LLVMInitializeCodeGen(LLVMPassRegistryRef R)113 void LLVMInitializeCodeGen(LLVMPassRegistryRef R) {
114   initializeCodeGen(*unwrap(R));
115 }
116