From 532e33be42651cce3426cbdeb53b7a9b2e1a2873 Mon Sep 17 00:00:00 2001 From: Teresa Johnson Date: Fri, 13 May 2016 01:25:31 +0000 Subject: [PATCH] [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 --- llvm/tools/gold/gold-plugin.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp index 44df9d535ec8..71abb2bff39c 100644 --- a/llvm/tools/gold/gold-plugin.cpp +++ b/llvm/tools/gold/gold-plugin.cpp @@ -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); }