[PATCH] D15547: [PGO] Handle and report overflow during profile merge for all types of data

David Li via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 15 16:35:35 PST 2015


davidxl added inline comments.

================
Comment at: include/llvm/ProfileData/SampleProf.h:299
@@ +298,3 @@
+        addTotalSamples(Other.getTotalSamples(), Weight);
+    if (AddTotalSamplesResult != sampleprof_error::success)
+      Result = AddTotalSamplesResult;
----------------
May be introducing a macro for the repeated patterns:

#define SET_RESULT(R, FinalR) \
  if (R != ....) \
     FinalR = R;




http://reviews.llvm.org/D15547





More information about the llvm-commits mailing list