summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/ProfileSummaryInfo.cpp
diff options
context:
space:
mode:
authorDehao Chen <dehao@google.com>2016-10-11 05:19:00 +0000
committerDehao Chen <dehao@google.com>2016-10-11 05:19:00 +0000
commitc87bc79d909bf171fb77d9479e14f27ab761b7a8 (patch)
treee17b45b625863a31c23c22e450cfecb3f9f29bfe /llvm/lib/Analysis/ProfileSummaryInfo.cpp
parente67fc4a32838ea9020d0a67e9873a1a45889adb3 (diff)
downloadbcm5719-llvm-c87bc79d909bf171fb77d9479e14f27ab761b7a8.tar.gz
bcm5719-llvm-c87bc79d909bf171fb77d9479e14f27ab761b7a8.zip
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 llvm-svn: 283852
Diffstat (limited to 'llvm/lib/Analysis/ProfileSummaryInfo.cpp')
-rw-r--r--llvm/lib/Analysis/ProfileSummaryInfo.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/Analysis/ProfileSummaryInfo.cpp b/llvm/lib/Analysis/ProfileSummaryInfo.cpp
index 289c1b21069..af16fe63884 100644
--- a/llvm/lib/Analysis/ProfileSummaryInfo.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud