[PATCH] D28584: Add is{Hot|Cold}CallSite and an unit test to ProfileSummaryInfo

Easwaran Raman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 11 15:49:24 PST 2017


eraman added inline comments.


================
Comment at: lib/Analysis/ProfileSummaryInfo.cpp:140
+  auto *TI = B->getTerminator();
+  if (isa<ReturnInst>(TI))
+    return false;
----------------
davidxl wrote:
> is this a separate fix?
yes, that part was never exercised before.  


================
Comment at: lib/Analysis/ProfileSummaryInfo.cpp:163
+    return isHotCount(TotalCount);
+  return BFI && isHotBB(CallInst->getParent(), BFI);
+}
----------------
davidxl wrote:
> should the order of check swapped? BFI check first and then meta data ?
I discussed this with Dehao and he said it is possible that block's hotness got messed up in the upward direction (higher than what it should be) in sample profiling. If there is annotation, it is better to treat it as the ground truth. 


https://reviews.llvm.org/D28584





More information about the llvm-commits mailing list