[PATCH] D14893: [llvm-profdata] Change instr prof counter overflow to saturate rather than discard

David Li via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 2 09:59:39 PST 2015


davidxl accepted this revision.
This revision is now accepted and ready to land.

================
Comment at: include/llvm/ProfileData/InstrProf.h:428
@@ +427,3 @@
+    instrprof_error MergeValueResult = mergeValueProfData(Kind, Other);
+    if (Result == instrprof_error::success)
+      Result = MergeValueResult;
----------------
slingn wrote:
> davidxl wrote:
> > Should this be Result != success?
> The idea here was to give the first error to occur priority. But really the ordering of multiple errors during merge isn't critical - or even obviously better either way. So the simpler check wins.
> 
Ah -- I misread the code -- but it indeed was confusing -- the new way is better.


http://reviews.llvm.org/D14893





More information about the llvm-commits mailing list