OSDN Git Service

Adjust the hotness threshold from 99.9% to 99%.
authorDehao Chen <dehao@google.com>
Fri, 4 Aug 2017 16:20:54 +0000 (16:20 +0000)
committerDehao Chen <dehao@google.com>
Fri, 4 Aug 2017 16:20:54 +0000 (16:20 +0000)
commit16768cea344109435653c0d7949090f05f93c3e3
treec4a909409fc29f869112b067f79fa12f03b08274
parent201cf7ea262385275b632689d3ba5ecf97d36679
Adjust the hotness threshold from 99.9% to 99%.

Summary: We originally set the hotness threshold as 99.9% to be consistent with gcc FDO. But because the inline heuristic is different between 2 compilers: llvm uses bottom-up algorithm while gcc uses priority based. The LLVM algorithm tends to inline too much early that prevents hot callsites from further inlined into its caller. Due to this restriction, we think it is reasonable to lower the hotness threshold to give priority to those that are really hot. Our experiments show that this change would improve performance on large applications. Note that the inline heuristic has great room for further tuning. Once the inline heuristics are refined, we could adjust this threshold to allow inlining for less hot callsites.

Reviewers: davidxl, tejohnson, eraman

Reviewed By: tejohnson

Subscribers: sanjoy, llvm-commits

Differential Revision: https://reviews.llvm.org/D36317

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310065 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ProfileSummaryInfo.cpp