Dynamic branch prediction
Execution of a branch requires knowledge of:
- There is a branch but one can surmise that every instruction is a branch for the purpose of guessing whether it will be taken or not taken (i.e., prediction can be done at IF stage)
- Whether the branch is Taken/Not-Taken (hence a branch prediction mechanism)
- If the branch is taken what is the target address (can be computed but can also be “precomputed”, i.e., stored in some table)
- If the branch is taken what is the instruction at the branch target address (saves the fetch cycle for that instruction)