Generally, with PGO enabled the C++20 likelyhood attributes shall be
dropped assuming the profile has a good coverage. However, currently
this is not the case for the following code:
if (always_false()) [[likely]] { ... }
The patch fixes this and drops the attribute, if the parent context was
executed in the profile. The patch still preserves the attribute, if the
parent context was not executed, e.g. to support the cases when the
profile has insufficient coverage and the programmer's assumption is
correct.
I lean towards implementing the intended behavior reflected in this comment here, which is that PGO data overrides programmer annotations in case of conflict. We should also check the PGO docs to see if this is documented. If we've already made promises about how this is supposed to work, I'd prefer to trust our past decisions rather than revisiting them.