By: Jukka Larja (roskakori2006.delete@this.gmail.com), June 5, 2022 10:18 pm
Room: Moderated Discussions
--- (---.delete@this.redheron.com) on June 5, 2022 6:12 pm wrote:
>
> - predicates/CMOV/CSEL. I have zero interest in relitigating this for the n'th time, I'll
> just state that if you want to avoid many *difficult to predict* branches, this is one technology
> to do so; and if one is upset about the cases where this is a bad technology choice because
> of lengthening the critical path, then the place to complain/fix it is in the compiler (*difficult
> to predict* branches!!!) not in saying that they should not be used.
Is there actually any reason to believe compiler could do this in near future? Personally, I can point to huge amount of easy to predict branches in my code, but pretty much everything else I have no idea. So it's hard for me to see how a compiler could know, but maybe there's something I'm missing.
There's PGO of course, but that really only works for interpreted or jitted languages.
-JLarja
>
> - predicates/CMOV/CSEL. I have zero interest in relitigating this for the n'th time, I'll
> just state that if you want to avoid many *difficult to predict* branches, this is one technology
> to do so; and if one is upset about the cases where this is a bad technology choice because
> of lengthening the critical path, then the place to complain/fix it is in the compiler (*difficult
> to predict* branches!!!) not in saying that they should not be used.
Is there actually any reason to believe compiler could do this in near future? Personally, I can point to huge amount of easy to predict branches in my code, but pretty much everything else I have no idea. So it's hard for me to see how a compiler could know, but maybe there's something I'm missing.
There's PGO of course, but that really only works for interpreted or jitted languages.
-JLarja