[PGO] Handle and report overflow during profile merge for all types of data
authorNathan Slingerland <slingn@gmail.com>
Wed, 16 Dec 2015 21:45:43 +0000 (21:45 +0000)
committerNathan Slingerland <slingn@gmail.com>
Wed, 16 Dec 2015 21:45:43 +0000 (21:45 +0000)
commitfd56824d399633fdf67d9a2dd74200076638437e
tree5420cc8c2ed8e2fb5bce1a711ae4b54be69257fd
parent5af13d7042579ef4447b31c8e893df243321a050
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255825 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed:
include/llvm/ProfileData/InstrProf.h
include/llvm/ProfileData/SampleProf.h
lib/ProfileData/SampleProf.cpp
lib/ProfileData/SampleProfReader.cpp
test/tools/llvm-profdata/Inputs/overflow-instr.proftext [new file with mode: 0644]
test/tools/llvm-profdata/Inputs/overflow-sample.proftext [new file with mode: 0644]
test/tools/llvm-profdata/overflow-instr.test [new file with mode: 0644]
test/tools/llvm-profdata/overflow-sample.test [new file with mode: 0644]
test/tools/llvm-profdata/overflow.proftext [deleted file]
tools/llvm-profdata/llvm-profdata.cpp
unittests/ProfileData/InstrProfTest.cpp
unittests/ProfileData/SampleProfTest.cpp