BTB (Branch target buffer)
BTAC can be extended to implement branch folding: not only the branch target address is stored but also the target instruction itself and possibly a few of its successor instructions. Such a cache is called branch target cache (BTC) or branch target buffer (BTB).
The BTB may have two advantages:
- The instruction is fetched from the BTB instead of memory ? more time can be used for searching a match within the BTB; this allows a larger BTB.
- When the target instruction of the jump (or branch) is in BTB, it is fed into the ID stage of the pipeline replacing the jump (or branch) instruction itself.