1 / 9

Optimizing Compilers CISC 673 Spring 2009 Feedback Directed Optimization

Optimizing Compilers CISC 673 Spring 2009 Feedback Directed Optimization. John Cavazos University of Delaware. Feedback-Directed Optimization (FDO). Exploit information gathered at run-time to optimize execution “selective optimization”: what to optimize “FDO” : how to optimize.

basil-nash
Télécharger la présentation

Optimizing Compilers CISC 673 Spring 2009 Feedback Directed Optimization

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. Optimizing CompilersCISC 673Spring 2009Feedback Directed Optimization John Cavazos University of Delaware

  2. Feedback-Directed Optimization (FDO) • Exploit information gathered at run-time to optimize execution • “selective optimization”: what to optimize • “FDO” :how to optimize

  3. Advantages of FDO • Can exploit dynamic information that cannot be inferred statically • System can change and revert decisions when conditions change • Runtime binding allows more flexible systems

  4. Challenges for automatic online FDO • Compensate for profiling overhead • Compensate for runtime transformation overhead • Account for partial profile available and changing conditions

  5. Clients of Profiling Information • Inlining, unrolling, method dispatch • Dispatch tables, Garbage Collection • Pretching • Misses, Hardware performance monitors [Adl-Tabatabai et al.’04] • Code layout

  6. Code Layout Motivation • Instruction memory critical to program performance • Cache line conflicts are one cause of misses • Particularly for direct-mapped caches • Page faults • Default code layout for most compilers is bad • Instructions placed in source order • Procedures placed according to source file listing • Compilers can rearrange code to reduce misses • More performance and less power for free

  7. Procedure Positioning • “Closest is best” strategy: if procedure calls another frequently, we want two procedures close to one another. Increases chances they will land on the same page, reducing working set. • Construct a weighted call graph • Node = procedure • Edge from A  B means procedure A calls B (perhaps multiple times) • Weight on edge is the total number of dynamic calls • Using the weighted call graph to build the link order for the procedures

  8. Example Call Graph

  9. Merging Nodes 1) The heaviest weight edge is one connecting procedures A and D. They are merged. Edge weights are updated. 2) The next edge chosen is the one between C and F.

More Related