Download presentation
Presentation is loading. Please wait.
Published byGervais Owen Modified over 9 years ago
1
Predicate Execution 2008/01/10 Presented by Jinho
2
If-conversion Performance degradation mov r1 = 0; if( r2 == r3 ) mov r1 = 1; else mov r1 = 2; mov r4 = r1; mov r1 = 0; cmp.eq p1,p2=r2,r3; (p1) mov r1 = 1; (p2) mov r1 = 2; mov r4 = r1; Problem Multiple definition Performance degradation due to renaming
3
Phi-Predication for Light-Weight If-Conversion Weihaw Chuang, Brad Calder, Jeanne Ferrante - CGO’03
4
Phi-Predication Instructions
5
Compiler Transformation 4 Classes
6
Predicate Predication for Efficient Out-of-order Execution Weihaw Chuang, Brad Calder - ICS’03
7
Main Idea Predicate Predictor ◦Predicates were branches before if-conversion ◦Value prediction instead of branch prediction Implementation ◦Separate from branch predictor Only for branch history table No needs for the return-address stack or the branch target buffer
8
Predicate Early Evaluation REN1 ◦Predicate prediction is completed REN2 ◦The predicted predicates and the true predicate values are early-evaluated
9
Predicate Misprediction Recovery Flush Predicate Misprediction ◦Naïve approach Rename-Replay for Predicate Misprediction ◦Instructions on false predicates are not put into the issue queue ◦Replay from predicate early evaluation ◦Instructions are stored in recovery queue(RecQ) Selective-Replay for Predicate Mispredictions ◦All instructions are put into the issue queue ◦Replay selectively
10
Pipeline comparison Flush vs. Rename-replay
11
Selective Replay Examples
12
Evaluation Methodology ◦Trace David Mosberger’s “utrace.c” ◦Simulator Modified SimpleScalar 3.0 to handle IA64 ◦Benchmarks Spec2000 Integer and Floating-Point
13
Comparison Speedups
14
Wrap-up
15
Multiple definition Solution? mov r1 = 0; if( r2 == r3 ) mov r1 = 1; else mov r1 = 2; mov r4 = r1; mov r1 = 0; cmp.eq p1,p2=r2,r3; (p1) mov r1 = 1; (p2) mov r1 = 2; mov r4 = r1; mov r1 = 0; mov r5 = 2; cmp.eq p1,p2=r2,r3; phi r4 = (p1)1,r5; Phi-prediction Doesn’t need to rename Only for some operations Predicate prediction Generally better performance Problem in hard-to-predict branch
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.