Branch Predictor

1.BHT (too much hardware)

every branch has a private counter(SN WN WT ST)    [N bit]  [counter0] [counter1] [counter2].....[counter 2^N]

2.G-Share (good for if()...if()...)

use global branch result to index a counter [g] [counter0] [counter1]

3.P-Share (good for for(...)...)

XOR the pc bit and the BHT to index a counter [pc bits] ^ [BHT] ---> counter

4.Combine G-share and P-share

你可能感兴趣的:(Branch Predictor)