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.
Details
Diff Detail
Event Timeline
include/llvm/ProfileData/SampleProf.h | ||
---|---|---|
306 | May be introducing a macro for the repeated patterns: #define SET_RESULT(R, FinalR) \ if (R != ....) \ FinalR = R; |
Updated for davidxl, dnovillo feedback.
include/llvm/ProfileData/SampleProf.h | ||
---|---|---|
306 | Went with inline function implementation as discussed on llvm-commits. |
Nit: how about UpdateResult -- it seems a better name.