[Alignment][NFC] Migrate Instructions to Align
[llvm-core.git] / include / llvm / LinkAllPasses.h
bloba285d172a5c1306e6708c4ce133d96ff2578270c
1 //===- llvm/LinkAllPasses.h ------------ Reference All Passes ---*- C++ -*-===//
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 header file pulls in all transformation and analysis passes for tools
10 // like opt and bugpoint that need this functionality.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_LINKALLPASSES_H
15 #define LLVM_LINKALLPASSES_H
17 #include "llvm/ADT/Statistic.h"
18 #include "llvm/Analysis/AliasAnalysisEvaluator.h"
19 #include "llvm/Analysis/AliasSetTracker.h"
20 #include "llvm/Analysis/BasicAliasAnalysis.h"
21 #include "llvm/Analysis/CFLAndersAliasAnalysis.h"
22 #include "llvm/Analysis/CFLSteensAliasAnalysis.h"
23 #include "llvm/Analysis/CallPrinter.h"
24 #include "llvm/Analysis/DomPrinter.h"
25 #include "llvm/Analysis/GlobalsModRef.h"
26 #include "llvm/Analysis/IntervalPartition.h"
27 #include "llvm/Analysis/Lint.h"
28 #include "llvm/Analysis/Passes.h"
29 #include "llvm/Analysis/PostDominators.h"
30 #include "llvm/Analysis/RegionPass.h"
31 #include "llvm/Analysis/RegionPrinter.h"
32 #include "llvm/Analysis/ScalarEvolution.h"
33 #include "llvm/Analysis/ScalarEvolutionAliasAnalysis.h"
34 #include "llvm/Analysis/ScopedNoAliasAA.h"
35 #include "llvm/Analysis/TargetLibraryInfo.h"
36 #include "llvm/Analysis/TypeBasedAliasAnalysis.h"
37 #include "llvm/CodeGen/Passes.h"
38 #include "llvm/IR/Function.h"
39 #include "llvm/IR/IRPrintingPasses.h"
40 #include "llvm/Support/Valgrind.h"
41 #include "llvm/Transforms/AggressiveInstCombine/AggressiveInstCombine.h"
42 #include "llvm/Transforms/IPO.h"
43 #include "llvm/Transforms/IPO/AlwaysInliner.h"
44 #include "llvm/Transforms/IPO/Attributor.h"
45 #include "llvm/Transforms/IPO/FunctionAttrs.h"
46 #include "llvm/Transforms/InstCombine/InstCombine.h"
47 #include "llvm/Transforms/Instrumentation.h"
48 #include "llvm/Transforms/Instrumentation/BoundsChecking.h"
49 #include "llvm/Transforms/ObjCARC.h"
50 #include "llvm/Transforms/Scalar.h"
51 #include "llvm/Transforms/Scalar/GVN.h"
52 #include "llvm/Transforms/Scalar/InstSimplifyPass.h"
53 #include "llvm/Transforms/Scalar/Scalarizer.h"
54 #include "llvm/Transforms/Utils.h"
55 #include "llvm/Transforms/Utils/SymbolRewriter.h"
56 #include "llvm/Transforms/Utils/UnifyFunctionExitNodes.h"
57 #include "llvm/Transforms/Vectorize.h"
58 #include <cstdlib>
60 namespace {
61 struct ForcePassLinking {
62 ForcePassLinking() {
63 // We must reference the passes in such a way that compilers will not
64 // delete it all as dead code, even with whole program optimization,
65 // yet is effectively a NO-OP. As the compiler isn't smart enough
66 // to know that getenv() never returns -1, this will do the job.
67 if (std::getenv("bar") != (char*) -1)
68 return;
70 (void) llvm::createAAEvalPass();
71 (void) llvm::createAggressiveDCEPass();
72 (void) llvm::createAggressiveInstCombinerPass();
73 (void) llvm::createBitTrackingDCEPass();
74 (void) llvm::createArgumentPromotionPass();
75 (void) llvm::createAlignmentFromAssumptionsPass();
76 (void) llvm::createBasicAAWrapperPass();
77 (void) llvm::createSCEVAAWrapperPass();
78 (void) llvm::createTypeBasedAAWrapperPass();
79 (void) llvm::createScopedNoAliasAAWrapperPass();
80 (void) llvm::createBoundsCheckingLegacyPass();
81 (void) llvm::createBreakCriticalEdgesPass();
82 (void) llvm::createCallGraphDOTPrinterPass();
83 (void) llvm::createCallGraphViewerPass();
84 (void) llvm::createCFGSimplificationPass();
85 (void) llvm::createCFLAndersAAWrapperPass();
86 (void) llvm::createCFLSteensAAWrapperPass();
87 (void) llvm::createStructurizeCFGPass();
88 (void) llvm::createLibCallsShrinkWrapPass();
89 (void) llvm::createCalledValuePropagationPass();
90 (void) llvm::createConstantMergePass();
91 (void) llvm::createConstantPropagationPass();
92 (void) llvm::createControlHeightReductionLegacyPass();
93 (void) llvm::createCostModelAnalysisPass();
94 (void) llvm::createDeadArgEliminationPass();
95 (void) llvm::createDeadCodeEliminationPass();
96 (void) llvm::createDeadInstEliminationPass();
97 (void) llvm::createDeadStoreEliminationPass();
98 (void) llvm::createDependenceAnalysisWrapperPass();
99 (void) llvm::createDomOnlyPrinterPass();
100 (void) llvm::createDomPrinterPass();
101 (void) llvm::createDomOnlyViewerPass();
102 (void) llvm::createDomViewerPass();
103 (void) llvm::createGCOVProfilerPass();
104 (void) llvm::createPGOInstrumentationGenLegacyPass();
105 (void) llvm::createPGOInstrumentationUseLegacyPass();
106 (void) llvm::createPGOInstrumentationGenCreateVarLegacyPass();
107 (void) llvm::createPGOIndirectCallPromotionLegacyPass();
108 (void) llvm::createPGOMemOPSizeOptLegacyPass();
109 (void) llvm::createInstrProfilingLegacyPass();
110 (void) llvm::createFunctionImportPass();
111 (void) llvm::createFunctionInliningPass();
112 (void) llvm::createAlwaysInlinerLegacyPass();
113 (void) llvm::createGlobalDCEPass();
114 (void) llvm::createGlobalOptimizerPass();
115 (void) llvm::createGlobalsAAWrapperPass();
116 (void) llvm::createGuardWideningPass();
117 (void) llvm::createLoopGuardWideningPass();
118 (void) llvm::createIPConstantPropagationPass();
119 (void) llvm::createIPSCCPPass();
120 (void) llvm::createInductiveRangeCheckEliminationPass();
121 (void) llvm::createIndVarSimplifyPass();
122 (void) llvm::createInstSimplifyLegacyPass();
123 (void) llvm::createInstructionCombiningPass();
124 (void) llvm::createInternalizePass();
125 (void) llvm::createLCSSAPass();
126 (void) llvm::createLegacyDivergenceAnalysisPass();
127 (void) llvm::createLICMPass();
128 (void) llvm::createLoopSinkPass();
129 (void) llvm::createLazyValueInfoPass();
130 (void) llvm::createLoopExtractorPass();
131 (void) llvm::createLoopInterchangePass();
132 (void) llvm::createLoopPredicationPass();
133 (void) llvm::createLoopSimplifyPass();
134 (void) llvm::createLoopSimplifyCFGPass();
135 (void) llvm::createLoopStrengthReducePass();
136 (void) llvm::createLoopRerollPass();
137 (void) llvm::createLoopUnrollPass();
138 (void) llvm::createLoopUnrollAndJamPass();
139 (void) llvm::createLoopUnswitchPass();
140 (void) llvm::createLoopVersioningLICMPass();
141 (void) llvm::createLoopIdiomPass();
142 (void) llvm::createLoopRotatePass();
143 (void) llvm::createLowerExpectIntrinsicPass();
144 (void) llvm::createLowerInvokePass();
145 (void) llvm::createLowerSwitchPass();
146 (void) llvm::createNaryReassociatePass();
147 (void) llvm::createObjCARCAAWrapperPass();
148 (void) llvm::createObjCARCAPElimPass();
149 (void) llvm::createObjCARCExpandPass();
150 (void) llvm::createObjCARCContractPass();
151 (void) llvm::createObjCARCOptPass();
152 (void) llvm::createPAEvalPass();
153 (void) llvm::createPromoteMemoryToRegisterPass();
154 (void) llvm::createDemoteRegisterToMemoryPass();
155 (void) llvm::createPruneEHPass();
156 (void) llvm::createPostDomOnlyPrinterPass();
157 (void) llvm::createPostDomPrinterPass();
158 (void) llvm::createPostDomOnlyViewerPass();
159 (void) llvm::createPostDomViewerPass();
160 (void) llvm::createReassociatePass();
161 (void) llvm::createRegionInfoPass();
162 (void) llvm::createRegionOnlyPrinterPass();
163 (void) llvm::createRegionOnlyViewerPass();
164 (void) llvm::createRegionPrinterPass();
165 (void) llvm::createRegionViewerPass();
166 (void) llvm::createSCCPPass();
167 (void) llvm::createSafeStackPass();
168 (void) llvm::createSROAPass();
169 (void) llvm::createSingleLoopExtractorPass();
170 (void) llvm::createStripSymbolsPass();
171 (void) llvm::createStripNonDebugSymbolsPass();
172 (void) llvm::createStripDeadDebugInfoPass();
173 (void) llvm::createStripDeadPrototypesPass();
174 (void) llvm::createTailCallEliminationPass();
175 (void) llvm::createJumpThreadingPass();
176 (void) llvm::createUnifyFunctionExitNodesPass();
177 (void) llvm::createInstCountPass();
178 (void) llvm::createConstantHoistingPass();
179 (void) llvm::createCodeGenPreparePass();
180 (void) llvm::createEntryExitInstrumenterPass();
181 (void) llvm::createPostInlineEntryExitInstrumenterPass();
182 (void) llvm::createEarlyCSEPass();
183 (void) llvm::createGVNHoistPass();
184 (void) llvm::createMergedLoadStoreMotionPass();
185 (void) llvm::createGVNPass();
186 (void) llvm::createNewGVNPass();
187 (void) llvm::createMemCpyOptPass();
188 (void) llvm::createLoopDeletionPass();
189 (void) llvm::createPostDomTree();
190 (void) llvm::createInstructionNamerPass();
191 (void) llvm::createMetaRenamerPass();
192 (void) llvm::createAttributorLegacyPass();
193 (void) llvm::createPostOrderFunctionAttrsLegacyPass();
194 (void) llvm::createReversePostOrderFunctionAttrsPass();
195 (void) llvm::createMergeFunctionsPass();
196 (void) llvm::createMergeICmpsLegacyPass();
197 (void) llvm::createExpandMemCmpPass();
198 std::string buf;
199 llvm::raw_string_ostream os(buf);
200 (void) llvm::createPrintModulePass(os);
201 (void) llvm::createPrintFunctionPass(os);
202 (void) llvm::createPrintBasicBlockPass(os);
203 (void) llvm::createModuleDebugInfoPrinterPass();
204 (void) llvm::createPartialInliningPass();
205 (void) llvm::createLintPass();
206 (void) llvm::createSinkingPass();
207 (void) llvm::createLowerAtomicPass();
208 (void) llvm::createCorrelatedValuePropagationPass();
209 (void) llvm::createMemDepPrinter();
210 (void) llvm::createLoopVectorizePass();
211 (void) llvm::createSLPVectorizerPass();
212 (void) llvm::createLoadStoreVectorizerPass();
213 (void) llvm::createPartiallyInlineLibCallsPass();
214 (void) llvm::createScalarizerPass();
215 (void) llvm::createSeparateConstOffsetFromGEPPass();
216 (void) llvm::createSpeculativeExecutionPass();
217 (void) llvm::createSpeculativeExecutionIfHasBranchDivergencePass();
218 (void) llvm::createRewriteSymbolsPass();
219 (void) llvm::createStraightLineStrengthReducePass();
220 (void) llvm::createMemDerefPrinter();
221 (void) llvm::createMustExecutePrinter();
222 (void) llvm::createMustBeExecutedContextPrinter();
223 (void) llvm::createFloat2IntPass();
224 (void) llvm::createEliminateAvailableExternallyPass();
225 (void) llvm::createScalarizeMaskedMemIntrinPass();
226 (void) llvm::createWarnMissedTransformationsPass();
227 (void) llvm::createHardwareLoopsPass();
229 (void)new llvm::IntervalPartition();
230 (void)new llvm::ScalarEvolutionWrapperPass();
231 llvm::Function::Create(nullptr, llvm::GlobalValue::ExternalLinkage)->viewCFGOnly();
232 llvm::RGPassManager RGM;
233 llvm::TargetLibraryInfoImpl TLII;
234 llvm::TargetLibraryInfo TLI(TLII);
235 llvm::AliasAnalysis AA(TLI);
236 llvm::AliasSetTracker X(AA);
237 X.add(nullptr, llvm::LocationSize::unknown(),
238 llvm::AAMDNodes()); // for -print-alias-sets
239 (void) llvm::AreStatisticsEnabled();
240 (void) llvm::sys::RunningOnValgrind();
242 } ForcePassLinking; // Force link by creating a global definition.
245 #endif