Veerle Desmet Lieven Eeckhout Koen De Bosschere - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

Veerle Desmet Lieven Eeckhout Koen De Bosschere

Description:

Veerle Desmet Lieven Eeckhout Koen De Bosschere – PowerPoint PPT presentation

Number of Views:47
Avg rating:3.0/5.0
Slides: 21
Provided by: veer7
Category:

less

Transcript and Presenter's Notes

Title: Veerle Desmet Lieven Eeckhout Koen De Bosschere


1
Veerle Desmet Lieven Eeckhout Koen De Bosschere
  • Using Decision Trees to Improve Program-Based and
    Profile-Based Static Branch Prediction

2
Control flow
High-level program code
  • if (input gt 0)
  • for (i0 ilt10 i)
  • / a loop ) /
  • else
  • printf(input lt 0)

compiler architecture
3
Branch Prediction
  • Static
  • fixed prediction per static branch
  • predicts most frequently direction
  • backward branches typically taken
  • e.g 1 misprediction for 10 predictions
  • Applications
  • compiler optimizations
  • embedded systems
  • for guiding dynamic branch prediction

taken
not-taken
4
Outline
  • Introduction
  • Decision Trees
  • Extended feature set
  • Heuristics
  • Ordering
  • Two new heuristics
  • Results
  • Conclusion

5
Decision trees
  • C4.5
  • Set examples
  • Choose best split (information gainratio)
  • Divide examples in subtrees
  • Repeat for subtrees
  • Classification model

features
6
Features
  • Literature Calder et al.
  • branch direction, branch type, successor basic
    block is a loopheader, postdominance
    relations,...
  • New candidate features
  • number of instructions in successor basic block
  • dependency distance
  • number of incoming edges

2.8
7
Fair evaluation
branch direction
forward
backward
C4.5
branch type
taken
beq bgt
bne
taken
not-taken
Programs
Prediction model
SPECint2000 SPECint95
Evaluation
8
Outline
  • Introduction
  • Decision Trees
  • Extended feature set
  • Heuristics
  • Automatic Ordering
  • Two new heuristics
  • Results
  • Conclusion

9
Loops
Heuristic
  • Loops
  • for, while,...
  • 11 static
  • 35 dynamic
  • Loops are repeated
  • 81 correct
  • 88 static upper limit

10
Non-loops
Heuristics
  • Opcode
  • Negative numbers denote error values
  • Pointer
  • Pointer ? NULL
  • Pointers differ
  • Loopheader
  • Loops are entered
  • ...

11
Heuristic ordering
Priority
  • Loop ? pointer ? call ? opcode ? return ? store ?
    loopheader ? guard random
  • Ball Larus
  • Optimal ordering out of 8! possibilities
  • Dependent on program set
  • Automated way

12
Optimal tree
loop
opcode
heuristic
call
heuristic
return
heuristic
loopheader
heuristic
store
not-taken
pointer
taken
not-taken
taken
SPECint2000 SPECint95
13
New heuristic 1
Postdominating heuristic
  • If one successor is postdominator
  • Predict the non-postdominating successor
  • if-block without else-block if-block will be
    executed

if (input 0)
if-block
postdominating block
NEW
14
New heuristic 2
NEW
Dependency distance heuristic
  • number of instructions between branch and its
    register defining instruction

... cmplt r1, 10, r2 add r3, r4, r5 bne r2
ld r3, (r1) beq r2
distance 2
undefined distance
15
Final ordering
loop
opcode
heuristic
call
heuristic
return
heuristic
loopheader
heuristic
store
not-taken
postdom
taken
no
yes
not-taken
distance
lt3
undefined
3
taken
not-taken
SPECint2000 SPECint95
16
IPM
  • Instructions Per Mispredicted branch
  • how many instructions, including correctly
    predicted branches, one passes on average before
    encountering a mispredicted branch Fisher
    Freudenberger

HIGHER-IS-BETTER
17
Results
Ball Larus order 31.3 IPM
Higher-is-better
Decision Tree order 32.1 IPM
postdominating heuristic 34.7 IPM
dependency distance heuristic 37.1 IPM
100
90
80
70
60
IPM
50
40
30
20
10
0
18.5
li
go
vpr
gcc
mcf
perl
gap
gzip
twolf
bzip2
ijpeg
crafty
vortex
parser
average
m88ksim
compress
18
Conclusion
  • This presentation
  • Set extra features
  • provides 2.8 gain in IPM
  • Decision trees for
  • heuristic ordering
  • automatic extracting new heuristics
  • 18.5 gain in IPM
  • In paper also
  • Coverage for heuristics
  • Profile-based branch prediction
  • up to 11 gain in IPM

19
  • Paper
  • proceedings pp. 336352
  • Presentation
  • www.elis.ugent.be/vdesmet

VEERLE DESMET Ghent University
20
Veerle Desmet Lieven Eeckhout Koen De Bosschere
  • Using Decision Trees to Improve Program-Based and
    Profile-Based Static Branch Prediction
Write a Comment
User Comments (0)
About PowerShow.com