diff options
author | Dehao Chen <dehao@google.com> | 2016-10-11 05:19:00 +0000 |
---|---|---|
committer | Dehao Chen <dehao@google.com> | 2016-10-11 05:19:00 +0000 |
commit | 87ba4550c7cd7fd4c76592c167a1a48e081715d5 (patch) | |
tree | 65f90e8d1fbdfd1512aa47aeeb3ca639dc1b2c6b /lib/Analysis/ProfileSummaryInfo.cpp | |
parent | ddd1430cb064bc65c3fc59ae283a3a6b7ef5d4b7 (diff) |
Tune isHotFunction/isColdFunction
Summary: This patch sets function as hot if function's entry count is hot/cold.
Reviewers: eraman, davidxl
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D25048
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283852 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ProfileSummaryInfo.cpp')
-rw-r--r-- | lib/Analysis/ProfileSummaryInfo.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/Analysis/ProfileSummaryInfo.cpp b/lib/Analysis/ProfileSummaryInfo.cpp index 289c1b21069..af16fe63884 100644 --- a/lib/Analysis/ProfileSummaryInfo.cpp +++ b/lib/Analysis/ProfileSummaryInfo.cpp @@ -74,9 +74,7 @@ bool ProfileSummaryInfo::isFunctionEntryHot(const Function *F) { // FIXME: The heuristic used below for determining hotness is based on // preliminary SPEC tuning for inliner. This will eventually be a // convenience method that calls isHotCount. - return (FunctionCount && - FunctionCount.getValue() >= - (uint64_t)(0.3 * (double)Summary->getMaxFunctionCount())); + return FunctionCount && isHotCount(FunctionCount.getValue()); } /// Returns true if the function's entry is a cold. If it returns false, it @@ -95,9 +93,7 @@ bool ProfileSummaryInfo::isFunctionEntryCold(const Function *F) { // FIXME: The heuristic used below for determining coldness is based on // preliminary SPEC tuning for inliner. This will eventually be a // convenience method that calls isHotCount. - return (FunctionCount && - FunctionCount.getValue() <= - (uint64_t)(0.01 * (double)Summary->getMaxFunctionCount())); + return FunctionCount && isColdCount(FunctionCount.getValue()); } /// Compute the hot and cold thresholds. |