diff options
author | Chris Lattner <sabre@nondot.org> | 2011-05-22 00:20:07 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-05-22 00:20:07 +0000 |
commit | 817a01ffb24504f5b00fdac9d79aa034c918f28b (patch) | |
tree | 338c8255d5626d59b14eed9e0c384053cd31305a /tools/bugpoint/bugpoint.cpp | |
parent | 92a9cb6594e22e2e273f61922226616bf0b943df (diff) | |
download | external_llvm-817a01ffb24504f5b00fdac9d79aa034c918f28b.zip external_llvm-817a01ffb24504f5b00fdac9d79aa034c918f28b.tar.gz external_llvm-817a01ffb24504f5b00fdac9d79aa034c918f28b.tar.bz2 |
switch bugpoint and liblto to PassManagerBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131821 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/bugpoint/bugpoint.cpp')
-rw-r--r-- | tools/bugpoint/bugpoint.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/tools/bugpoint/bugpoint.cpp b/tools/bugpoint/bugpoint.cpp index f9c9e18..efacd6a 100644 --- a/tools/bugpoint/bugpoint.cpp +++ b/tools/bugpoint/bugpoint.cpp @@ -22,7 +22,7 @@ #include "llvm/Support/ManagedStatic.h" #include "llvm/Support/PluginLoader.h" #include "llvm/Support/PrettyStackTrace.h" -#include "llvm/Support/StandardPasses.h" +#include "llvm/Support/PassManagerBuilder.h" #include "llvm/Support/Process.h" #include "llvm/Support/Signals.h" #include "llvm/Support/Valgrind.h" @@ -146,19 +146,17 @@ int main(int argc, char **argv) { AddToDriver PM(D); if (StandardCompileOpts) { - createStandardModulePasses(&PM, 3, - /*OptimizeSize=*/ false, - /*UnitAtATime=*/ true, - /*UnrollLoops=*/ true, - /*SimplifyLibCalls=*/ true, - /*HaveExceptions=*/ true, - createFunctionInliningPass()); + PassManagerBuilder Builder; + Builder.OptLevel = 3; + Builder.Inliner = createFunctionInliningPass(); + Builder.populateModulePassManager(PM); } - if (StandardLinkOpts) - createStandardLTOPasses(&PM, /*Internalize=*/true, - /*RunInliner=*/true, - /*VerifyEach=*/false); + if (StandardLinkOpts) { + PassManagerBuilder Builder; + Builder.populateLTOPassManager(PM, /*Internalize=*/true, + /*RunInliner=*/true); + } for (std::vector<const PassInfo*>::iterator I = PassList.begin(), |