summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ProfileData/SampleProf.cpp
diff options
context:
space:
mode:
authorNathan Slingerland <slingn@gmail.com>2015-12-16 21:45:43 +0000
committerNathan Slingerland <slingn@gmail.com>2015-12-16 21:45:43 +0000
commit48dd080c77c6a6398906b6db73d015fee15d8591 (patch)
tree4ecca36c8ea7d92f85c74274579a16d277b75e13 /llvm/lib/ProfileData/SampleProf.cpp
parent031bed291ee7feccd2272efac2f7fce98c8353de (diff)
downloadbcm5719-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.cpp2
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.");
}
OpenPOWER on IntegriCloud