1 //===-- CodeGen.cpp -------------------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
9 // This file implements the common initialization routines for the
12 //===----------------------------------------------------------------------===//
14 #include "llvm-c/Initialization.h"
15 #include "llvm/InitializePasses.h"
16 #include "llvm/PassRegistry.h"
20 /// initializeCodeGen - Initialize all passes linked into the CodeGen library.
21 void llvm::initializeCodeGen(PassRegistry
&Registry
) {
22 initializeAtomicExpandPass(Registry
);
23 initializeBasicBlockSectionsPass(Registry
);
24 initializeBranchFolderPassPass(Registry
);
25 initializeBranchRelaxationPass(Registry
);
26 initializeCFGuardLongjmpPass(Registry
);
27 initializeCFIInstrInserterPass(Registry
);
28 initializeCheckDebugMachineModulePass(Registry
);
29 initializeCodeGenPreparePass(Registry
);
30 initializeDeadMachineInstructionElimPass(Registry
);
31 initializeDebugifyMachineModulePass(Registry
);
32 initializeDetectDeadLanesPass(Registry
);
33 initializeDwarfEHPrepareLegacyPassPass(Registry
);
34 initializeEarlyIfConverterPass(Registry
);
35 initializeEarlyIfPredicatorPass(Registry
);
36 initializeEarlyMachineLICMPass(Registry
);
37 initializeEarlyTailDuplicatePass(Registry
);
38 initializeExpandMemCmpPassPass(Registry
);
39 initializeExpandPostRAPass(Registry
);
40 initializeFEntryInserterPass(Registry
);
41 initializeFinalizeISelPass(Registry
);
42 initializeFinalizeMachineBundlesPass(Registry
);
43 initializeFixupStatepointCallerSavedPass(Registry
);
44 initializeFuncletLayoutPass(Registry
);
45 initializeGCMachineCodeAnalysisPass(Registry
);
46 initializeGCModuleInfoPass(Registry
);
47 initializeHardwareLoopsPass(Registry
);
48 initializeIfConverterPass(Registry
);
49 initializeImplicitNullChecksPass(Registry
);
50 initializeIndirectBrExpandPassPass(Registry
);
51 initializeInterleavedLoadCombinePass(Registry
);
52 initializeInterleavedAccessPass(Registry
);
53 initializeJMCInstrumenterPass(Registry
);
54 initializeLiveDebugValuesPass(Registry
);
55 initializeLiveDebugVariablesPass(Registry
);
56 initializeLiveIntervalsPass(Registry
);
57 initializeLiveRangeShrinkPass(Registry
);
58 initializeLiveStacksPass(Registry
);
59 initializeLiveVariablesPass(Registry
);
60 initializeLocalStackSlotPassPass(Registry
);
61 initializeLowerIntrinsicsPass(Registry
);
62 initializeMIRAddFSDiscriminatorsPass(Registry
);
63 initializeMIRCanonicalizerPass(Registry
);
64 initializeMIRNamerPass(Registry
);
65 initializeMIRProfileLoaderPassPass(Registry
);
66 initializeMachineBlockFrequencyInfoPass(Registry
);
67 initializeMachineBlockPlacementPass(Registry
);
68 initializeMachineBlockPlacementStatsPass(Registry
);
69 initializeMachineCSEPass(Registry
);
70 initializeMachineCombinerPass(Registry
);
71 initializeMachineCopyPropagationPass(Registry
);
72 initializeMachineCycleInfoPrinterPassPass(Registry
);
73 initializeMachineCycleInfoWrapperPassPass(Registry
);
74 initializeMachineDominatorTreePass(Registry
);
75 initializeMachineFunctionPrinterPassPass(Registry
);
76 initializeMachineLICMPass(Registry
);
77 initializeMachineLoopInfoPass(Registry
);
78 initializeMachineModuleInfoWrapperPassPass(Registry
);
79 initializeMachineOptimizationRemarkEmitterPassPass(Registry
);
80 initializeMachineOutlinerPass(Registry
);
81 initializeMachinePipelinerPass(Registry
);
82 initializeModuloScheduleTestPass(Registry
);
83 initializeMachinePostDominatorTreePass(Registry
);
84 initializeMachineRegionInfoPassPass(Registry
);
85 initializeMachineSchedulerPass(Registry
);
86 initializeMachineSinkingPass(Registry
);
87 initializeMachineVerifierPassPass(Registry
);
88 initializeOptimizePHIsPass(Registry
);
89 initializePEIPass(Registry
);
90 initializePHIEliminationPass(Registry
);
91 initializePatchableFunctionPass(Registry
);
92 initializePeepholeOptimizerPass(Registry
);
93 initializePostMachineSchedulerPass(Registry
);
94 initializePostRAHazardRecognizerPass(Registry
);
95 initializePostRAMachineSinkingPass(Registry
);
96 initializePostRASchedulerPass(Registry
);
97 initializePreISelIntrinsicLoweringLegacyPassPass(Registry
);
98 initializeProcessImplicitDefsPass(Registry
);
99 initializeRABasicPass(Registry
);
100 initializeRAGreedyPass(Registry
);
101 initializeRegAllocFastPass(Registry
);
102 initializeRegUsageInfoCollectorPass(Registry
);
103 initializeRegUsageInfoPropagationPass(Registry
);
104 initializeRegisterCoalescerPass(Registry
);
105 initializeRemoveRedundantDebugValuesPass(Registry
);
106 initializeRenameIndependentSubregsPass(Registry
);
107 initializeSafeStackLegacyPassPass(Registry
);
108 initializeShadowStackGCLoweringPass(Registry
);
109 initializeShrinkWrapPass(Registry
);
110 initializeSjLjEHPreparePass(Registry
);
111 initializeSlotIndexesPass(Registry
);
112 initializeStackColoringPass(Registry
);
113 initializeStackMapLivenessPass(Registry
);
114 initializeStackProtectorPass(Registry
);
115 initializeStackSlotColoringPass(Registry
);
116 initializeStripDebugMachineModulePass(Registry
);
117 initializeTailDuplicatePass(Registry
);
118 initializeTargetPassConfigPass(Registry
);
119 initializeTwoAddressInstructionPassPass(Registry
);
120 initializeTypePromotionPass(Registry
);
121 initializeUnpackMachineBundlesPass(Registry
);
122 initializeUnreachableBlockElimLegacyPassPass(Registry
);
123 initializeUnreachableMachineBlockElimPass(Registry
);
124 initializeVirtRegMapPass(Registry
);
125 initializeVirtRegRewriterPass(Registry
);
126 initializeWasmEHPreparePass(Registry
);
127 initializeWinEHPreparePass(Registry
);
128 initializeXRayInstrumentationPass(Registry
);
131 void LLVMInitializeCodeGen(LLVMPassRegistryRef R
) {
132 initializeCodeGen(*unwrap(R
));