Hi,
Some processors use a static branch prediction. The predicted outcome
of a jump depends on the instruction, i.e. a 16-bit conditional jump
instruction is predicted as taken while a 32-bit instruction with a
forward displacement is predicted as not taken.
If the outcome of a jump would be known in advance, one could use the
appropriate jump instructions to avoid misprediction, thus
accelerating the program execution. I assume that profiling data could
be used for that to figure out the more probable jump behavior.
This idea is probably not new, so I wonder if you know any
compilers/optimizers that apply this technique? Do you have own
experiences or know any papers/reports where any results are
presented?
Regards,
Tim