diff options
author | Nathan Slingerland <slingn@gmail.com> | 2015-12-16 21:45:43 +0000 |
---|---|---|
committer | Nathan Slingerland <slingn@gmail.com> | 2015-12-16 21:45:43 +0000 |
commit | 48dd080c77c6a6398906b6db73d015fee15d8591 (patch) | |
tree | 4ecca36c8ea7d92f85c74274579a16d277b75e13 /llvm/lib/ProfileData/SampleProf.cpp | |
parent | 031bed291ee7feccd2272efac2f7fce98c8353de (diff) | |
download | bcm5719-llvm-48dd080c77c6a6398906b6db73d015fee15d8591.tar.gz bcm5719-llvm-48dd080c77c6a6398906b6db73d015fee15d8591.zip |
[PGO] Handle and report overflow during profile merge for all types of data
Summary: Surface counter overflow when merging profile data. Merging still occurs on overflow but counts saturate to the maximum representable value. Overflow is reported to the user.
Reviewers: davidxl, dnovillo, silvas
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D15547
llvm-svn: 255825
Diffstat (limited to 'llvm/lib/ProfileData/SampleProf.cpp')
-rw-r--r-- | llvm/lib/ProfileData/SampleProf.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/ProfileData/SampleProf.cpp b/llvm/lib/ProfileData/SampleProf.cpp index 1b76367f4de..9ded757f2b2 100644 --- a/llvm/lib/ProfileData/SampleProf.cpp +++ b/llvm/lib/ProfileData/SampleProf.cpp @@ -45,6 +45,8 @@ class SampleProfErrorCategoryType : public std::error_category { return "Truncated function name table"; case sampleprof_error::not_implemented: return "Unimplemented feature"; + case sampleprof_error::counter_overflow: + return "Counter overflow"; } llvm_unreachable("A value of sampleprof_error has no message."); } |