[PATCH] D25048: Tune isHotFunction/isColdFunction
Dehao Chen via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 10 14:57:36 PDT 2016
danielcdh updated this revision to Diff 74178.
danielcdh added a comment.
rebase
https://reviews.llvm.org/D25048
Files:
lib/Analysis/ProfileSummaryInfo.cpp
Index: lib/Analysis/ProfileSummaryInfo.cpp
===================================================================
--- lib/Analysis/ProfileSummaryInfo.cpp
+++ lib/Analysis/ProfileSummaryInfo.cpp
@@ -74,9 +74,7 @@
// 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 @@
// 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25048.74178.patch
Type: text/x-patch
Size: 1153 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161010/9594e2ca/attachment.bin>
More information about the llvm-commits
mailing list