[PATCH] D26370: Use max(BFI_Count, TotalProfCount) to get block's profile count.

David Li via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 8 15:56:51 PST 2016


davidxl added inline comments.


================
Comment at: lib/Analysis/BlockFrequencyInfo.cpp:155
 Optional<uint64_t>
 BlockFrequencyInfo::getBlockProfileCount(const BasicBlock *BB) const {
   if (!BFI)
----------------
This does not look like the right place for the adjustment. Maybe provide a wrapper method in ProfileSummaryInfo::getBlockProfileCount ..

Besides, the adjustment does not work well for Instrumentation based PGO -- the branch weight may be scaled (though since it scales down, it does not matter in reality).


https://reviews.llvm.org/D26370





More information about the llvm-commits mailing list