[PATCH] D19286: Refine instruction weight annotation algorithm for sample profiler.

Dehao Chen via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 20 16:04:01 PDT 2016


danielcdh added inline comments.

================
Comment at: lib/Transforms/IPO/SampleProfile.cpp:489
@@ -478,1 +488,3 @@
+    const CallInst *CI = dyn_cast<CallInst>(&Inst);
+    if (CI && findCalleeFunctionSamples(*CI)) R = 0;
   }
----------------
davidxl wrote:
> davidxl wrote:
> > move R=0 to newline.
> Since this is the else branch which means R already is zero, why do we need to reset it?  
R is ErrorOr<uint64_t>, so else branch means that R is undefined instead of 0.


http://reviews.llvm.org/D19286





More information about the llvm-commits mailing list