By: Anon4 (anon.delete@this.example.com), August 25, 2022 11:45 am
Room: Moderated Discussions
Brendan (btrotter.delete@this.gmail.com) on August 25, 2022 7:54 am wrote:
> Is it possible for a good and useful program to exist without at least one branch?
It depends on how you define branch. On a completely predicated architecture like 32 bit ARM it's possible to do if-conversion to turn branches in to predicated execution then effectively unroll and in-line everything else.
I was once involved with a piece of avionics software running as part of a 3 way voting system and one of the implementations did exactly the above ran for 30 million instructions out of reset with no branches to produce the output then reset the processor to run again.
> Is it possible for a good and useful program to exist without at least one branch?
It depends on how you define branch. On a completely predicated architecture like 32 bit ARM it's possible to do if-conversion to turn branches in to predicated execution then effectively unroll and in-line everything else.
I was once involved with a piece of avionics software running as part of a 3 way voting system and one of the implementations did exactly the above ran for 30 million instructions out of reset with no branches to produce the output then reset the processor to run again.