diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-04-16 10:58:38 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-04-16 10:58:38 +0000 |
commit | 4d2e9d9a1c213db144785f386ce661914d17afb6 (patch) | |
tree | 2c4cd08e1519218a2f1d0bdcde649cd445a288a7 /tools/lto/LTOCodeGenerator.cpp | |
parent | 16295fc20b68f9a9318cada4e4d96e964b1cdd7e (diff) | |
download | llvm-4d2e9d9a1c213db144785f386ce661914d17afb6.tar.gz |
Remove lto_codegen_set_whole_program_optimization. It is a work in progress,
so we don't want it to show up in the stable 3.1 interface.
While at it, add a comment about why LTOCodeGenerator manually creates the
internalize pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154807 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lto/LTOCodeGenerator.cpp')
-rw-r--r-- | tools/lto/LTOCodeGenerator.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp index 77c06a655b18..6382a3f219e6 100644 --- a/tools/lto/LTOCodeGenerator.cpp +++ b/tools/lto/LTOCodeGenerator.cpp @@ -64,7 +64,7 @@ LTOCodeGenerator::LTOCodeGenerator() : _context(getGlobalContext()), _linker("LinkTimeOptimizer", "ld-temp.o", _context), _target(NULL), _emitDwarfDebugInfo(false), _scopeRestrictionsDone(false), - _runInternalizePass(false), _codeModel(LTO_CODEGEN_PIC_MODEL_DYNAMIC), + _codeModel(LTO_CODEGEN_PIC_MODEL_DYNAMIC), _nativeObjectFile(NULL) { InitializeAllTargets(); InitializeAllTargetMCs(); @@ -355,8 +355,10 @@ bool LTOCodeGenerator::generateObjectFile(raw_ostream &out, // Add an appropriate TargetData instance for this module... passes.add(new TargetData(*_target->getTargetData())); - PassManagerBuilder().populateLTOPassManager(passes, - _runInternalizePass, + // Enabling internalize here would use its AllButMain variant. It + // keeps only main if it exists and does nothing for libraries. Instead + // we create the pass ourselves with the symbol list provided by the linker. + PassManagerBuilder().populateLTOPassManager(passes, /*Internalize=*/false, !DisableInline, DisableGVNLoadPRE); |