• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===-- CodeGen.cpp -------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file implements the common initialization routines for the
10 // CodeGen library.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #include "llvm-c/Initialization.h"
15 #include "llvm/InitializePasses.h"
16 #include "llvm/PassRegistry.h"
17 
18 using namespace llvm;
19 
20 /// initializeCodeGen - Initialize all passes linked into the CodeGen library.
initializeCodeGen(PassRegistry & Registry)21 void llvm::initializeCodeGen(PassRegistry &Registry) {
22   initializeAtomicExpandPass(Registry);
23   initializeBranchFolderPassPass(Registry);
24   initializeBranchRelaxationPass(Registry);
25   initializeCFGuardLongjmpPass(Registry);
26   initializeCFIInstrInserterPass(Registry);
27   initializeCodeGenPreparePass(Registry);
28   initializeDeadMachineInstructionElimPass(Registry);
29   initializeDetectDeadLanesPass(Registry);
30   initializeDwarfEHPreparePass(Registry);
31   initializeEarlyIfConverterPass(Registry);
32   initializeEarlyIfPredicatorPass(Registry);
33   initializeEarlyMachineLICMPass(Registry);
34   initializeEarlyTailDuplicatePass(Registry);
35   initializeExpandMemCmpPassPass(Registry);
36   initializeExpandPostRAPass(Registry);
37   initializeFEntryInserterPass(Registry);
38   initializeFinalizeISelPass(Registry);
39   initializeFinalizeMachineBundlesPass(Registry);
40   initializeFuncletLayoutPass(Registry);
41   initializeGCMachineCodeAnalysisPass(Registry);
42   initializeGCModuleInfoPass(Registry);
43   initializeHardwareLoopsPass(Registry);
44   initializeIfConverterPass(Registry);
45   initializeImplicitNullChecksPass(Registry);
46   initializeIndirectBrExpandPassPass(Registry);
47   initializeInterleavedLoadCombinePass(Registry);
48   initializeInterleavedAccessPass(Registry);
49   initializeLiveDebugValuesPass(Registry);
50   initializeLiveDebugVariablesPass(Registry);
51   initializeLiveIntervalsPass(Registry);
52   initializeLiveRangeShrinkPass(Registry);
53   initializeLiveStacksPass(Registry);
54   initializeLiveVariablesPass(Registry);
55   initializeLocalStackSlotPassPass(Registry);
56   initializeLowerIntrinsicsPass(Registry);
57   initializeMIRCanonicalizerPass(Registry);
58   initializeMIRNamerPass(Registry);
59   initializeMachineBlockFrequencyInfoPass(Registry);
60   initializeMachineBlockPlacementPass(Registry);
61   initializeMachineBlockPlacementStatsPass(Registry);
62   initializeMachineCSEPass(Registry);
63   initializeMachineCombinerPass(Registry);
64   initializeMachineCopyPropagationPass(Registry);
65   initializeMachineDominatorTreePass(Registry);
66   initializeMachineFunctionPrinterPassPass(Registry);
67   initializeMachineLICMPass(Registry);
68   initializeMachineLoopInfoPass(Registry);
69   initializeMachineModuleInfoWrapperPassPass(Registry);
70   initializeMachineOptimizationRemarkEmitterPassPass(Registry);
71   initializeMachineOutlinerPass(Registry);
72   initializeMachinePipelinerPass(Registry);
73   initializeModuloScheduleTestPass(Registry);
74   initializeMachinePostDominatorTreePass(Registry);
75   initializeMachineRegionInfoPassPass(Registry);
76   initializeMachineSchedulerPass(Registry);
77   initializeMachineSinkingPass(Registry);
78   initializeMachineVerifierPassPass(Registry);
79   initializeOptimizePHIsPass(Registry);
80   initializePEIPass(Registry);
81   initializePHIEliminationPass(Registry);
82   initializePatchableFunctionPass(Registry);
83   initializePeepholeOptimizerPass(Registry);
84   initializePostMachineSchedulerPass(Registry);
85   initializePostRAHazardRecognizerPass(Registry);
86   initializePostRAMachineSinkingPass(Registry);
87   initializePostRASchedulerPass(Registry);
88   initializePreISelIntrinsicLoweringLegacyPassPass(Registry);
89   initializeProcessImplicitDefsPass(Registry);
90   initializeRABasicPass(Registry);
91   initializeRAGreedyPass(Registry);
92   initializeRegAllocFastPass(Registry);
93   initializeRegUsageInfoCollectorPass(Registry);
94   initializeRegUsageInfoPropagationPass(Registry);
95   initializeRegisterCoalescerPass(Registry);
96   initializeRenameIndependentSubregsPass(Registry);
97   initializeSafeStackLegacyPassPass(Registry);
98   initializeScalarizeMaskedMemIntrinPass(Registry);
99   initializeShrinkWrapPass(Registry);
100   initializeSlotIndexesPass(Registry);
101   initializeStackColoringPass(Registry);
102   initializeStackMapLivenessPass(Registry);
103   initializeStackProtectorPass(Registry);
104   initializeStackSlotColoringPass(Registry);
105   initializeTailDuplicatePass(Registry);
106   initializeTargetPassConfigPass(Registry);
107   initializeTwoAddressInstructionPassPass(Registry);
108   initializeTypePromotionPass(Registry);
109   initializeUnpackMachineBundlesPass(Registry);
110   initializeUnreachableBlockElimLegacyPassPass(Registry);
111   initializeUnreachableMachineBlockElimPass(Registry);
112   initializeVirtRegMapPass(Registry);
113   initializeVirtRegRewriterPass(Registry);
114   initializeWasmEHPreparePass(Registry);
115   initializeWinEHPreparePass(Registry);
116   initializeXRayInstrumentationPass(Registry);
117 }
118 
LLVMInitializeCodeGen(LLVMPassRegistryRef R)119 void LLVMInitializeCodeGen(LLVMPassRegistryRef R) {
120   initializeCodeGen(*unwrap(R));
121 }
122