review (S) for 7004940: CTW: assert(!def_outside->member(r)) failed: Use of external LRG overlaps the same LRG

Christian Thalinger christian.thalinger at oracle.com
Fri Dec 10 01:06:37 PST 2010


On Dec 9, 2010, at 7:27 PM, Tom Rodriguez wrote:
> http://cr.openjdk.java.net/~never/7004940
> 
> 7004940: CTW: assert(!def_outside->member(r)) failed: Use of external LRG overlaps the same LRG
> Reviewed-by:
> 
> When splitting an LRG involving a phi the processing of the phi is
> delayed to the end and it is split by inserting copies in each of the
> predecessor blocks and then merging the new splits with the phi into a
> single LRG.  The merging is done blindly after all the phis have been
> split.  Usually this is fine because all MSCs are inserted at the end
> of the predecessor and they are disjoint LRGs by definition.  The
> problem comes when rematerialization is done because this adds an
> extra use mixed in with the MSCs and that use might be the same LRG as
> one of the phis that was just split.  If the rematerialize is done
> first then it all works out because of insertion order but if it's
> done afterwards then you can get the failure we're seeing.  The fix is
> insert the rematerialized nodes above the MSCs that were inserted
> during the phi node splitting process.  I also added/fixed some of the
> printing code in PhaseChaitin.  Tested with full ctw on sparc 32 and
> 64 bit.

Looks good.  -- Christian


More information about the hotspot-compiler-dev mailing list