r261045 - Teach clang to use the ThinLTO pipeline

Mehdi Amini via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 16 16:42:20 PST 2016


Author: mehdi_amini
Date: Tue Feb 16 18:42:20 2016
New Revision: 261045

URL: http://llvm.org/viewvc/llvm-project?rev=261045&view=rev
Log:
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 <mehdi.amini at apple.com>

Modified:
    cfe/trunk/lib/CodeGen/BackendUtil.cpp

Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/BackendUtil.cpp?rev=261045&r1=261044&r2=261045&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/BackendUtil.cpp (original)
+++ cfe/trunk/lib/CodeGen/BackendUtil.cpp Tue Feb 16 18:42:20 2016
@@ -324,6 +324,7 @@ void EmitAssemblyHelper::CreatePasses(Fu
   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(Fu
   // pipeline and pass down the in-memory function index.
   if (FunctionIndex) {
     PMBuilder.FunctionIndex = FunctionIndex;
-    PMBuilder.populateLTOPassManager(*MPM);
+    PMBuilder.populateThinLTOPassManager(*MPM);
     return;
   }
 




More information about the cfe-commits mailing list