# HG changeset patch # User Christian Wimmer # Date 1363712443 25200 # Node ID 807fd844ed2a1f1f5a0486f4186b2498f0450ea0 # Parent 2543392b9197e5a6b26a6af05cc69ebeabe55d39 InvokeWithException cannot be the lastLocationAccess for a FloatingReadNode. Since it is both the invoke and a control flow split, the scheduler cannot schedule anything immediately the invoke. It can only schedule in the normal or exceptional successor - and we have to tell the scheduler here which side it needs to choose by putting in the location identity on both successors. diff -r 2543392b9197 -r 807fd844ed2a graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/FloatingReadPhase.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/FloatingReadPhase.java Tue Mar 19 17:01:39 2013 +0100 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/FloatingReadPhase.java Tue Mar 19 10:00:43 2013 -0700 @@ -200,7 +200,19 @@ @Override protected MemoryMap afterSplit(BeginNode node, MemoryMap oldState) { - return new MemoryMap(oldState); + MemoryMap result = new MemoryMap(oldState); + if (node.predecessor() instanceof InvokeWithExceptionNode) { + /* + * InvokeWithException cannot be the lastLocationAccess for a FloatingReadNode. + * Since it is both the invoke and a control flow split, the scheduler cannot + * schedule anything immediately the invoke. It can only schedule in the normal or + * exceptional successor - and we have to tell the scheduler here which side it + * needs to choose by putting in the location identity on both successors. + */ + InvokeWithExceptionNode checkpoint = (InvokeWithExceptionNode) node.predecessor(); + result.lastMemorySnapshot.put(checkpoint.getLocationIdentity(), node); + } + return result; } @Override