[PATCH] D158668: RFC: Add getLikelyBranchWeight helper function
Matthias Braun via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 23 16:38:42 PDT 2023
MatzeB added a comment.
> I'd also posit, that maybe since we're changing this we should reevaluate the numbers we use as defaults.
Heh, same here. Internally we have a handful of functions that end up using `[[likely]]` loop conditions in a triple-nested loops leading to the estimated block frequencies going through the roof and unjustly dominating everything else in the program... Though admittedly I am not decided yet whether I want to blame the 2000:1 ratio or rather the programmers for using the annotation too freely.
There is also a disconnect with the GCC documentation saying `__attribute__((expected))` corresponding to a 99:1 ratio.
Anyway we probably need a separate/patch discussion to not derail this diff too much...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158668/new/
https://reviews.llvm.org/D158668
More information about the cfe-commits
mailing list