Branch target predictor
In computer architecture, a branch target predictor is the part of a processor that predicts the target, i.e., the address of the instruction that is executed next, of a taken conditional branch or unconditional branch instruction before the target of the branch instruction is computed by the execution unit of the processor.
Branch target prediction is not the same as branch prediction, which guesses whether a conditional branch will be taken or not-taken in a binary manner.
In more parallel processor designs, as the instruction cache latency grows longer and the fetch width grows wider, branch target extraction becomes a bottleneck. The recurrence is:
- Instruction cache fetches block of instructions
- Instructions in block are scanned to identify branches
- First predicted taken branch is identified
- Target of that branch is computed
- Instruction fetch restarts at branch target
This predictor reduces the recurrence above to:
- Hash the address of the first instruction in a run
- Fetch the prediction for the addresses of the targets of branches in that run of instructions
- Select the address corresponding to the branch predicted taken