changeset 9533:298e47193781

Fix for delayed OSR: we must drop the precise stamps we have on the OSR locals since they may be too precise because of branch pruining in the graph builder.
author Gilles Duboscq <duboscq@ssw.jku.at>
date Fri, 03 May 2013 15:19:08 +0200
parents 8f854c4deabf
children 197994e68e43
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/OnStackReplacementPhase.java
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/OnStackReplacementPhase.java	Fri May 03 12:14:37 2013 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/OnStackReplacementPhase.java	Fri May 03 15:19:08 2013 +0200
@@ -30,6 +30,7 @@
 import com.oracle.graal.loop.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.extended.*;
+import com.oracle.graal.nodes.type.*;
 import com.oracle.graal.nodes.util.*;
 import com.oracle.graal.phases.*;
 import com.oracle.graal.phases.common.*;
@@ -98,7 +99,11 @@
             ValueNode value = osrState.localAt(i);
             if (value != null) {
                 ProxyNode proxy = (ProxyNode) value;
-                proxy.replaceAndDelete(graph.unique(new OSRLocalNode(i, value.stamp())));
+                /*
+                 * we need to drop the stamp and go back to the kind since the types we see during
+                 * OSR may be too precise (if a branch was not parsed for example).
+                 */
+                proxy.replaceAndDelete(graph.unique(new OSRLocalNode(i, StampFactory.forKind(proxy.kind()))));
             }
         }