changeset 18968:287f269b6c5a

Small simplification in PE closure.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Tue, 27 Jan 2015 13:09:17 +0100
parents 2adb5310a2f5
children 14496953435e
files graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/PartialEscapeClosure.java
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/PartialEscapeClosure.java	Tue Jan 27 12:27:40 2015 +0100
+++ b/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/PartialEscapeClosure.java	Tue Jan 27 13:09:17 2015 +0100
@@ -108,7 +108,7 @@
             return !(node instanceof CommitAllocationNode || node instanceof AllocatedObjectNode || node instanceof BoxNode);
         }
         if (isMarked) {
-            for (ValueNode input : node.inputs().filter(ValueNode.class)) {
+            for (Node input : node.inputs()) {
                 ObjectState obj = getObjectState(state, input);
                 if (obj != null) {
                     VirtualUtil.trace("replacing input %s at %s: %s", input, node, obj);
@@ -213,7 +213,7 @@
         }
     }
 
-    private boolean replaceWithMaterialized(ValueNode value, Node usage, FixedNode materializeBefore, BlockT state, ObjectState obj, GraphEffectList effects, DebugMetric metric) {
+    private boolean replaceWithMaterialized(Node value, Node usage, FixedNode materializeBefore, BlockT state, ObjectState obj, GraphEffectList effects, DebugMetric metric) {
         boolean materialized = ensureMaterialized(state, obj, materializeBefore, effects, metric);
         effects.replaceFirstInput(usage, value, obj.getMaterializedValue());
         return materialized;
@@ -627,8 +627,8 @@
         }
     }
 
-    public ObjectState getObjectState(PartialEscapeBlockState<?> state, ValueNode value) {
-        if (value == null) {
+    public ObjectState getObjectState(PartialEscapeBlockState<?> state, Node value) {
+        if (value == null || value instanceof VirtualState) {
             return null;
         }
         if (value.isAlive() && !aliases.isNew(value)) {