|Non-Confidential||PDF version||ARM 100400_0001_03_en|
|Home > Determinism Support > Branch prediction|
Branch prediction uses both static and dynamic techniques. Dynamic branch prediction is used by default. But when there is no information history, static prediction is used instead.
Branch prediction predicts:
The type of the branch:
Unconditional or conditional.
The static branch prediction is based on decoding the instruction. Therefore, it can see branches on fresh code, without any history, but the prediction is done only at the decoding stage, so no fetch decision can be made before this stage, that is, speculative fetches from the branch target cannot be made.
The dynamic branch prediction estimates the instructions based on history, so that it can fetch speculatively to an arbitrary chosen branch of the execution code. More hardware is required, but it saves some unnecessary i-cache lookup/memory accesses, and the prediction quality is higher for previously seen branches.
By default, the dynamic branch prediction is used and, if there is no information in its history, the static prediction is used instead.