Presentation is loading. Please wait.

Presentation is loading. Please wait.

Value Prediction Kyaw Kyaw, Min Pan Final Project.

Similar presentations


Presentation on theme: "Value Prediction Kyaw Kyaw, Min Pan Final Project."— Presentation transcript:

1 Value Prediction Kyaw Kyaw, Min Pan Final Project

2 What is Value Prediction? Predict the value of instructions before they are executed Branch Prediction – eliminates the control dependences  Value Prediction – eliminates the data dependences

3 Why Value Prediction? Results of many instructions can be accurately predicted before they are issued or executed. Dependent instructions are no longer bound by the serialization constraints imposed by data dependences. More parallelism can be explored

4 Why Value Prediction is possible? Value Locality

5 Why Value Prediction is possible?

6 Causes of Value Locality Data redundancy Error checking Program constants Computed branches …… Virtual function calls Glue code Addressability Memory alias resolution

7 Value Prediction Units Three factors determine the efficacy Accuracy ability to avoid mispredictions Coverage ability to predict as many instruction outcomes as possible Scope The set of instructions that the predictor targets

8 Relationships between factors Accuracy ↔ Coverage trade-off Scope Low implementation cost Achieve better accuracy and coverage Mispredictions for useless predictions are eliminated

9 Value Prediction Units Three types History-Based Predictors Computational Predictors Hybrid Predictors

10 Value Prediction Units

11 Example for Value Prediction Implementation

12 Value Prediction Techniques Last Value Predictor Register Value Predictor Stride 2-delta Predictor Last Four value Predictor Finite Context Method Predictor Confidence Estimation

13 Sample Research Works “Value Locality and Load Value Prediction” M. H. Lipasti, C. B. Wilkerson, J. P. Shen ASPLOS-VII, October 1996 “Selective Value Prediction” B. Calder, G. Reinman, D. M. Tullsen Proceedings of 26 th International Symposium on Computer Architecture, May 1999

14 Value Locality & Prediction Likelihood of a previously-seen value recurring repeatedly within a storage location Exists primarily due to an effective compile-time optimization

15 Load Value Prediction Based on Branch Prediction idea, tries to predict all 32-bit or 64-bit value Load Value Prediction Table ~ branch target buffer Load Classification Table ~ branch history table Constant Verification Unit – to avoid accessing memory and force LVPT entries coherent with main memory

16 Load Value Prediction Unit

17 Results PowerPC 620 = avg. 3% (max 21%) performance gain Alpha 21164 = avg. 6% (max 17%) performance gain

18 Selective Value Prediction Not only on Load instructions but on all important instructions To speculate on operations with large gains and small losses even when confidence is low, and on operations with small gains and large losses when confidence is high To intelligently choose – When to use value prediction Which instructions to use value prediction

19 Confidence Prediction Predicted value is used if the confidence associated with that value is above given threshold. Confidence Saturating Counter – (low, med, high) Confidence History Counter – similar to local branch history

20 Minimizing Capacity Misses To prevent unnecessary replacement in the value prediction table Replacement Counter – increment on correct prediction, decrement otherwise Also decrement when another instruction attempts to use that entry Warn-up Counter – increment only every time an instruction hits in the value table, set to 0 on a replacement Only after the warn-up counter has reached a certain threshold, predictions made, confidence counter updated and VPT allowed to be modified

21 Filtering Producers of Predicted Values To reduce pressure on the prediction table, predict fewer instructions Only allow entries to be allocated to instructions that define registers which are actually used by another instruction in the current instruction window Limit the instructions that are on the critical path to be inserted into VPT

22 Filtering Producers of Predicted Values To reduce pressure on the prediction table, predict fewer instructions Only allow entries to be allocated to instructions that define registers which are actually used by another instruction in the current instruction window Limit the instructions that are on the critical path to be inserted into VPT

23 Finding the Important Consumers Filtering which instructions use a predicted value Use confidence bits (low, med, high) Path Heuristic – use predicted values for instructions that have low confidence but are on the longest path


Download ppt "Value Prediction Kyaw Kyaw, Min Pan Final Project."

Similar presentations


Ads by Google