[llvm] Bfi precision (PR #66285)

via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 26 10:01:16 PDT 2023


WenleiHe wrote:

> I found that BlockFrequency saturation happens a lot in practice. Trying an IPGO enabled service here, I saw hundreds of functions hitting the saturation. 

Surprising but good find! EH landing pad is almost guaranteed to increase the spread a lot because neither IRPGO nor CSSPGO bother to instrument it. 

> To make matters worse I noticed the register allocator often multiplies frequencies with instruction costs and for those cases we loose all of these costs because the numbers are already saturated.

I'm wondering if we can do more to catch some of such cases with operator* overloads for BlockFrequency and assertions in it.

> In the current system I rather collapse the lower-end frequencies to 1 than collapsing the higher end frequencies to MAX_UINT64.

+1




https://github.com/llvm/llvm-project/pull/66285


More information about the llvm-commits mailing list