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

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 11 15:54:59 PST 2017


davidxl added inline comments.


================
Comment at: lib/Analysis/ProfileSummaryInfo.cpp:163
+    return isHotCount(TotalCount);
+  return BFI && isHotBB(CallInst->getParent(), BFI);
+}
----------------
eraman wrote:
> 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. 
This is not good for instrumentation based PGO. 
1) meta data is not updated during cloning so it can get wrong for instrumentation based pgo
2) it is slightly slower for instrumentation based PGO.

In fact, we should probably never need to check weight data for instPGO.


https://reviews.llvm.org/D28584





More information about the llvm-commits mailing list