changeset 19007:84bf57a0ddcb

Remove ValueProxy nodes from schedule lists.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Wed, 28 Jan 2015 12:14:03 +0100
parents c6b2677bcbef
children f1b9a421ebd8
files graal/com.oracle.graal.phases/src/com/oracle/graal/phases/schedule/SchedulePhase.java
diffstat 1 files changed, 4 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/schedule/SchedulePhase.java	Wed Jan 28 12:05:41 2015 +0100
+++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/schedule/SchedulePhase.java	Wed Jan 28 12:14:03 2015 +0100
@@ -1068,7 +1068,7 @@
     }
 
     private void addToLatestSorting(ValueNode i, SortState state) {
-        if (i == null || state.isVisited(i) || cfg.getNodeToBlock().get(i) != state.currentBlock() || i instanceof PhiNode) {
+        if (i == null || state.isVisited(i) || cfg.getNodeToBlock().get(i) != state.currentBlock() || i instanceof PhiNode || i instanceof ProxyNode) {
             return;
         }
 
@@ -1083,9 +1083,7 @@
                     addUnscheduledToLatestSorting((FrameState) input, state);
                 }
             } else {
-                if (!(i instanceof ProxyNode && input instanceof LoopExitNode)) {
-                    addToLatestSorting((ValueNode) input, state);
-                }
+                addToLatestSorting((ValueNode) input, state);
             }
         }
 
@@ -1130,7 +1128,7 @@
     private void addToEarliestSorting(Block b, ValueNode i, List<ValueNode> sortedInstructions, NodeBitMap visited) {
         ValueNode instruction = i;
         while (true) {
-            if (instruction == null || visited.isMarked(instruction) || cfg.getNodeToBlock().get(instruction) != b || instruction instanceof PhiNode) {
+            if (instruction == null || visited.isMarked(instruction) || cfg.getNodeToBlock().get(instruction) != b || instruction instanceof PhiNode || instruction instanceof ProxyNode) {
                 return;
             }
 
@@ -1139,11 +1137,7 @@
                 if (usage instanceof VirtualState) {
                     // only fixed nodes can have VirtualState -> no need to schedule them
                 } else {
-                    if (instruction instanceof LoopExitNode && usage instanceof ProxyNode) {
-                        // value proxies should be scheduled before the loopexit, not after
-                    } else {
-                        addToEarliestSorting(b, (ValueNode) usage, sortedInstructions, visited);
-                    }
+                    addToEarliestSorting(b, (ValueNode) usage, sortedInstructions, visited);
                 }
             }