diff options
author | Easwaran Raman <eraman@google.com> | 2018-01-17 22:24:23 +0000 |
---|---|---|
committer | Easwaran Raman <eraman@google.com> | 2018-01-17 22:24:23 +0000 |
commit | e5b8de2f1f4b785fe4105c74aa055e9319ebd9ac (patch) | |
tree | 735025f7c1b406cf0db165a0255412cc40de212c /llvm/lib/Analysis/ProfileSummaryInfo.cpp | |
parent | d109b5e0273565d3af272d8c3660a4ce233f6494 (diff) | |
download | bcm5719-llvm-e5b8de2f1f4b785fe4105c74aa055e9319ebd9ac.tar.gz bcm5719-llvm-e5b8de2f1f4b785fe4105c74aa055e9319ebd9ac.zip |
Add a ProfileCount class to represent entry counts.
Summary:
The class wraps a uint64_t and an enum to represent the type of profile
count (real and synthetic) with some helper methods.
Reviewers: davidxl
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D41883
llvm-svn: 322771
Diffstat (limited to 'llvm/lib/Analysis/ProfileSummaryInfo.cpp')
-rw-r--r-- | llvm/lib/Analysis/ProfileSummaryInfo.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/ProfileSummaryInfo.cpp b/llvm/lib/Analysis/ProfileSummaryInfo.cpp index 347d093b0f6..61c9411b2c4 100644 --- a/llvm/lib/Analysis/ProfileSummaryInfo.cpp +++ b/llvm/lib/Analysis/ProfileSummaryInfo.cpp @@ -112,7 +112,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 && isHotCount(FunctionCount.getValue()); + return FunctionCount && isHotCount(FunctionCount.getCount()); } /// Returns true if the function contains hot code. This can include a hot @@ -125,7 +125,7 @@ bool ProfileSummaryInfo::isFunctionHotInCallGraph(const Function *F, if (!F || !computeSummary()) return false; if (auto FunctionCount = F->getEntryCount()) - if (isHotCount(FunctionCount.getValue())) + if (isHotCount(FunctionCount.getCount())) return true; if (hasSampleProfile()) { @@ -154,7 +154,7 @@ bool ProfileSummaryInfo::isFunctionColdInCallGraph(const Function *F, if (!F || !computeSummary()) return false; if (auto FunctionCount = F->getEntryCount()) - if (!isColdCount(FunctionCount.getValue())) + if (!isColdCount(FunctionCount.getCount())) return false; if (hasSampleProfile()) { @@ -187,7 +187,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 && isColdCount(FunctionCount.getValue()); + return FunctionCount && isColdCount(FunctionCount.getCount()); } /// Compute the hot and cold thresholds. |