changeset 9475:6f84aacfdf3c

Infer stamp for LoadIndexedNode, so that we have more precise type information for the result of the array load. This is important when the array is a originally a phi function (whithout any type information) and the phi function gets eliminated later on.
author Christian Wimmer <christian.wimmer@oracle.com>
date Wed, 01 May 2013 09:11:13 -0700
parents 85f83b7b3616
children deb3189e834d
files graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/LoadIndexedNode.java
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/LoadIndexedNode.java	Wed May 01 09:09:33 2013 -0700
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/LoadIndexedNode.java	Wed May 01 09:11:13 2013 -0700
@@ -53,6 +53,11 @@
     }
 
     @Override
+    public boolean inferStamp() {
+        return updateStamp(createStamp(array(), elementKind()));
+    }
+
+    @Override
     public void virtualize(VirtualizerTool tool) {
         State arrayState = tool.getObjectState(array());
         if (arrayState != null && arrayState.getState() == EscapeState.Virtual) {