diff options
author | Dehao Chen <dehao@google.com> | 2017-03-21 19:55:36 +0000 |
---|---|---|
committer | Dehao Chen <dehao@google.com> | 2017-03-21 19:55:36 +0000 |
commit | 287fe256411e5506aaf927596b387fc927a33372 (patch) | |
tree | 5b64a48be0520c71c923097aa492776010789db7 /tools/opt | |
parent | 700f6ad1423e78936c8250a4e18fe8aeb0f75927 (diff) |
Do not inline hot callsites for samplepgo in thinlto compile phase.
Summary: Because SamplePGO passes will be invoked twice in ThinLTO build: once at compile phase, the other at backend. We want to make sure the IR at the 2nd phase matches the hot part in profile, thus we do not want to inline hot callsites in the first phase.
Reviewers: tejohnson, eraman
Reviewed By: tejohnson
Subscribers: mehdi_amini, llvm-commits, Prazek
Differential Revision: https://reviews.llvm.org/D31201
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298428 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/opt')
-rw-r--r-- | tools/opt/opt.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index e61bc915bf8..48eda15bd1e 100644 --- a/tools/opt/opt.cpp +++ b/tools/opt/opt.cpp @@ -268,7 +268,7 @@ static void AddOptimizationPasses(legacy::PassManagerBase &MPM, if (DisableInline) { // No inlining pass } else if (OptLevel > 1) { - Builder.Inliner = createFunctionInliningPass(OptLevel, SizeLevel); + Builder.Inliner = createFunctionInliningPass(OptLevel, SizeLevel, false); } else { Builder.Inliner = createAlwaysInlinerLegacyPass(); } |