Simple static predictive schemes
Predict branch Not -Taken (easy but not the best scheme)
- If prediction correct no problem
- If prediction incorrect, and this is known during EX cycle, zero out (flush) the pipeline registers of the already (two) fetched instructions following the branch
- With this technique, contribution to CPI due to conditional branches:
0.25 * ( 0.7 * 2 + 0.3 * 0) = 0.35
- The problem is that we are optimizing for the less frequent case!
- Nonetheless it will be the “default” for dynamic branch prediction since it is so easy to implement.