[ThinLTO] Use correct pipeline for ThinLTO in gold-plugin.

This change is the gold side of the change made in D17115 and clang
patch r261045 to add a ThinLTO specific pipeline that moves more of
the optimization to the backends.

llvm-svn: 269386
This commit is contained in:
Teresa Johnson 2016-05-13 01:25:31 +00:00
parent fdacb5c056
commit 532e33be42
1 changed files with 4 additions and 1 deletions

View File

@ -970,7 +970,10 @@ void CodeGen::runLTOPasses() {
PMB.SLPVectorize = true;
PMB.OptLevel = options::OptLevel;
PMB.ModuleSummary = CombinedIndex;
PMB.populateLTOPassManager(passes);
if (options::thinlto)
PMB.populateThinLTOPassManager(passes);
else
PMB.populateLTOPassManager(passes);
passes.run(*M);
}