1 / 15

Predicate Execution

Predicate Execution. 2008/01/10 Presented by Jinho. 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

vidor
Download Presentation

Predicate Execution

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. Predicate Execution 2008/01/10 Presented by Jinho

  2. 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 If-conversion

  3. Phi-Predication for Light-Weight If-Conversion Weihaw Chuang, Brad Calder, Jeanne Ferrante - CGO’03

  4. Instructions Phi-Predication

  5. 4 Classes Compiler Transformation

  6. Predicate Predication for Efficient Out-of-order Execution Weihaw Chuang, Brad Calder - ICS’03

  7. 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 Main Idea

  8. REN1 • Predicate prediction is completed • REN2 • The predicted predicates and the true predicate values are early-evaluated Predicate Early Evaluation

  9. 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 Predicate Misprediction Recovery

  10. Flush vs. Rename-replay Pipeline comparison

  11. Examples Selective Replay

  12. Methodology • Trace • David Mosberger’s “utrace.c” • Simulator • Modified SimpleScalar 3.0 to handle IA64 • Benchmarks • Spec2000 Integer and Floating-Point Evaluation

  13. Speedups Comparison

  14. Wrap-up

  15. 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; Predicate prediction Generally better performance Problem in hard-to-predict branch Phi-prediction mov r1 = 0; mov r5 = 2; cmp.eq p1,p2=r2,r3; phi r4 = (p1)1,r5; Doesn’t need to rename Only for some operations Multiple definition

More Related