An interesting thing about Yeh and Patt's 3 implementation of two-level adaptive branch prediction is that it does not include GAp. PAg and PAp examines more on self-history. Although the global pattern history table has some global feature, how it helps our branch direction decision making is vague. Actuallly PHT contamination is a problm we have to overcome by increasing the length of the BHR.

Pan, So and Rahmeh's paper describes GAp based on the observation of branch correlation. It is resonable and the performance should be better than GAg.

According to Yeh and Patt's paper, the performance of PAp is better than that of PAg. But the hw cost of PAp is higher than that of PAg. What is the result when GAp is compared to PAg? PAg(BHT(512, 4, 6sr), PHT(64, A2)) cost 512*6+64*2=3K+128 bits for the tabels. 96% correct rate for dod. GAp (8,2) scheme costs 8Kbits and get around 95% correct rate. The storage required by GAp is higher than that of PAg and the performance is worse. But the hw logic of PAg is more complex than that of GAp.

For self-history based banches, what will happen when we use GAp? Maybe we will have to increase the length of the global branch hitory register. Seems self-history is difficult to be kept by GAp.

For hybrid method, Chang, Hao and Patt shows that the combination of gshare and PA is better. Maybe the combination of PAg and GAp will works even better. But cost will increase. Is it possible to identify the feature of the branches and analysis the code to give a better choise of predictors?

Shaojie Wang