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
This commit is contained in:
Chris Lattner 2011-05-22 00:21:15 +00:00
parent a51c9ccf2d
commit ac99108d36
1 changed files with 4 additions and 6 deletions

View File

@ -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,7 +70,6 @@ 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.
@ -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