Abstract:
In this paper,we study the relationship between predict accuracy and branch history length in dynamic branch predictor,and found that different branch instruction will achieve optimal prediction accuracy with different history length.Thus,we propose a branch prediction strategy,which adapts the branch history length for each branch instruction to achieve high prediction accuracy in total.This approach monitors branch misprediction rate,and dynamically changes the branch history length when the misprediction rate higher than a threshold,this approach can avoid some critical branch alias during the program's execution,leading the predictor to achieve the optimal prediction accuracy.The experimental results show that,in comparison Gshare,this method achieved 15.8% reduction in misprediction rate,while in comparison with Bi-mode,10.3%reduction in mispredition rate was achieved.