Code Review for 6732194

Prepared by: Thomas Rodriguez (never) on Wed Aug 13 09:38:12 PDT 2008
Workspace:/export/ws/baseline
Compare against: ssh://hg.openjdk.java.net/jdk7/hotspot-comp-gate/hotspot
Summary of changes: 21 lines changed: 11 ins; 0 del; 10 mod; 5563 unchg
Patch of changes: 6732194.patch
Author comments:
6732194: Data corruption dependent on -server/-client/-Xbatch
Summary: rematerializing nodes results in incorrect inputs
Reviewed-by:

split_Rematerialize is used to rematerialize nodes which either can't
be spilled or for which it is cheaper to recompute the value than the
spill. Rematerializing nodes will lengthen the live ranges of any
inputs to that node and care must be taken that to do that safely.
Some live ranges contain multiple definitions as a result of
coalescing and inputs which come from those LRG have to be cloned
because we don't have enough liveness information to safely lengthen
the live range of one def from that LRG. The existing code correctly
checks all the inputs before cloning the node but the walkThru flag
may cause the code to skip back an LRG which is multidef. If that
occurs we should just fall back to the existing input which is
guaranteed to be safe. It would always be safe to ignore walkThru
since it's only purpose appears to increasings the likelihood that an
existing LRG is used instead of a new one being created.

Adding an assert that checked that walkThru didn't lead to multidef
LRG caused a few thousand failures in CTW and quite a few in
refworkload as wel. Even if we do use a multidef LRG there's no
guarantee that it would lead to incorrect execution since it requires
a pretty specific code shape for that. I was unable to develop a
reliable test case and any possible assert mirrors the logic I just
added so it doesn't seem worthwhile.

tested with 32 and 64 bit intel, ctw, nsk, runthese jck

Bug id: 6732194: Data corruption dependent on -server/-client/-Xbatch
Legend: Modified file
Deleted file
New file

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/share/vm/opto/chaitin.hpp

4 lines changed: 3 ins; 0 del; 1 mod; 501 unchg

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/share/vm/opto/reg_split.cpp

11 lines changed: 8 ins; 0 del; 3 mod; 1297 unchg

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/share/vm/opto/chaitin.cpp

3 lines changed: 0 ins; 0 del; 3 mod; 2040 unchg

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/share/vm/opto/coalesce.cpp

2 lines changed: 0 ins; 0 del; 2 mod; 913 unchg

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/share/vm/opto/ifg.cpp

1 line changed: 0 ins; 0 del; 1 mod; 812 unchg

This code review page was prepared using /net/smite.sfbay/never/bin/hgwebrev (vers 23.12-hg-never).