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 initializeLiveDebugValuesPass(Registry
);
54 initializeLiveDebugVariablesPass(Registry
);
55 initializeLiveIntervalsPass(Registry
);
56 initializeLiveRangeShrinkPass(Registry
);
57 initializeLiveStacksPass(Registry
);
58 initializeLiveVariablesPass(Registry
);
59 initializeLocalStackSlotPassPass(Registry
);
60 initializeLowerIntrinsicsPass(Registry
);
61 initializeMIRCanonicalizerPass(Registry
);
62 initializeMIRNamerPass(Registry
);
63 initializeMachineBlockFrequencyInfoPass(Registry
);
64 initializeMachineBlockPlacementPass(Registry
);
65 initializeMachineBlockPlacementStatsPass(Registry
);
66 initializeMachineCSEPass(Registry
);
67 initializeMachineCombinerPass(Registry
);
68 initializeMachineCopyPropagationPass(Registry
);
69 initializeMachineDominatorTreePass(Registry
);
70 initializeMachineFunctionPrinterPassPass(Registry
);
71 initializeMachineLICMPass(Registry
);
72 initializeMachineLoopInfoPass(Registry
);
73 initializeMachineModuleInfoWrapperPassPass(Registry
);
74 initializeMachineOptimizationRemarkEmitterPassPass(Registry
);
75 initializeMachineOutlinerPass(Registry
);
76 initializeMachinePipelinerPass(Registry
);
77 initializeModuloScheduleTestPass(Registry
);
78 initializeMachinePostDominatorTreePass(Registry
);
79 initializeMachineRegionInfoPassPass(Registry
);
80 initializeMachineSchedulerPass(Registry
);
81 initializeMachineSinkingPass(Registry
);
82 initializeMachineVerifierPassPass(Registry
);
83 initializeOptimizePHIsPass(Registry
);
84 initializePEIPass(Registry
);
85 initializePHIEliminationPass(Registry
);
86 initializePatchableFunctionPass(Registry
);
87 initializePeepholeOptimizerPass(Registry
);
88 initializePostMachineSchedulerPass(Registry
);
89 initializePostRAHazardRecognizerPass(Registry
);
90 initializePostRAMachineSinkingPass(Registry
);
91 initializePostRASchedulerPass(Registry
);
92 initializePreISelIntrinsicLoweringLegacyPassPass(Registry
);
93 initializeProcessImplicitDefsPass(Registry
);
94 initializeRABasicPass(Registry
);
95 initializeRAGreedyPass(Registry
);
96 initializeRegAllocFastPass(Registry
);
97 initializeRegUsageInfoCollectorPass(Registry
);
98 initializeRegUsageInfoPropagationPass(Registry
);
99 initializeRegisterCoalescerPass(Registry
);
100 initializeRemoveRedundantDebugValuesPass(Registry
);
101 initializeRenameIndependentSubregsPass(Registry
);
102 initializeSafeStackLegacyPassPass(Registry
);
103 initializeShadowStackGCLoweringPass(Registry
);
104 initializeShrinkWrapPass(Registry
);
105 initializeSjLjEHPreparePass(Registry
);
106 initializeSlotIndexesPass(Registry
);
107 initializeStackColoringPass(Registry
);
108 initializeStackMapLivenessPass(Registry
);
109 initializeStackProtectorPass(Registry
);
110 initializeStackSlotColoringPass(Registry
);
111 initializeStripDebugMachineModulePass(Registry
);
112 initializeTailDuplicatePass(Registry
);
113 initializeTargetPassConfigPass(Registry
);
114 initializeTwoAddressInstructionPassPass(Registry
);
115 initializeTypePromotionPass(Registry
);
116 initializeUnpackMachineBundlesPass(Registry
);
117 initializeUnreachableBlockElimLegacyPassPass(Registry
);
118 initializeUnreachableMachineBlockElimPass(Registry
);
119 initializeVirtRegMapPass(Registry
);
120 initializeVirtRegRewriterPass(Registry
);
121 initializeWasmEHPreparePass(Registry
);
122 initializeWinEHPreparePass(Registry
);
123 initializeXRayInstrumentationPass(Registry
);
126 void LLVMInitializeCodeGen(LLVMPassRegistryRef R
) {
127 initializeCodeGen(*unwrap(R
));