prophet/critic hybrid branch prediction falcon, stark, ramirez, lai, valero presenter: christian...
Post on 21-Dec-2015
215 Views
Preview:
TRANSCRIPT
Prophet/Critic Hybrid Branch Prediction
Falcon, Stark, Ramirez, Lai, ValeroPresenter: Christian Wanamaker
Outline
Overview & MotivationHybrid Branch PredictionThe Prophet/Critic Branch PredictorResultsConclusions
Overview
Better Branch Prediction is a highly desirable technique because it does not require trade-offs between performance, power, and energy
Despite much research on Branch Prediction, it is by no means solved
Branch prediction is liable to become even more important as pipelines deepen and issue-widths increase
Overview (continued)
Issue width = # of uOps (micro ops) issued per clock cycle
Using the Branch Target Buffer to look ahead for branches
Perceptrons – simple neural network. Can look at a longer history than simpler counters.
Hybrid Branch Predictors
• Use two or more different branch prediction techniques
• One may override another (either based on a third selector or one may always override)
• The predictions may be combined, for instance as a majority vote
• Example: Tournament predictors (often a branch prediction buffer and a Correlating branch predictor with a third predictor choosing which of the two is used in this situation)
Prophet/Critic Branch Predictor
Basic Idea – the Prophet makes a series of predictions of future branches, the Critic critiques and if necessary alters them.
The Prophet makes predictions based on the history of the branch.
The Critic looks at the branches prediction of the Prophet after the prophet has predicted a certain number of steps ahead, then critiques the prophecy
Prophet Critic Basics
BTB looks ahead, Prophet predicts whether BTB branches are taken/not taken
Branch Outcome Register – the predictions that are in the critics “future” - the number of future bits allowed.
More future bits allow for more accurate viewing of the future
Prophet Critic Basics
Prophet Critic Basics
The branch predictions are kept in the Fetch Target Queue (FTQ)
Once the future bits are received, the critic makes it’s pronouncement
The critic overrides the prophet if it comes to a different conclusion
If so, the FTQ is purged of un-critiqued predictions, and the prophet is redirected to the path shown by the critic
Prophet/Critic Architecture (cont)
Prophet/Critic: How it works
Prophet Critic: How it works
The Prophet will mispredict AThe Critic will note that the Prophet
mispredicted in this case the first time the misprediction occurs.
In the future, when the Critic sees the misprediction, it will correct it
More future bits increase the accuracy of prediction, but reduce the history, so there is an important tradeoff here.
Prophet/Critic Filtering
The critic can be limited by multiple branches contending for the same resources
In addition, the critic is not always correctSo, easy to predict branches should be
filtered outThis is achieved with tags that are set when a
mispredict occcursIf not tagged, the critic’s critique is ignored.
Prophet/Critic Filtering
Testing and Result Testing was done on a cycle
accurate IA32 with Long Instruction Traces
The simulator had to follow bad branches, as otherwise the critic would not learn.
Branch Predictors: Gshare, 2bc-gskew, perceptron
uPC is uOps per cycle misp/kuops is misses per
thousand uops
Hardware Budgets and predictor types
Results of varying Future Bits
Results
Results
Results
Conclusions
Speedup of up to 8% with 12 future bits (using the same amount of branch prediction space)
The mispredict rate can be reduced up to 25-31%
Adding future bits helps, but more is not always better
Research suggests that the best future bits can be chosen dynamically
Thank you
Any questions?
top related