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/Transforms/Instrumentation | |
| 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/Transforms/Instrumentation')
| -rw-r--r-- | llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp b/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp index cb4b3a9c254..ab3619ecef0 100644 --- a/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp +++ b/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp @@ -119,6 +119,7 @@ #include <vector> using namespace llvm; +using ProfileCount = Function::ProfileCount; #define DEBUG_TYPE "pgo-instrumentation" @@ -1139,7 +1140,7 @@ void PGOUseFunc::populateCounters() { } #endif uint64_t FuncEntryCount = getBBInfo(&*F.begin()).CountValue; - F.setEntryCount(FuncEntryCount); + F.setEntryCount(ProfileCount(FuncEntryCount, Function::PCT_Real)); uint64_t FuncMaxCount = FuncEntryCount; for (auto &BB : F) { auto BI = findBBInfo(&BB); |

