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

Nathan Slingerland via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 16 10:31:39 PST 2015


slingn added inline comments.

================
Comment at: include/llvm/ProfileData/SampleProf.h:299
@@ +298,3 @@
+        addTotalSamples(Other.getTotalSamples(), Weight);
+    if (AddTotalSamplesResult != sampleprof_error::success)
+      Result = AddTotalSamplesResult;
----------------
davidxl wrote:
> May be introducing a macro for the repeated patterns:
> 
> #define SET_RESULT(R, FinalR) \
>   if (R != ....) \
>      FinalR = R;
> 
> 
Went with inline function implementation as discussed on llvm-commits.


http://reviews.llvm.org/D15547





More information about the llvm-commits mailing list