llvm.org GIT mirror llvm / c684e83
Move methods in PassManagerBuilder offline. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136727 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 8 years ago
6 changed file(s) with 281 addition(s) and 236 deletion(s). Raw diff Collapse all Expand all
99 // This file defines the PassManagerBuilder class, which is used to set up a
1010 // "standard" optimization sequence suitable for languages like C and C++.
1111 //
12 // These are implemented as inline functions so that we do not have to worry
13 // about link issues.
14 //
1512 //===----------------------------------------------------------------------===//
1613
1714 #ifndef LLVM_SUPPORT_PASSMANAGERBUILDER_H
1815 #define LLVM_SUPPORT_PASSMANAGERBUILDER_H
1916
20 #include "llvm/PassManager.h"
21 #include "llvm/DefaultPasses.h"
22 #include "llvm/Analysis/Passes.h"
23 #include "llvm/Analysis/Verifier.h"
24 #include "llvm/Target/TargetLibraryInfo.h"
25 #include "llvm/Transforms/Scalar.h"
26 #include "llvm/Transforms/IPO.h"
17 #include
2718
2819 namespace llvm {
29
20 class TargetLibraryInfo;
21 class PassManagerBase;
22 class Pass;
23 class FunctionPassManager;
24
3025 /// PassManagerBuilder - This class is used to set up a standard optimization
3126 /// sequence for languages like C and C++, allowing some APIs to customize the
3227 /// pass sequence in various ways. A simple example of using it would be:
5348 /// ...
5449 class PassManagerBuilder {
5550 public:
56
51
5752 /// Extensions are passed the builder itself (so they can see how it is
5853 /// configured) as well as the pass manager to add stuff to.
5954 typedef void (*ExtensionFn)(const PassManagerBuilder &Builder,
6358 /// any other transformations, allowing them to see the code as it is coming
6459 /// out of the frontend.
6560 EP_EarlyAsPossible,
66
61
6762 /// EP_LoopOptimizerEnd - This extension point allows adding loop passes to
6863 /// the end of the loop optimizer.
6964 EP_LoopOptimizerEnd,
7368 /// cleanup-ish optimizations.
7469 EP_ScalarOptimizerLate
7570 };
76
71
7772 /// The Optimization Level - Specify the basic optimization level.
7873 /// 0 = -O0, 1 = -O1, 2 = -O2, 3 = -O3
7974 unsigned OptLevel;
80
75
8176 /// SizeLevel - How much we're optimizing for size.
8277 /// 0 = none, 1 = -Os, 2 = -Oz
8378 unsigned SizeLevel;
84
79
8580 /// LibraryInfo - Specifies information about the runtime library for the
8681 /// optimizer. If this is non-null, it is added to both the function and
8782 /// per-module pass pipeline.
8883 TargetLibraryInfo *LibraryInfo;
89
84
9085 /// Inliner - Specifies the inliner to use. If this is non-null, it is
9186 /// added to the per-module passes.
9287 Pass *Inliner;
93
88
9489 bool DisableSimplifyLibCalls;
9590 bool DisableUnitAtATime;
9691 bool DisableUnrollLoops;
97
92
9893 private:
9994 /// ExtensionList - This is list of all of the extensions that are registered.
10095 std::vector > Extensions;
101
96
10297 public:
103 PassManagerBuilder() {
104 OptLevel = 2;
105 SizeLevel = 0;
106 LibraryInfo = 0;
107 Inliner = 0;
108 DisableSimplifyLibCalls = false;
109 DisableUnitAtATime = false;
110 DisableUnrollLoops = false;
111 }
112
113 ~PassManagerBuilder() {
114 delete LibraryInfo;
115 delete Inliner;
116 }
117
118 void addExtension(ExtensionPointTy Ty, ExtensionFn Fn) {
119 Extensions.push_back(std::make_pair(Ty, Fn));
120 }
121
98 PassManagerBuilder();
99 ~PassManagerBuilder();
100 void addExtension(ExtensionPointTy Ty, ExtensionFn Fn);
101
122102 private:
123 void addExtensionsToPM(ExtensionPointTy ETy, PassManagerBase &PM) const {
124 for (unsigned i = 0, e = Extensions.size(); i != e; ++i)
125 if (Extensions[i].first == ETy)
126 Extensions[i].second(*this, PM);
127 }
128
129 void addInitialAliasAnalysisPasses(PassManagerBase &PM) const {
130 // Add TypeBasedAliasAnalysis before BasicAliasAnalysis so that
131 // BasicAliasAnalysis wins if they disagree. This is intended to help
132 // support "obvious" type-punning idioms.
133 PM.add(createTypeBasedAliasAnalysisPass());
134 PM.add(createBasicAliasAnalysisPass());
135 }
103 void addExtensionsToPM(ExtensionPointTy ETy, PassManagerBase &PM) const;
104 void addInitialAliasAnalysisPasses(PassManagerBase &PM) const;
136105 public:
137
106
138107 /// populateFunctionPassManager - This fills in the function pass manager,
139108 /// which is expected to be run on each function immediately as it is
140109 /// generated. The idea is to reduce the size of the IR in memory.
141 void populateFunctionPassManager(FunctionPassManager &FPM) {
142 addExtensionsToPM(EP_EarlyAsPossible, FPM);
143
144 // Add LibraryInfo if we have some.
145 if (LibraryInfo) FPM.add(new TargetLibraryInfo(*LibraryInfo));
110 void populateFunctionPassManager(FunctionPassManager &FPM);
146111
147 if (OptLevel == 0) return;
148
149 addInitialAliasAnalysisPasses(FPM);
150
151 FPM.add(createCFGSimplificationPass());
152 FPM.add(createScalarReplAggregatesPass());
153 FPM.add(createEarlyCSEPass());
154 FPM.add(createLowerExpectIntrinsicPass());
155 }
156
157112 /// populateModulePassManager - This sets up the primary pass manager.
158 void populateModulePassManager(PassManagerBase &MPM) {
159 // If all optimizations are disabled, just run the always-inline pass.
160 if (OptLevel == 0) {
161 if (Inliner) {
162 MPM.add(Inliner);
163 Inliner = 0;
164 }
165 return;
166 }
167
168 // Add LibraryInfo if we have some.
169 if (LibraryInfo) MPM.add(new TargetLibraryInfo(*LibraryInfo));
170
171 addInitialAliasAnalysisPasses(MPM);
172
173 if (!DisableUnitAtATime) {
174 MPM.add(createGlobalOptimizerPass()); // Optimize out global vars
175
176 MPM.add(createIPSCCPPass()); // IP SCCP
177 MPM.add(createDeadArgEliminationPass()); // Dead argument elimination
178
179 MPM.add(createInstructionCombiningPass());// Clean up after IPCP & DAE
180 MPM.add(createCFGSimplificationPass()); // Clean up after IPCP & DAE
181 }
182
183 // Start of CallGraph SCC passes.
184 if (!DisableUnitAtATime)
185 MPM.add(createPruneEHPass()); // Remove dead EH info
186 if (Inliner) {
187 MPM.add(Inliner);
188 Inliner = 0;
189 }
190 if (!DisableUnitAtATime)
191 MPM.add(createFunctionAttrsPass()); // Set readonly/readnone attrs
192 if (OptLevel > 2)
193 MPM.add(createArgumentPromotionPass()); // Scalarize uninlined fn args
194
195 // Start of function pass.
196 // Break up aggregate allocas, using SSAUpdater.
197 MPM.add(createScalarReplAggregatesPass(-1, false));
198 MPM.add(createEarlyCSEPass()); // Catch trivial redundancies
199 if (!DisableSimplifyLibCalls)
200 MPM.add(createSimplifyLibCallsPass()); // Library Call Optimizations
201 MPM.add(createJumpThreadingPass()); // Thread jumps.
202 MPM.add(createCorrelatedValuePropagationPass()); // Propagate conditionals
203 MPM.add(createCFGSimplificationPass()); // Merge & remove BBs
204 MPM.add(createInstructionCombiningPass()); // Combine silly seq's
205
206 MPM.add(createTailCallEliminationPass()); // Eliminate tail calls
207 MPM.add(createCFGSimplificationPass()); // Merge & remove BBs
208 MPM.add(createReassociatePass()); // Reassociate expressions
209 MPM.add(createLoopRotatePass()); // Rotate Loop
210 MPM.add(createLICMPass()); // Hoist loop invariants
211 MPM.add(createLoopUnswitchPass(SizeLevel || OptLevel < 3));
212 MPM.add(createInstructionCombiningPass());
213 MPM.add(createIndVarSimplifyPass()); // Canonicalize indvars
214 MPM.add(createLoopIdiomPass()); // Recognize idioms like memset.
215 MPM.add(createLoopDeletionPass()); // Delete dead loops
216 if (!DisableUnrollLoops)
217 MPM.add(createLoopUnrollPass()); // Unroll small loops
218 addExtensionsToPM(EP_LoopOptimizerEnd, MPM);
219
220 if (OptLevel > 1)
221 MPM.add(createGVNPass()); // Remove redundancies
222 MPM.add(createMemCpyOptPass()); // Remove memcpy / form memset
223 MPM.add(createSCCPPass()); // Constant prop with SCCP
224
225 // Run instcombine after redundancy elimination to exploit opportunities
226 // opened up by them.
227 MPM.add(createInstructionCombiningPass());
228 MPM.add(createJumpThreadingPass()); // Thread jumps
229 MPM.add(createCorrelatedValuePropagationPass());
230 MPM.add(createDeadStoreEliminationPass()); // Delete dead stores
231
232 addExtensionsToPM(EP_ScalarOptimizerLate, MPM);
233
234 MPM.add(createAggressiveDCEPass()); // Delete dead instructions
235 MPM.add(createCFGSimplificationPass()); // Merge & remove BBs
236 MPM.add(createInstructionCombiningPass()); // Clean up after everything.
237
238 if (!DisableUnitAtATime) {
239 // FIXME: We shouldn't bother with this anymore.
240 MPM.add(createStripDeadPrototypesPass()); // Get rid of dead prototypes
241
242 // GlobalOpt already deletes dead functions and globals, at -O3 try a
243 // late pass of GlobalDCE. It is capable of deleting dead cycles.
244 if (OptLevel > 2)
245 MPM.add(createGlobalDCEPass()); // Remove dead fns and globals.
246
247 if (OptLevel > 1)
248 MPM.add(createConstantMergePass()); // Merge dup global constants
249 }
250 }
251
113 void populateModulePassManager(PassManagerBase &MPM);
252114 void populateLTOPassManager(PassManagerBase &PM, bool Internalize,
253 bool RunInliner) {
254 // Provide AliasAnalysis services for optimizations.
255 addInitialAliasAnalysisPasses(PM);
256
257 // Now that composite has been compiled, scan through the module, looking
258 // for a main function. If main is defined, mark all other functions
259 // internal.
260 if (Internalize)
261 PM.add(createInternalizePass(true));
262
263 // Propagate constants at call sites into the functions they call. This
264 // opens opportunities for globalopt (and inlining) by substituting function
265 // pointers passed as arguments to direct uses of functions.
266 PM.add(createIPSCCPPass());
267
268 // Now that we internalized some globals, see if we can hack on them!
269 PM.add(createGlobalOptimizerPass());
270
271 // Linking modules together can lead to duplicated global constants, only
272 // keep one copy of each constant.
273 PM.add(createConstantMergePass());
274
275 // Remove unused arguments from functions.
276 PM.add(createDeadArgEliminationPass());
277
278 // Reduce the code after globalopt and ipsccp. Both can open up significant
279 // simplification opportunities, and both can propagate functions through
280 // function pointers. When this happens, we often have to resolve varargs
281 // calls, etc, so let instcombine do this.
282 PM.add(createInstructionCombiningPass());
283
284 // Inline small functions
285 if (RunInliner)
286 PM.add(createFunctionInliningPass());
287
288 PM.add(createPruneEHPass()); // Remove dead EH info.
289
290 // Optimize globals again if we ran the inliner.
291 if (RunInliner)
292 PM.add(createGlobalOptimizerPass());
293 PM.add(createGlobalDCEPass()); // Remove dead functions.
294
295 // If we didn't decide to inline a function, check to see if we can
296 // transform it to pass arguments by value instead of by reference.
297 PM.add(createArgumentPromotionPass());
298
299 // The IPO passes may leave cruft around. Clean up after them.
300 PM.add(createInstructionCombiningPass());
301 PM.add(createJumpThreadingPass());
302 // Break up allocas
303 PM.add(createScalarReplAggregatesPass());
304
305 // Run a few AA driven optimizations here and now, to cleanup the code.
306 PM.add(createFunctionAttrsPass()); // Add nocapture.
307 PM.add(createGlobalsModRefPass()); // IP alias analysis.
308
309 PM.add(createLICMPass()); // Hoist loop invariants.
310 PM.add(createGVNPass()); // Remove redundancies.
311 PM.add(createMemCpyOptPass()); // Remove dead memcpys.
312 // Nuke dead stores.
313 PM.add(createDeadStoreEliminationPass());
314
315 // Cleanup and simplify the code after the scalar optimizations.
316 PM.add(createInstructionCombiningPass());
317
318 PM.add(createJumpThreadingPass());
319
320 // Delete basic blocks, which optimization passes may have killed.
321 PM.add(createCFGSimplificationPass());
322
323 // Now that we have optimized the program, discard unreachable functions.
324 PM.add(createGlobalDCEPass());
325 }
115 bool RunInliner);
326116 };
327117
328
329118 } // end namespace llvm
330119 #endif
1515 LowerSetJmp.cpp
1616 MergeFunctions.cpp
1717 PartialInlining.cpp
18 PassManagerBuilder.cpp
1819 PruneEH.cpp
1920 StripDeadPrototypes.cpp
2021 StripSymbols.cpp
0 //===- PassManagerBuilder.cpp - Build Standard Pass -----------------------===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file defines the PassManagerBuilder class, which is used to set up a
10 // "standard" optimization sequence suitable for languages like C and C++.
11 //
12 //===----------------------------------------------------------------------===//
13
14
15 #include "llvm/Transforms/IPO/PassManagerBuilder.h"
16
17 #include "llvm/PassManager.h"
18 #include "llvm/DefaultPasses.h"
19 #include "llvm/PassManager.h"
20 #include "llvm/Analysis/Passes.h"
21 #include "llvm/Analysis/Verifier.h"
22 #include "llvm/Target/TargetLibraryInfo.h"
23 #include "llvm/Transforms/Scalar.h"
24 #include "llvm/Transforms/IPO.h"
25
26 using namespace llvm;
27
28 PassManagerBuilder::PassManagerBuilder() {
29 OptLevel = 2;
30 SizeLevel = 0;
31 LibraryInfo = 0;
32 Inliner = 0;
33 DisableSimplifyLibCalls = false;
34 DisableUnitAtATime = false;
35 DisableUnrollLoops = false;
36 }
37
38 PassManagerBuilder::~PassManagerBuilder() {
39 delete LibraryInfo;
40 delete Inliner;
41 }
42
43 void PassManagerBuilder::addExtension(ExtensionPointTy Ty, ExtensionFn Fn) {
44 Extensions.push_back(std::make_pair(Ty, Fn));
45 }
46
47 void PassManagerBuilder::addExtensionsToPM(ExtensionPointTy ETy,
48 PassManagerBase &PM) const {
49 for (unsigned i = 0, e = Extensions.size(); i != e; ++i)
50 if (Extensions[i].first == ETy)
51 Extensions[i].second(*this, PM);
52 }
53
54 void
55 PassManagerBuilder::addInitialAliasAnalysisPasses(PassManagerBase &PM) const {
56 // Add TypeBasedAliasAnalysis before BasicAliasAnalysis so that
57 // BasicAliasAnalysis wins if they disagree. This is intended to help
58 // support "obvious" type-punning idioms.
59 PM.add(createTypeBasedAliasAnalysisPass());
60 PM.add(createBasicAliasAnalysisPass());
61 }
62
63 void PassManagerBuilder::populateFunctionPassManager(FunctionPassManager &FPM) {
64 addExtensionsToPM(EP_EarlyAsPossible, FPM);
65
66 // Add LibraryInfo if we have some.
67 if (LibraryInfo) FPM.add(new TargetLibraryInfo(*LibraryInfo));
68
69 if (OptLevel == 0) return;
70
71 addInitialAliasAnalysisPasses(FPM);
72
73 FPM.add(createCFGSimplificationPass());
74 FPM.add(createScalarReplAggregatesPass());
75 FPM.add(createEarlyCSEPass());
76 FPM.add(createLowerExpectIntrinsicPass());
77 }
78
79 void PassManagerBuilder::populateModulePassManager(PassManagerBase &MPM) {
80 // If all optimizations are disabled, just run the always-inline pass.
81 if (OptLevel == 0) {
82 if (Inliner) {
83 MPM.add(Inliner);
84 Inliner = 0;
85 }
86 return;
87 }
88
89 // Add LibraryInfo if we have some.
90 if (LibraryInfo) MPM.add(new TargetLibraryInfo(*LibraryInfo));
91
92 addInitialAliasAnalysisPasses(MPM);
93
94 if (!DisableUnitAtATime) {
95 MPM.add(createGlobalOptimizerPass()); // Optimize out global vars
96
97 MPM.add(createIPSCCPPass()); // IP SCCP
98 MPM.add(createDeadArgEliminationPass()); // Dead argument elimination
99
100 MPM.add(createInstructionCombiningPass());// Clean up after IPCP & DAE
101 MPM.add(createCFGSimplificationPass()); // Clean up after IPCP & DAE
102 }
103
104 // Start of CallGraph SCC passes.
105 if (!DisableUnitAtATime)
106 MPM.add(createPruneEHPass()); // Remove dead EH info
107 if (Inliner) {
108 MPM.add(Inliner);
109 Inliner = 0;
110 }
111 if (!DisableUnitAtATime)
112 MPM.add(createFunctionAttrsPass()); // Set readonly/readnone attrs
113 if (OptLevel > 2)
114 MPM.add(createArgumentPromotionPass()); // Scalarize uninlined fn args
115
116 // Start of function pass.
117 // Break up aggregate allocas, using SSAUpdater.
118 MPM.add(createScalarReplAggregatesPass(-1, false));
119 MPM.add(createEarlyCSEPass()); // Catch trivial redundancies
120 if (!DisableSimplifyLibCalls)
121 MPM.add(createSimplifyLibCallsPass()); // Library Call Optimizations
122 MPM.add(createJumpThreadingPass()); // Thread jumps.
123 MPM.add(createCorrelatedValuePropagationPass()); // Propagate conditionals
124 MPM.add(createCFGSimplificationPass()); // Merge & remove BBs
125 MPM.add(createInstructionCombiningPass()); // Combine silly seq's
126
127 MPM.add(createTailCallEliminationPass()); // Eliminate tail calls
128 MPM.add(createCFGSimplificationPass()); // Merge & remove BBs
129 MPM.add(createReassociatePass()); // Reassociate expressions
130 MPM.add(createLoopRotatePass()); // Rotate Loop
131 MPM.add(createLICMPass()); // Hoist loop invariants
132 MPM.add(createLoopUnswitchPass(SizeLevel || OptLevel < 3));
133 MPM.add(createInstructionCombiningPass());
134 MPM.add(createIndVarSimplifyPass()); // Canonicalize indvars
135 MPM.add(createLoopIdiomPass()); // Recognize idioms like memset.
136 MPM.add(createLoopDeletionPass()); // Delete dead loops
137 if (!DisableUnrollLoops)
138 MPM.add(createLoopUnrollPass()); // Unroll small loops
139 addExtensionsToPM(EP_LoopOptimizerEnd, MPM);
140
141 if (OptLevel > 1)
142 MPM.add(createGVNPass()); // Remove redundancies
143 MPM.add(createMemCpyOptPass()); // Remove memcpy / form memset
144 MPM.add(createSCCPPass()); // Constant prop with SCCP
145
146 // Run instcombine after redundancy elimination to exploit opportunities
147 // opened up by them.
148 MPM.add(createInstructionCombiningPass());
149 MPM.add(createJumpThreadingPass()); // Thread jumps
150 MPM.add(createCorrelatedValuePropagationPass());
151 MPM.add(createDeadStoreEliminationPass()); // Delete dead stores
152
153 addExtensionsToPM(EP_ScalarOptimizerLate, MPM);
154
155 MPM.add(createAggressiveDCEPass()); // Delete dead instructions
156 MPM.add(createCFGSimplificationPass()); // Merge & remove BBs
157 MPM.add(createInstructionCombiningPass()); // Clean up after everything.
158
159 if (!DisableUnitAtATime) {
160 // FIXME: We shouldn't bother with this anymore.
161 MPM.add(createStripDeadPrototypesPass()); // Get rid of dead prototypes
162
163 // GlobalOpt already deletes dead functions and globals, at -O3 try a
164 // late pass of GlobalDCE. It is capable of deleting dead cycles.
165 if (OptLevel > 2)
166 MPM.add(createGlobalDCEPass()); // Remove dead fns and globals.
167
168 if (OptLevel > 1)
169 MPM.add(createConstantMergePass()); // Merge dup global constants
170 }
171 }
172
173 void PassManagerBuilder::populateLTOPassManager(PassManagerBase &PM,
174 bool Internalize,
175 bool RunInliner) {
176 // Provide AliasAnalysis services for optimizations.
177 addInitialAliasAnalysisPasses(PM);
178
179 // Now that composite has been compiled, scan through the module, looking
180 // for a main function. If main is defined, mark all other functions
181 // internal.
182 if (Internalize)
183 PM.add(createInternalizePass(true));
184
185 // Propagate constants at call sites into the functions they call. This
186 // opens opportunities for globalopt (and inlining) by substituting function
187 // pointers passed as arguments to direct uses of functions.
188 PM.add(createIPSCCPPass());
189
190 // Now that we internalized some globals, see if we can hack on them!
191 PM.add(createGlobalOptimizerPass());
192
193 // Linking modules together can lead to duplicated global constants, only
194 // keep one copy of each constant.
195 PM.add(createConstantMergePass());
196
197 // Remove unused arguments from functions.
198 PM.add(createDeadArgEliminationPass());
199
200 // Reduce the code after globalopt and ipsccp. Both can open up significant
201 // simplification opportunities, and both can propagate functions through
202 // function pointers. When this happens, we often have to resolve varargs
203 // calls, etc, so let instcombine do this.
204 PM.add(createInstructionCombiningPass());
205
206 // Inline small functions
207 if (RunInliner)
208 PM.add(createFunctionInliningPass());
209
210 PM.add(createPruneEHPass()); // Remove dead EH info.
211
212 // Optimize globals again if we ran the inliner.
213 if (RunInliner)
214 PM.add(createGlobalOptimizerPass());
215 PM.add(createGlobalDCEPass()); // Remove dead functions.
216
217 // If we didn't decide to inline a function, check to see if we can
218 // transform it to pass arguments by value instead of by reference.
219 PM.add(createArgumentPromotionPass());
220
221 // The IPO passes may leave cruft around. Clean up after them.
222 PM.add(createInstructionCombiningPass());
223 PM.add(createJumpThreadingPass());
224 // Break up allocas
225 PM.add(createScalarReplAggregatesPass());
226
227 // Run a few AA driven optimizations here and now, to cleanup the code.
228 PM.add(createFunctionAttrsPass()); // Add nocapture.
229 PM.add(createGlobalsModRefPass()); // IP alias analysis.
230
231 PM.add(createLICMPass()); // Hoist loop invariants.
232 PM.add(createGVNPass()); // Remove redundancies.
233 PM.add(createMemCpyOptPass()); // Remove dead memcpys.
234 // Nuke dead stores.
235 PM.add(createDeadStoreEliminationPass());
236
237 // Cleanup and simplify the code after the scalar optimizations.
238 PM.add(createInstructionCombiningPass());
239
240 PM.add(createJumpThreadingPass());
241
242 // Delete basic blocks, which optimization passes may have killed.
243 PM.add(createCFGSimplificationPass());
244
245 // Now that we have optimized the program, discard unreachable functions.
246 PM.add(createGlobalDCEPass());
247 }
1616 #include "ToolRunner.h"
1717 #include "llvm/LinkAllPasses.h"
1818 #include "llvm/LLVMContext.h"
19 #include "llvm/PassManager.h"
1920 #include "llvm/Support/PassNameParser.h"
2021 #include "llvm/Support/CommandLine.h"
2122 #include "llvm/Support/ManagedStatic.h"
1111 //===----------------------------------------------------------------------===//
1212
1313 #include "llvm/Module.h"
14 #include "llvm/PassManager.h"
15 #include "llvm/Analysis/Verifier.h"
1416 #include "llvm/Support/CommandLine.h"
1517 #include "llvm/Support/raw_ostream.h"
1618 #include "llvm/Support/DynamicLibrary.h"
1820 #include "llvm/Target/TargetMachine.h"
1921 #include "llvm/Support/PassNameParser.h"
2022 #include "llvm/Support/PluginLoader.h"
23 #include "llvm/Transforms/IPO.h"
2124 #include "llvm/Transforms/IPO/PassManagerBuilder.h"
25 #include "llvm/Transforms/Scalar.h"
2226 using namespace llvm;
2327
2428 // Pass Name Options as generated by the PassNameParser
2222 #include "llvm/ADT/StringExtras.h"
2323 #include "llvm/ADT/Triple.h"
2424 #include "llvm/Analysis/Passes.h"
25 #include "llvm/Analysis/Verifier.h"
2526 #include "llvm/Bitcode/ReaderWriter.h"
2627 #include "llvm/MC/MCAsmInfo.h"
2728 #include "llvm/MC/MCContext.h"
4344 #include "llvm/Support/Signals.h"
4445 #include "llvm/Support/system_error.h"
4546 #include "llvm/Config/config.h"
47 #include "llvm/Transforms/IPO.h"
4648 #include "llvm/Transforms/IPO/PassManagerBuilder.h"
4749 #include
4850 #include