Static branch prediction
The prediction direction for an individual branch remains always the same!
- the machine cannot dynamically alter the branch prediction (in contrast to dynamic branch prediction which is based on previous branch executions).
So static branch prediction comprises:
- machine-fixed prediction (e.g. always predict taken) and
- compiler-driven prediction.
If the prediction followed the wrong instruction path, then the wrongly fetched instructions must be squashed from the pipeline.