From: Mehdi Amini Date: Wed, 17 Feb 2016 00:42:20 +0000 (+0000) Subject: Teach clang to use the ThinLTO pipeline X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=921cbd36911a92bc99728499c43a6c95d28635fb;p=clang Teach clang to use the ThinLTO pipeline Summary: Use the new pipeline implemented in D17115 Reviewers: tejohnson Subscribers: joker.eph, cfe-commits Differential Revision: http://reviews.llvm.org/D17272 From: Mehdi Amini git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261045 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/BackendUtil.cpp b/lib/CodeGen/BackendUtil.cpp index 032b2961c1..0cb039bb07 100644 --- a/lib/CodeGen/BackendUtil.cpp +++ b/lib/CodeGen/BackendUtil.cpp @@ -324,6 +324,7 @@ void EmitAssemblyHelper::CreatePasses(FunctionInfoIndex *FunctionIndex) { PMBuilder.DisableUnitAtATime = !CodeGenOpts.UnitAtATime; PMBuilder.DisableUnrollLoops = !CodeGenOpts.UnrollLoops; PMBuilder.MergeFunctions = CodeGenOpts.MergeFunctions; + PMBuilder.PrepareForThinLTO = CodeGenOpts.EmitFunctionSummary; PMBuilder.PrepareForLTO = CodeGenOpts.PrepareForLTO; PMBuilder.RerollLoops = CodeGenOpts.RerollLoops; @@ -333,7 +334,7 @@ void EmitAssemblyHelper::CreatePasses(FunctionInfoIndex *FunctionIndex) { // pipeline and pass down the in-memory function index. if (FunctionIndex) { PMBuilder.FunctionIndex = FunctionIndex; - PMBuilder.populateLTOPassManager(*MPM); + PMBuilder.populateThinLTOPassManager(*MPM); return; }