[clang] Bfi precision (PR #66285)

Duncan P. N. Exon Smith via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 26 12:12:12 PDT 2023


dexonsmith wrote:

> Seems this got introduced in https://reviews.llvm.org/D34312 with the rough idea that we shouldn't inline into parts of the code that `_builtin_expect(...)` deems unlikely. Which makes sense when you express it like this, but I guess numeric thresholds can go wrong...

Heh, yeah, the premise seems correct, but a percentage-based numeric threshold doesn't seem right. You kind of want a flag for the block. Or a special value, like "freq=0", which indicates "annotation says this is cold".

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


More information about the cfe-commits mailing list