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

Nathan Slingerland via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 2 09:48:17 PST 2015


slingn added inline comments.

================
Comment at: include/llvm/ProfileData/InstrProf.h:428
@@ +427,3 @@
+    instrprof_error MergeValueResult = mergeValueProfData(Kind, Other);
+    if (Result == instrprof_error::success)
+      Result = MergeValueResult;
----------------
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.



http://reviews.llvm.org/D14893





More information about the llvm-commits mailing list