Add a hook to turn on the internalize pass through the LTO interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154306 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling
2012-04-09 05:26:48 +00:00
parent ae1bec52f7
commit 3029a0c56a
5 changed files with 19 additions and 4 deletions

View File

@@ -67,7 +67,7 @@ LTOCodeGenerator::LTOCodeGenerator()
: _context(getGlobalContext()),
_linker("LinkTimeOptimizer", "ld-temp.o", _context), _target(NULL),
_emitDwarfDebugInfo(false), _scopeRestrictionsDone(false),
_codeModel(LTO_CODEGEN_PIC_MODEL_DYNAMIC),
_runInternalizePass(false), _codeModel(LTO_CODEGEN_PIC_MODEL_DYNAMIC),
_nativeObjectFile(NULL) {
InitializeAllTargets();
InitializeAllTargetMCs();
@@ -366,7 +366,8 @@ bool LTOCodeGenerator::generateObjectFile(raw_ostream &out,
// Add an appropriate TargetData instance for this module...
passes.add(new TargetData(*_target->getTargetData()));
PassManagerBuilder().populateLTOPassManager(passes, /*Internalize=*/ false,
PassManagerBuilder().populateLTOPassManager(passes,
_runInternalizePass,
!DisableInline,
DisableGVNLoadPRE);