changeset 8386:a019b27cb9ef

Merge.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Tue, 19 Mar 2013 20:48:53 +0100
parents 85d4392b9e26 (current diff) 807fd844ed2a (diff)
children 9f0ae7df921e
files
diffstat 1 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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