Differences between revisions 2 and 3
Revision 2 as of 2008-05-14 10:09:50
Size: 1411
Revision 3 as of 2009-09-20 21:55:26
Size: 1413
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
[[BR]] <<BR>>
Line 5: Line 5:
[[BR]] <<BR>>
Line 8: Line 8:
Line 19: Line 19:
Line 23: Line 23:
implementation file: [http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CopyExpansion.cpp?view=markup http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CopyExpansion.cpp] implementation file: [[http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CopyExpansion.cpp?view=markup|http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CopyExpansion.cpp]]

'copy' LIR transformation translates CopyPseudoInsts to corresponding native copying instructions.

Besides replacing of CopyPseudoInsts this optimization calls to SimpleStackOpndCoalescer to remove unnecessary copying.
SimpleStackOpndCoalescer removes redundant stack operands and translates redundant stack-stack CopyPseudoInsts to copies of the same operand. The latter is not expanded by the copy expansion pass and thus is not emitted.

SimpleStackOpndCoalescer "removes" copies if:

- both operands are StackAutoLayout 
- both are of the same size
- live-ranges of the operands do not overlap

Live-ranges are approximated by sets of spans like in the bin-packing register allocation. SimpleStackOpndCoalescer uses the same structures (Interval, Span) as the Jitrino bin-packing reg allocator.

It is important that for non-static synchronized methods the method argument containing "this" is not changed as it is used in getAddressOfThis. This is taken into account by making live-ranges of "this" for such methods "eternal" (living till the end of the method)

implementation file: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CopyExpansion.cpp

Jitrino_OPT/copy (last edited 2009-09-20 21:55:26 by localhost)