Next: Profiled Hybrid Branch Predictor, Previous: Path Predictor, Up: Path Predictor
The hybrid branch predictor consists of two predictors, gshare and bimodal, and an (effectively) PC-indexed choice table. At predict time both the gshare and bimodal predictors provide predictions, the entry in the choice table, a c-bit saturating counter, determines which one to use. At update time both predictors are updated. The choice table entry is modified if the two predictors differ, incremented if gshare was correct and decremented if bimodal was correct.
The hybrid predictor is significantly more accurate than gshare for a given amount of global history (GHR size).
The size of the choice table counter is controlled by a compiled-in
variable bp_hybrid_counter_bits
in file
pp_multiple_block.cc.
The GHR and PHT sizes are set using bp_size_lg
. The choice
table entries are kept with other block information, so choice table
size is effectively controlled by mbp_bac_lg
. See Path Predictor RTIs.