# HG changeset patch # User Thomas Wuerthinger # Date 1363722533 -3600 # Node ID a019b27cb9ef9a74a71cea883cbdc87da21f59e3 # Parent 85d4392b9e264064bb63cb947ba6138455eb60b9# Parent 807fd844ed2a1f1f5a0486f4186b2498f0450ea0 Merge. diff -r 85d4392b9e26 -r a019b27cb9ef 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 20:48:45 2013 +0100 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/FloatingReadPhase.java Tue Mar 19 20:48:53 2013 +0100 @@ -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