[PM/AA] Remove the AliasDebugger pass.
[oota-llvm.git] / include / llvm / LinkAllPasses.h
1 //===- llvm/LinkAllPasses.h ------------ Reference All Passes ---*- C++ -*-===//
2 //
3 //                      The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This header file pulls in all transformation and analysis passes for tools
11 // like opt and bugpoint that need this functionality.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_LINKALLPASSES_H
16 #define LLVM_LINKALLPASSES_H
17
18 #include "llvm/ADT/Statistic.h"
19 #include "llvm/Analysis/AliasSetTracker.h"
20 #include "llvm/Analysis/BasicAliasAnalysis.h"
21 #include "llvm/Analysis/CallPrinter.h"
22 #include "llvm/Analysis/DomPrinter.h"
23 #include "llvm/Analysis/IntervalPartition.h"
24 #include "llvm/Analysis/Lint.h"
25 #include "llvm/Analysis/Passes.h"
26 #include "llvm/Analysis/PostDominators.h"
27 #include "llvm/Analysis/RegionPass.h"
28 #include "llvm/Analysis/RegionPrinter.h"
29 #include "llvm/Analysis/ScalarEvolution.h"
30 #include "llvm/CodeGen/Passes.h"
31 #include "llvm/IR/Function.h"
32 #include "llvm/IR/IRPrintingPasses.h"
33 #include "llvm/Transforms/IPO.h"
34 #include "llvm/Transforms/Instrumentation.h"
35 #include "llvm/Transforms/ObjCARC.h"
36 #include "llvm/Transforms/Scalar.h"
37 #include "llvm/Transforms/Utils/SymbolRewriter.h"
38 #include "llvm/Transforms/Utils/UnifyFunctionExitNodes.h"
39 #include "llvm/Transforms/Vectorize.h"
40 #include "llvm/Support/Valgrind.h"
41 #include <cstdlib>
42
43 namespace {
44   struct ForcePassLinking {
45     ForcePassLinking() {
46       // We must reference the passes in such a way that compilers will not
47       // delete it all as dead code, even with whole program optimization,
48       // yet is effectively a NO-OP. As the compiler isn't smart enough
49       // to know that getenv() never returns -1, this will do the job.
50       if (std::getenv("bar") != (char*) -1)
51         return;
52
53       (void) llvm::createAAEvalPass();
54       (void) llvm::createAggressiveDCEPass();
55       (void) llvm::createBitTrackingDCEPass();
56       (void) llvm::createAliasAnalysisCounterPass();
57       (void) llvm::createArgumentPromotionPass();
58       (void) llvm::createAlignmentFromAssumptionsPass();
59       (void) llvm::createBasicAliasAnalysisPass();
60       (void) llvm::createLibCallAliasAnalysisPass(nullptr);
61       (void) llvm::createScalarEvolutionAliasAnalysisPass();
62       (void) llvm::createTypeBasedAliasAnalysisPass();
63       (void) llvm::createScopedNoAliasAAPass();
64       (void) llvm::createBoundsCheckingPass();
65       (void) llvm::createBreakCriticalEdgesPass();
66       (void) llvm::createCallGraphPrinterPass();
67       (void) llvm::createCallGraphViewerPass();
68       (void) llvm::createCFGSimplificationPass();
69       (void) llvm::createCFLAliasAnalysisPass();
70       (void) llvm::createStructurizeCFGPass();
71       (void) llvm::createConstantMergePass();
72       (void) llvm::createConstantPropagationPass();
73       (void) llvm::createCostModelAnalysisPass();
74       (void) llvm::createDeadArgEliminationPass();
75       (void) llvm::createDeadCodeEliminationPass();
76       (void) llvm::createDeadInstEliminationPass();
77       (void) llvm::createDeadStoreEliminationPass();
78       (void) llvm::createDependenceAnalysisPass();
79       (void) llvm::createDivergenceAnalysisPass();
80       (void) llvm::createDomOnlyPrinterPass();
81       (void) llvm::createDomPrinterPass();
82       (void) llvm::createDomOnlyViewerPass();
83       (void) llvm::createDomViewerPass();
84       (void) llvm::createGCOVProfilerPass();
85       (void) llvm::createInstrProfilingPass();
86       (void) llvm::createFunctionInliningPass();
87       (void) llvm::createAlwaysInlinerPass();
88       (void) llvm::createGlobalDCEPass();
89       (void) llvm::createGlobalOptimizerPass();
90       (void) llvm::createGlobalsModRefPass();
91       (void) llvm::createIPConstantPropagationPass();
92       (void) llvm::createIPSCCPPass();
93       (void) llvm::createInductiveRangeCheckEliminationPass();
94       (void) llvm::createIndVarSimplifyPass();
95       (void) llvm::createInstructionCombiningPass();
96       (void) llvm::createInternalizePass();
97       (void) llvm::createLCSSAPass();
98       (void) llvm::createLICMPass();
99       (void) llvm::createLazyValueInfoPass();
100       (void) llvm::createLoopExtractorPass();
101       (void) llvm::createLoopInterchangePass();
102       (void) llvm::createLoopSimplifyPass();
103       (void) llvm::createLoopStrengthReducePass();
104       (void) llvm::createLoopRerollPass();
105       (void) llvm::createLoopUnrollPass();
106       (void) llvm::createLoopUnswitchPass();
107       (void) llvm::createLoopIdiomPass();
108       (void) llvm::createLoopRotatePass();
109       (void) llvm::createLowerExpectIntrinsicPass();
110       (void) llvm::createLowerInvokePass();
111       (void) llvm::createLowerSwitchPass();
112       (void) llvm::createNaryReassociatePass();
113       (void) llvm::createNoAAPass();
114       (void) llvm::createObjCARCAliasAnalysisPass();
115       (void) llvm::createObjCARCAPElimPass();
116       (void) llvm::createObjCARCExpandPass();
117       (void) llvm::createObjCARCContractPass();
118       (void) llvm::createObjCARCOptPass();
119       (void) llvm::createPAEvalPass();
120       (void) llvm::createPromoteMemoryToRegisterPass();
121       (void) llvm::createDemoteRegisterToMemoryPass();
122       (void) llvm::createPruneEHPass();
123       (void) llvm::createPostDomOnlyPrinterPass();
124       (void) llvm::createPostDomPrinterPass();
125       (void) llvm::createPostDomOnlyViewerPass();
126       (void) llvm::createPostDomViewerPass();
127       (void) llvm::createReassociatePass();
128       (void) llvm::createRegionInfoPass();
129       (void) llvm::createRegionOnlyPrinterPass();
130       (void) llvm::createRegionOnlyViewerPass();
131       (void) llvm::createRegionPrinterPass();
132       (void) llvm::createRegionViewerPass();
133       (void) llvm::createSCCPPass();
134       (void) llvm::createSafeStackPass();
135       (void) llvm::createScalarReplAggregatesPass();
136       (void) llvm::createSingleLoopExtractorPass();
137       (void) llvm::createStripSymbolsPass();
138       (void) llvm::createStripNonDebugSymbolsPass();
139       (void) llvm::createStripDeadDebugInfoPass();
140       (void) llvm::createStripDeadPrototypesPass();
141       (void) llvm::createTailCallEliminationPass();
142       (void) llvm::createJumpThreadingPass();
143       (void) llvm::createUnifyFunctionExitNodesPass();
144       (void) llvm::createInstCountPass();
145       (void) llvm::createConstantHoistingPass();
146       (void) llvm::createCodeGenPreparePass();
147       (void) llvm::createEarlyCSEPass();
148       (void) llvm::createMergedLoadStoreMotionPass();
149       (void) llvm::createGVNPass();
150       (void) llvm::createMemCpyOptPass();
151       (void) llvm::createLoopDeletionPass();
152       (void) llvm::createPostDomTree();
153       (void) llvm::createInstructionNamerPass();
154       (void) llvm::createMetaRenamerPass();
155       (void) llvm::createFunctionAttrsPass();
156       (void) llvm::createMergeFunctionsPass();
157       (void) llvm::createPrintModulePass(*(llvm::raw_ostream*)nullptr);
158       (void) llvm::createPrintFunctionPass(*(llvm::raw_ostream*)nullptr);
159       (void) llvm::createPrintBasicBlockPass(*(llvm::raw_ostream*)nullptr);
160       (void) llvm::createModuleDebugInfoPrinterPass();
161       (void) llvm::createPartialInliningPass();
162       (void) llvm::createLintPass();
163       (void) llvm::createSinkingPass();
164       (void) llvm::createLowerAtomicPass();
165       (void) llvm::createCorrelatedValuePropagationPass();
166       (void) llvm::createMemDepPrinter();
167       (void) llvm::createInstructionSimplifierPass();
168       (void) llvm::createLoopVectorizePass();
169       (void) llvm::createSLPVectorizerPass();
170       (void) llvm::createBBVectorizePass();
171       (void) llvm::createPartiallyInlineLibCallsPass();
172       (void) llvm::createScalarizerPass();
173       (void) llvm::createSeparateConstOffsetFromGEPPass();
174       (void) llvm::createSpeculativeExecutionPass();
175       (void) llvm::createRewriteSymbolsPass();
176       (void) llvm::createStraightLineStrengthReducePass();
177       (void) llvm::createMemDerefPrinter();
178       (void) llvm::createFloat2IntPass();
179       (void) llvm::createEliminateAvailableExternallyPass();
180
181       (void)new llvm::IntervalPartition();
182       (void)new llvm::ScalarEvolution();
183       ((llvm::Function*)nullptr)->viewCFGOnly();
184       llvm::RGPassManager RGM;
185       ((llvm::RegionPass*)nullptr)->runOnRegion((llvm::Region*)nullptr, RGM);
186       llvm::AliasSetTracker X(*(llvm::AliasAnalysis*)nullptr);
187       X.add(nullptr, 0, llvm::AAMDNodes()); // for -print-alias-sets
188       (void) llvm::AreStatisticsEnabled();
189       (void) llvm::sys::RunningOnValgrind();
190     }
191   } ForcePassLinking; // Force link by creating a global definition.
192 }
193
194 #endif