Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Section H
Inlining
Inliners in Open64
1. Inliner inside IPA [ipa/main/analyze]
2. Lightweight inliner [ipa/inline, ipa/main/analyze]
Both per...
Lightweight Inliner
Standalone executable
Works on single files
  
      No cross-file inlining
Not invoked with –ipa com...
Inliner in IPA
More powerful due to program scope
Use summary information created by IPL
Supports recursive inlining
Analysis Phase
Based on summary information
Build call graph
Visit PUs post-order in call graph
Within each function, anal...
Inlining Phase
Performed via post-order traversal of call graph
At each call to be inlined:
 
     Replace call instructi...
Upcoming SlideShare
Loading in …5
×

H Inline

526 views

Published on

  • Be the first to comment

  • Be the first to like this

H Inline

  1. 1. Section H Inlining
  2. 2. Inliners in Open64 1. Inliner inside IPA [ipa/main/analyze] 2. Lightweight inliner [ipa/inline, ipa/main/analyze] Both perform dead function elimination 3. Standalone inliner  Precursor to lightweight inliner  Perform more functions than lightweight inliner  Currently not used 4. Inliner in GNU front-end completely disabled
  3. 3. Lightweight Inliner Standalone executable Works on single files  No cross-file inlining Not invoked with –ipa compilation Always invoked at –O3 without -ipa Important for trimming un-used functions from header files Summary information gathered at start of phase Output is .I file
  4. 4. Inliner in IPA More powerful due to program scope Use summary information created by IPL Supports recursive inlining
  5. 5. Analysis Phase Based on summary information Build call graph Visit PUs post-order in call graph Within each function, analyze calls in order of decreasing call costs Factors determining inline decisions:  Language restriction or insufficient info  Heuristics utilizing call frequencies and sizes of callers and callees Compilation flags let users affects inline decisions
  6. 6. Inlining Phase Performed via post-order traversal of call graph At each call to be inlined:  Replace call instruction by cloned body of callee  Merge callee’s local symbol table to caller’s  Change parameter passing code to assignments  Insert assignment that fetches the return value  Traverse cloned callee body to update code Recursive inlining performed after all calls inside function have been processed  Currently limited to recursion depth of 1

×