diff options
| author | Chris Lattner <sabre@nondot.org> | 2011-05-22 00:21:15 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2011-05-22 00:21:15 +0000 |
| commit | ac99108d368f670362be4c3f8a820de4dd19adb3 (patch) | |
| tree | 0e5e953ca35f2fea7c3d8d095ca2e8cd8bb48682 /llvm | |
| parent | a51c9ccf2d318a54d071a0866ee22afb790b5caa (diff) | |
| download | bcm5719-llvm-ac99108d368f670362be4c3f8a820de4dd19adb3.tar.gz bcm5719-llvm-ac99108d368f670362be4c3f8a820de4dd19adb3.zip | |
switch llvm-ld. It has a terrible mechanism that people can add extra
passes, it should be converted to use extension points.
llvm-svn: 131823
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/tools/llvm-ld/Optimize.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/llvm/tools/llvm-ld/Optimize.cpp b/llvm/tools/llvm-ld/Optimize.cpp index ef4502bab8d..d8200e21adb 100644 --- a/llvm/tools/llvm-ld/Optimize.cpp +++ b/llvm/tools/llvm-ld/Optimize.cpp @@ -12,9 +12,8 @@ //===----------------------------------------------------------------------===// #include "llvm/Module.h" -#include "llvm/PassManager.h" #include "llvm/Support/CommandLine.h" -#include "llvm/Support/StandardPasses.h" +#include "llvm/Support/PassMAnagerBuilder.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Support/DynamicLibrary.h" #include "llvm/Target/TargetData.h" @@ -71,11 +70,10 @@ static inline void addPass(PassManager &PM, Pass *P) { } namespace llvm { - /// Optimize - Perform link time optimizations. This will run the scalar /// optimizations, any loaded plugin-optimization modules, and then the /// inter-procedural optimizations if applicable. -void Optimize(Module* M) { +void Optimize(Module *M) { // Instantiate the pass manager to organize the passes. PassManager Passes; @@ -88,8 +86,8 @@ void Optimize(Module* M) { addPass(Passes, new TargetData(M)); if (!DisableOptimizations) - createStandardLTOPasses(&Passes, !DisableInternalize, !DisableInline, - VerifyEach); + PassManagerBuilder().populateLTOPassManager(Passes, !DisableInternalize, + !DisableInline); // If the -s or -S command line options were specified, strip the symbols out // of the resulting program to make it smaller. -s and -S are GNU ld options |

