583L3 - EECS 583 Class 3 Region Formation, Predicated...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
EECS 583 – Class 3 Region Formation, Predicated Execution University of Michigan September 14, 2011
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
- 1 - Reading Material Today’s class » “Trace Selection for Compiling Large C Applications to Microcode”, Chang and Hwu, MICRO-21, 1988. » “The Superblock: An Effective Technique for VLIW and Superscalar Compilation”, Hwu et al., Journal of Supercomputing, 1993 Material for Monday » “The Program Dependence Graph and Its Use in Optimization”, J. Ferrante, K. Ottenstein, and J. Warren, ACM TOPLAS, 1987 This is a long paper – the part we care about is the control dependence stuff. The PDG is interesting and you should skim it over, but we will not talk about it now » “On Predicated Execution”, Park and Schlansker, HPL Technical Report, 1991.
Background image of page 2
- 2 - From Last Time: Region Type 1 - Trace Trace - Linear collection of basic blocks that tend to execute in sequence » “Likely control flow path” » Acyclic (outer backedge ok) Side entrance – branch into the middle of a trace Side exit – branch out of the middle of a trace Compilation strategy » Compile assuming path occurs 100% of the time » Patch up side entrances and exits afterwards Motivated by scheduling (i.e., trace scheduling) BB2 BB4 BB6 BB5 BB1 BB3 80 20 10 90 10 90 10 80 20 10
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
- 3 - From Last Time: Linearizing a Trace BB2 BB4 BB6 BB5 BB1 BB3 80 20 (side exit) 10 (side exit) 90 10 (entry count) 90 (entry/ exit count) 10 (exit count) 80 20 (side entrance) 10 (side entrance)
Background image of page 4
- 4 - Issues With Selecting Traces Acyclic » Cannot go past a backedge Trace length » Longer = better ? » Not always ! On-trace / off-trace transitions » Maximize on-trace » Minimize off-trace » Compile assuming on-trace is 100% (ie single BB) » Penalty for off-trace Tradeoff (heuristic) » Length » Likelihood remain within the trace BB2 BB4 BB6 BB5 BB1 BB3 80 20 10 90 10 90 10 80 20 10
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
- 5 - Trace Selection Algorithm i = 0; mark all BBs unvisited while (there are unvisited nodes) do seed = unvisited BB with largest execution freq trace[i] += seed mark seed visited current = seed /* Grow trace forward */ while (1) do next = best_successor_of(current) if (next == 0) then break trace[i] += next mark next visited current = next endwhile /* Grow trace backward analogously */ i++ endwhile
Background image of page 6
- 6 - Best Successor/Predecessor Node weight vs edge weight » edge more accurate THRESHOLD » controls off-trace probability » 60-70% found best Notes on this algorithm » BB only allowed in 1
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/26/2011 for the course EECS 583 taught by Professor Flinn during the Fall '08 term at University of Michigan.

Page1 / 26

583L3 - EECS 583 Class 3 Region Formation, Predicated...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online