Skip to content
Snippets Groups Projects
Commit 921cbd36 authored by Mehdi Amini's avatar Mehdi Amini
Browse files

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@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261045 91177308-0d34-0410-b5e6-96231b3b80d8
parent 67ebdeb4
No related branches found
No related tags found
No related merge requests found
...@@ -324,6 +324,7 @@ void EmitAssemblyHelper::CreatePasses(FunctionInfoIndex *FunctionIndex) { ...@@ -324,6 +324,7 @@ void EmitAssemblyHelper::CreatePasses(FunctionInfoIndex *FunctionIndex) {
PMBuilder.DisableUnitAtATime = !CodeGenOpts.UnitAtATime; PMBuilder.DisableUnitAtATime = !CodeGenOpts.UnitAtATime;
PMBuilder.DisableUnrollLoops = !CodeGenOpts.UnrollLoops; PMBuilder.DisableUnrollLoops = !CodeGenOpts.UnrollLoops;
PMBuilder.MergeFunctions = CodeGenOpts.MergeFunctions; PMBuilder.MergeFunctions = CodeGenOpts.MergeFunctions;
PMBuilder.PrepareForThinLTO = CodeGenOpts.EmitFunctionSummary;
PMBuilder.PrepareForLTO = CodeGenOpts.PrepareForLTO; PMBuilder.PrepareForLTO = CodeGenOpts.PrepareForLTO;
PMBuilder.RerollLoops = CodeGenOpts.RerollLoops; PMBuilder.RerollLoops = CodeGenOpts.RerollLoops;
...@@ -333,7 +334,7 @@ void EmitAssemblyHelper::CreatePasses(FunctionInfoIndex *FunctionIndex) { ...@@ -333,7 +334,7 @@ void EmitAssemblyHelper::CreatePasses(FunctionInfoIndex *FunctionIndex) {
// pipeline and pass down the in-memory function index. // pipeline and pass down the in-memory function index.
if (FunctionIndex) { if (FunctionIndex) {
PMBuilder.FunctionIndex = FunctionIndex; PMBuilder.FunctionIndex = FunctionIndex;
PMBuilder.populateLTOPassManager(*MPM); PMBuilder.populateThinLTOPassManager(*MPM);
return; return;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment