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