1 / 70

Dependence-Based Value Prediction

Dependence-Based Value Prediction. Yiannakis Sazeides University of Cyprus yanos@ucy.ac.cy UPC-Barcelona 17/5/2001. Motivation. Improve Performance (reduce complexity, save power...) What limits performance? Dependences Break dependences: Prediction

sullivan
Download Presentation

Dependence-Based Value Prediction

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Dependence-Based Value Prediction Yiannakis Sazeides University of Cyprus yanos@ucy.ac.cy UPC-Barcelona 17/5/2001

  2. Motivation • Improve Performance (reduce complexity, save power...) • What limits performance? Dependences • Break dependences: Prediction • Exploits regularity and/or non-uniformity in predicted information UPC 17/5/01

  3. Predicted Information • Architectural • dependences: control, address, value, memory • Non-Architectural • structural constrains: cache misses, bank conflicts • reduce hardware complexity: cache sets, shared patterns UPC 17/5/01

  4. Use of Predicted Information • Speculative/Non-Speculative • Depends on whether predicted information can directly/indirectly cause an incorrect update of architected state • non-speculative: branch prediction for instruction prefetching • speculative: branch prediction for instruction execution • Hardware/Software UPC 17/5/01

  5. Trends • Identify and eliminate predictability at computational levels below programming • Predictors in almost all high performance processors and many compilers • Technological evolution and limitations will increase latency and make predictive techniques more important • deeper pipelines • fast processor/slow memory • distributed microarchitectures UPC 17/5/01

  6. Our motivation • Can value prediction help? • How to use value predictability? • Wholistic approach: all types not just vp and coarser grain • Absolutely curious to discover, understand and use the esoteric program properties causing the predictability and non-uniformity observed in program information UPC 17/5/01

  7. This talk... • Hypothesis: dependence information influences the predictability of program values • Propose and evaluate various dependence-based value predictors • Approach: theoretical and practical • Work in progress... UPC 17/5/01

  8. Outline • Introduction • Background on value prediction • Dependence Info and Predictability • Dependence-based Value Predictors • Results • Future work UPC 17/5/01

  9. Value Sequences Produced by Instructions • Basic Sequences • Constant: 0 0 0 0 0 • Stride: 4 3 2 1 0 • Non-Stride: -1 23 10 94 • Repeating Sequences (composition of basic sequences): • Repeated Stride: 4 3 2 1 0 4 3 2 1 0 • Repeated Non-Stride: -1 23 10 94 -1 23 10 94 UPC 17/5/01

  10. Local History Value Predictors • Computational-Based • compute next value by performing a computation on previous value(s) • Context-Based • learn the value that follows a finite number of previous values (context) and predict that value when context repeats • need to observe a context-value before predicting correctly • Hybrid: Delta-Predictor UPC 17/5/01

  11. Last Value Predictor UPC 17/5/01

  12. Stride Predictor UPC 17/5/01

  13. Context-Based Predictor UPC 17/5/01

  14. Hybrid Predictor UPC 17/5/01

  15. Causes of Predictability • Model Based on Dependence Graph • Robustness: predictability due to program control structure and immediate values not input data • Predictability generation-propagation termination • need to consider info beyond local scope • dependence information holds potential to increase accuracy of value prediction UPC 17/5/01

  16. Hypothesis/Fact • The predictability of an instruction is determined by the information on the dependence path that leads to it • Predict the value produced by an instruction based on the values and/or information of its predecessors UPC 17/5/01

  17. Outline • Introduction • Background on value prediction • Dependence Info and Predictability • Dependence-based Value Predictors • Results • Future work UPC 17/5/01

  18. Example

  19. Observations • All instructions can trace dependence back to $6 • $6 used as an induction variable • Use information about $6 to get predictions UPC 17/5/01

  20. Example • Use value in $6 to predict instruction 7: Value of $6 Output of Instr. 7 0,..,13, 15, 31..63 1 14, 16..30 0 • Local history with <47 previous values mispredicts UPC 17/5/01

  21. Dependence-Based Prediction • Prediction based on information from the component of the predicted instruction i Output = PF(Componenti) • Component: • backward dynamic data dependence slice • node info: pcs, optypes, immed., outcomes • livein values (values not produced by component, register and memory) UPC 17/5/01

  22. Dependence-Based Prediction • In general, use information from components of previous instructions Output = PF(Ci-n..Ci-1,Ci) UPC 17/5/01

  23. Perspective • Virtually all predictors are functions of componentapproximations to values • “Practical Limitation”: predictors can rely on a subset of components and information UPC 17/5/01

  24. Component Approximation • Approximation accuracy depends on information used from component • What limits approximation accuracy: • finite resources and aliasing • amount of information to be stored • how soon a prediction can be made UPC 17/5/01

  25. Existing Predictors • “Interesting” with how little information predictors work well • Global History Branch Predictors • use information from multiple previous branch components Output=PF(Ci-n..Ci-1,Ci) • Note components may be unrelated (longer learning and destructive aliasing) UPC 17/5/01

  26. Dependence Information • A lot of information to choose from • Which predecessors: • recent, recurrent, earliest, all • Information • values • register, memory names • pc, optypes, immediates • dependence distance • Propagation through registers or memory UPC 17/5/01

  27. Ideas… predict based on: • Values of recurrent predecessors • values indicating location in program UPC 17/5/01

  28. Based on Recurrent Predecessors

  29. Ideas… predict based on: • Values of recurrent predecessors • values indicating location in program • no sp • sp with last SP value and PC selection of stride UPC 17/5/01

  30. Dependence-Based Stack Pointer Predictor UPC 17/5/01

  31. Ideas… predict based on: • Values of recurrent predecessors • values indicating location in program • no sp • sp with last SP value and PC selection of stride • Distance from predecessors • distance indicates coordinates in program • predict values not based on values • no sp UPC 17/5/01

  32. Based on Dependence Distance

  33. Ideas… predict based on: • Values of recurrent predecessors • values indicating location in program • no sp • sp with last SP value and PC selection of stride • Distance from predecessors • distance indicates coordinates in program • predict values not based on values • no sp • Most recently known processor state • isolate non-determinism UPC 17/5/01

  34. Based on Recent Predecessors

  35. Outline • Introduction • Background on value prediction • Dependence Info and Predictability • Dependence-based Value Predictors • Results • Future work UPC 17/5/01

  36. Prediction Process • To predict an instruction • Construction of Dependence Record (DR) • approximation of the information on the component of the instruction • Use DR to obtain a prediction (directly or indirectly) UPC 17/5/01

  37. DBVP Predictor with CT UPC 17/5/01

  38. DBVP Register (DBVP-R) • Component subset: instructions those fetched but have not updated yet the architectural state • isolates the non-determinism in execution • Information used: • Generate Registers(GR):livein registers (most recently known architected state) • Dependence Path Id(DPI):pcs, optypes, immediates (info about unknown state) UPC 17/5/01

  39. Construction of DR for an instruction (GR) UPC 17/5/01

  40. Construction of DR for an instruction - Many instructions same GRs - Differentiate with DPI UPC 17/5/01

  41. DR Construction • Information encoded in instructions • May be done incrementally off-line and stored in a table where it can be retrieved (imprecise?) • No investigation of implementation specifics of DR construction • Memory instructions propagate the dependence info through address operands (can be problematic - later) UPC 17/5/01

  42. DBVP-R Predictor History Table indexed with register names contains architected state UPC 17/5/01

  43. DBVP Memory (DBVP-M) • DBVP-R ignores memory dependences • often no correlation between load address and value • DBVP-M: same as DBVP-R with additional functionality and information: • propagation of DR through memory • convert def-store-load-use dependence in a component to def-use • livein memory locations(generate locations GLs): • converts values from memory to liveins UPC 17/5/01

  44. DR Propagation Through Memory (spilled variable) UPC 17/5/01

  45. Livein Memory Locations UPC 17/5/01

  46. Generate Locations (GL) and Memory History Table(MHT) • GL is an index into a table (MHT) with values written to memory • Store-load dependent pairs are assigned MHT location • Memory Dependence Prediction mechanisms can provide the extra functionality required by DBVP-M UPC 17/5/01

  47. DBVP-M Predictor UPC 17/5/01

  48. Differences DBVP and CB • Information used to access tables and table sizes • History table is register indexed (vs PC indexed) +smaller +may be easier to manage speculative updates -possibly provide predictions later • Smaller context is required to capture repeated behavior UPC 17/5/01

More Related