Choice Predictor for Free. Mongkol Ekpanyapong Pinar Korkmaz Hsien - Hsin S . Lee School of Electrical and Computer Engineering Georgia Institute of Technology Atlanta, GA 30332 Presented by Dr. Youfeng Wu Intel Corportaion. Static Branch Prediction Predict at compile time
Hsien-Hsin S. Lee
School of Electrical and Computer Engineering
Georgia Institute of Technology
Atlanta, GA 30332
Dr. Youfeng Wu
Predict at compile time
Based on inst. type or profilings
Work well on easy-to predict branch such as for-loop
Dynamic Branch Prediction
Predict at run time
Using hardware to track run-time behavior
Require more die area and power dissipationBranch Prediction Schemes
Counter > 1 :: hit
Counter <= 1 :: miss
0Global Branch Predictor
Pattern History Table (PHT)
Branch History Register (BHR)
(Shift left when update)
. . . . .
for i = 0 to 100000
a: if(i>0) …..
b: if(i%2 == 0) …..
If biased branch (more than 90%hit rate) then favor bimodal
CLP=# consecutive taken and not taken for a given branch address
E.g. branch pattern = 111100000101010 then CLP= 3 + 4 = 7
CGP=# consecutive taken and not taken of k-history group for a given branch address
E.g. Suppose k =2 and branch history is as follows:
101000001111 for the 00 group, 11111111110 for the 01 group,
1110 for the 10 group, and 1000000 for the 11 group
Then CGP = 7 + 9 +2 +5 = 22.
If CLP>CGPthen favor bimodal branch predictor
Else favor global branch predictor