[PATCH] D134456: [PGO] Consider parent context when weighing branches with likelyhood.
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 26 05:19:34 PDT 2022
aaron.ballman added a comment.
In D134456#3814628 <https://reviews.llvm.org/D134456#3814628>, @AntonBikineev wrote:
>> Do users have some other escape hatch to tell PGO "ignore what you think you know about this branch" so that a user who *wants* PGO to lose has some ability to do that other than "don't use PGO"?
>
> Sounds like we need another proposal for [[always_likely]] :)
No, it sounds like we need a proposal for `[[likely_unless_the_optimizer_decides_otherwise]]` -- the `[[likely]]` attribute was intended for always-likely optimization decisions.
> I understand both pros and cons of PGO having preference. However, whatever solution we stick to, I'd prefer it to be consistent.
I agree that we should be consistent, but there's different ways we can be consistent. Consistent with what the feature paper intended? Consistent with our past decisions? Consistent with how other implementations behave?
What do other implementations that support PGO do? If PGO implementations consistently behave a certain way, that would be interesting to know.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134456/new/
https://reviews.llvm.org/D134456
More information about the cfe-commits
mailing list