Differences between revisions 3 and 4
Revision 3 as of 2008-05-14 07:52:17
Size: 1713
Editor: 195
Revision 4 as of 2009-09-20 21:55:35
Size: 1717
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
[[BR]][[BR]] <<BR>><<BR>>
Line 4: Line 4:
[[BR]][[BR]] <<BR>><<BR>>
Line 23: Line 23:
header file: [http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.h?view=markup http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.h] [[BR]]
implementation file: [http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.cpp?view=markup http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.cpp]
header file: [[http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.h?view=markup|http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.h]] <<BR>>
implementation file: [[http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.cpp?view=markup|http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.cpp]]

'inline' - inlines direct Java method calls.

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.

header file: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.h
implementation file: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.cpp

Jitrino_OPT/inline (last edited 2009-09-20 21:55:35 by localhost)