Revert r354244 "[DAGCombiner] Eliminate dead stores to stack."
[llvm-complete.git] / lib / CodeGen / CodeGen.cpp
blob748db034d272bfaedcc3770c65c4387adf65ce7b
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.
12 //===----------------------------------------------------------------------===//
14 #include "llvm-c/Initialization.h"
15 #include "llvm/InitializePasses.h"
16 #include "llvm/PassRegistry.h"
18 using namespace llvm;
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 initializeEarlyMachineLICMPass(Registry);
32 initializeEarlyTailDuplicatePass(Registry);
33 initializeExpandISelPseudosPass(Registry);
34 initializeExpandMemCmpPassPass(Registry);
35 initializeExpandPostRAPass(Registry);
36 initializeFEntryInserterPass(Registry);
37 initializeFinalizeMachineBundlesPass(Registry);
38 initializeFuncletLayoutPass(Registry);
39 initializeGCMachineCodeAnalysisPass(Registry);
40 initializeGCModuleInfoPass(Registry);
41 initializeIfConverterPass(Registry);
42 initializeImplicitNullChecksPass(Registry);
43 initializeIndirectBrExpandPassPass(Registry);
44 initializeInterleavedLoadCombinePass(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);
113 void LLVMInitializeCodeGen(LLVMPassRegistryRef R) {
114 initializeCodeGen(*unwrap(R));