You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by Apache Wiki <wi...@apache.org> on 2008/05/06 11:11:40 UTC

[Harmony Wiki] Update of "Jitrino OPT/inline" by George Timoshenko

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Harmony Wiki" for change notification.

The following page has been changed by George Timoshenko:
http://wiki.apache.org/harmony/Jitrino_OPT/inline

New page:
Inlining pass removes the overhead of a direct call and builds the code of the called method into the code of the caller in place of its call site.

Inlining is an iterative process involving other optimizations. It goes as follows: 
 * The inliner selects candidates for inlining in the following sequence: 

 - Examines each direct call site in the IR form, including those exposed by guarded devirtualization. 

 - Heuristically estimates the potential benefit of inlining. 

 - Checks whether the benefit exceeds a certain threshold, and, if it does, registers the call in a priority queue. 

 * The inliner selects the top candidate, if any, for inlining. 
 * The translator generates an intermediate representation for the method selected for inlining.  
 * The optimizer runs over HIR of the method using the inliner pipeline. 
 * The inliner finds further inline candidates, if any, in the analyzed representation and replicates it in the representation of the caller. 
 * The inliner selects a new inline candidate from the queue and repeats the cycle.
 * The inliner stops its work when the queue is empty or after code IR reaches a certain size limit.