Presentation is loading. Please wait.

Presentation is loading. Please wait.

Advanced Computer Architecture Lab University of Michigan Compiler Controlled Value Prediction with Branch Predictor Based Confidence Eric Larson Compiler.

Similar presentations


Presentation on theme: "Advanced Computer Architecture Lab University of Michigan Compiler Controlled Value Prediction with Branch Predictor Based Confidence Eric Larson Compiler."— Presentation transcript:

1 Advanced Computer Architecture Lab University of Michigan Compiler Controlled Value Prediction with Branch Predictor Based Confidence Eric Larson Compiler Controlled Value Prediction with Branch Predictor Based Confidence Eric Larson and Todd Austin Advanced Computer Architecture Lab University of Michigan December 13, 2000

2 Advanced Computer Architecture Lab University of Michigan Compiler Controlled Value Prediction with Branch Predictor Based Confidence Eric Larson Talk Overview Motivation Optimizations –Adding confidence to compiler controlled value prediction –Selecting value prediction candidates based on the time spent in the middle of dynamic dependence chains –Ignoring branch mispredictions when program semantics aren’t violated Results Conclusion and Future Work

3 Advanced Computer Architecture Lab University of Michigan Compiler Controlled Value Prediction with Branch Predictor Based Confidence Eric Larson Motivation Value prediction can break dependence chains, increasing instruction level parallelism (ILP). Hardware value prediction techniques are effective but expensive due to the large amount of predictor state that needs to be stored. Software value prediction is inefficient because there is no confidence. Only the most predictable candidates can be selected, reducing coverage.

4 Advanced Computer Architecture Lab University of Michigan Compiler Controlled Value Prediction with Branch Predictor Based Confidence Eric Larson Solution Add confidence to compiler-controlled value prediction by using the existing branch predictor –Increases coverage while keeping accuracy high Profile-guided candidate selection based on criticality of instructions in dynamic instruction window –Exposes additional parallelism Implement a new branch that ignores mispredictions when executing a non-optimized, but correct, path –Reduces branch mispredictions

5 Advanced Computer Architecture Lab University of Michigan Compiler Controlled Value Prediction with Branch Predictor Based Confidence Eric Larson Compiler Controlled Value Prediction Hardware support –Uses a hardware predictor accessed through PREDICT and UPDATE instructions [Fu98] –Value prediction table is smaller than hardware only value prediction –Sophisticated value predictors (such as a hybrid predictor) can be used Software only –Predictor state stored in memory or the register file –No hardware cost, can be added to existing microarchitectures –Only simple predictors make sense due to implementation overheads

6 Advanced Computer Architecture Lab University of Michigan Compiler Controlled Value Prediction with Branch Predictor Based Confidence Eric Larson Optimization #1: Branch Based Confidence lda load add sub lda load predict sub add dependence predicted by beq instruction

7 Advanced Computer Architecture Lab University of Michigan Compiler Controlled Value Prediction with Branch Predictor Based Confidence Eric Larson Coverage and Accuracy

8 Advanced Computer Architecture Lab University of Michigan Compiler Controlled Value Prediction with Branch Predictor Based Confidence Eric Larson Optimization #2: Value Prediction Candidate Selection Split long dependence chains in half to maximize ILP –“ sub ” is the best instruction to predict in the example Dynamic profiler locates instructions in the longest chains –Compiler only optimizes sites with high “middle metric” –Largest number of optimization sites: 136 (approx. 1 KB table)

9 Advanced Computer Architecture Lab University of Michigan Compiler Controlled Value Prediction with Branch Predictor Based Confidence Eric Larson Optimization #3: Misprediction Tolerant Branch “BEQIT” Unoptimized path is always correct regardless of confidence prediction Once the program has speculated down the unoptimized path, control will continue down this path, eliminating the branch misprediction penalty confidence predictor

10 Advanced Computer Architecture Lab University of Michigan Compiler Controlled Value Prediction with Branch Predictor Based Confidence Eric Larson Experimental Framework Simulation and dynamic profiling using SimpleScalar –Alpha instruction set –4-wide dynamically scheduled baseline microarchitecture SPEC benchmarks analyzed –training inputs used for profiling –reference inputs used to generate performance results ALTO (A Link Time Optimizer) used to modify binaries [Muth98] –ALTO specific optimizations disabled

11 Advanced Computer Architecture Lab University of Michigan Compiler Controlled Value Prediction with Branch Predictor Based Confidence Eric Larson Compiler Controlled Value Prediction with Branch Predictor Based Confidence

12 Advanced Computer Architecture Lab University of Michigan Compiler Controlled Value Prediction with Branch Predictor Based Confidence Eric Larson Software-only Value Prediction

13 Advanced Computer Architecture Lab University of Michigan Compiler Controlled Value Prediction with Branch Predictor Based Confidence Eric Larson Value Prediction Candidate Selection

14 Advanced Computer Architecture Lab University of Michigan Compiler Controlled Value Prediction with Branch Predictor Based Confidence Eric Larson Misprediction Tolerant Branches

15 Advanced Computer Architecture Lab University of Michigan Compiler Controlled Value Prediction with Branch Predictor Based Confidence Eric Larson Conclusion Branch predictor based confidence improves coverage and performance for compiler-controlled value prediction Software-only value prediction exhibits modest speedup, significant improvements possible with minimal hardware support to reduce overheads Selecting value prediction candidates based on criticality gives more performance, but only programs with long dynamic dependence chains A simple branch optimization eliminates penalties for innocuous confidence mispredictions

16 Advanced Computer Architecture Lab University of Michigan Compiler Controlled Value Prediction with Branch Predictor Based Confidence Eric Larson Future Work Examine the “spacing” of optimizations. Candidates that are close together will cause the dependent chain to be split into several smaller chains, increasing the overhead. Look at using the branch predictor to estimate confidence for other forms of speculation. Apply the misprediction tolerant branch to other optimizations.

17 Advanced Computer Architecture Lab University of Michigan Compiler Controlled Value Prediction with Branch Predictor Based Confidence Eric Larson Questions and Answers


Download ppt "Advanced Computer Architecture Lab University of Michigan Compiler Controlled Value Prediction with Branch Predictor Based Confidence Eric Larson Compiler."

Similar presentations


Ads by Google