8.3 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 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.

Non-ConfidentialPDF file icon PDF versionARM 100400_0001_03_en
Copyright © 2015–2017 ARM Limited or its affiliates. All rights reserved.