I Fdo
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

I Fdo

on

  • 567 views

 

Statistics

Views

Total Views
567
Views on SlideShare
444
Embed Views
123

Actions

Likes
0
Downloads
9
Comments
0

3 Embeds 123

http://www.lingcc.com 121
http://cache.baidu.com 1
http://cache.baiducontent.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

I Fdo Presentation Transcript

  • 1. Section I Supporting Feedback-directed Optimizations
  • 2. Feedback Compilation Use instrumented executable to collect profile information and feedback into the compiler (FDO) Steps: 1. To compile with instrumentation: -fb_create fb_file 1. Execute “training run”  Very slow execution run 1. Re-compile with -fb_opt fb_file Compilation flags must be the same in both compiles
  • 3. Instrumentation Instrumentation code inserted during compilation at WHIRL level  Data gathering can be performed at same point during feedback compile  Precise correlation of feedback data with program code  Accuracy not affected by compilation flags (as long as they are same between the two compiles) Instrumented code are calls to runtime library libinstr.{so,a} Support different types of feedback data  BB frequencies  Edge frequencies  Value profiles
  • 4. Instrumentation and Compilation Phases Can instrument (and gather data) at different points during compilation process (flag -fb_phase): 0. before VHO 1. before LNO 2. before WOPT 3. before CG Only later phases can use gathered profile data When code is transformed, need to update profile data  Utility functions provided for this purpose  Some guesses involved Default is –fb_phase 0  PathScale has not tested with other values for –fb_phase
  • 5. Use of Value Profiles Compute histogram of top few runtime values 1. Floating-point multiples if (y == 1.0) x * y x y mostly 1.0 else x * y 2. Integer divides if (j == 2k) i << k i / j else i / y j mostly 2k 3. Indirect calls if (p == &foo) (*p)() foo() p mostly foo() Else (*p)()