changeset 18941:c943ba97b2a7

Remove class ScheduledNode from the node class hierarchy.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Sat, 24 Jan 2015 00:45:12 +0100
parents 2ad82c6147f1
children 96ec4e5d3292
files graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/GraphScheduleTest.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/NodeLIRBuilder.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/match/MatchContext.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/match/MatchPattern.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/match/MatchStatement.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ScheduledNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ValueNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/NodeLIRBuilderTool.java graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/LoweringPhase.java graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ProfileCompiledMethodsPhase.java graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/ScheduledNodeIterator.java graal/com.oracle.graal.phases/src/com/oracle/graal/phases/schedule/SchedulePhase.java graal/com.oracle.graal.phases/src/com/oracle/graal/phases/util/GraphOrder.java graal/com.oracle.graal.printer/src/com/oracle/graal/printer/BinaryGraphPrinter.java graal/com.oracle.graal.printer/src/com/oracle/graal/printer/CFGPrinter.java graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/SnippetTemplate.java
diffstat 17 files changed, 109 insertions(+), 146 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/GraphScheduleTest.java	Fri Jan 23 22:13:55 2015 +0100
+++ b/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/GraphScheduleTest.java	Sat Jan 24 00:45:12 2015 +0100
@@ -45,7 +45,7 @@
         Block aBlock = nodeToBlock.get(a);
 
         if (bBlock == aBlock) {
-            List<ScheduledNode> instructions = ibp.nodesFor(bBlock);
+            List<ValueNode> instructions = ibp.nodesFor(bBlock);
             Assert.assertTrue(instructions.indexOf(b) > instructions.indexOf(a));
         } else {
             Block block = bBlock;
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java	Fri Jan 23 22:13:55 2015 +0100
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java	Sat Jan 24 00:45:12 2015 +0100
@@ -288,7 +288,7 @@
         }
     }
 
-    private static void emitBlock(NodeLIRBuilderTool nodeLirGen, LIRGenerationResult lirGenRes, Block b, StructuredGraph graph, BlockMap<List<ScheduledNode>> blockMap) {
+    private static void emitBlock(NodeLIRBuilderTool nodeLirGen, LIRGenerationResult lirGenRes, Block b, StructuredGraph graph, BlockMap<List<ValueNode>> blockMap) {
         if (lirGenRes.getLIR().getLIRforBlock(b) == null) {
             for (Block pred : b.getPredecessors()) {
                 if (!b.isLoopHeader() || !pred.isLoopEnd()) {
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/NodeLIRBuilder.java	Fri Jan 23 22:13:55 2015 +0100
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/NodeLIRBuilder.java	Sat Jan 24 00:45:12 2015 +0100
@@ -185,7 +185,7 @@
         gen.append(op);
     }
 
-    public void doBlock(Block block, StructuredGraph graph, BlockMap<List<ScheduledNode>> blockMap) {
+    public void doBlock(Block block, StructuredGraph graph, BlockMap<List<ValueNode>> blockMap) {
         gen.doBlockStart(block);
 
         if (block == gen.getResult().getLIR().getControlFlowGraph().getStartBlock()) {
@@ -195,44 +195,41 @@
             assert block.getPredecessorCount() > 0;
         }
 
-        List<ScheduledNode> nodes = blockMap.get(block);
+        List<ValueNode> nodes = blockMap.get(block);
 
         // Allow NodeLIRBuilder subclass to specialize code generation of any interesting groups
         // of instructions
         matchComplexExpressions(nodes);
 
         for (int i = 0; i < nodes.size(); i++) {
-            Node instr = nodes.get(i);
+            ValueNode valueNode = nodes.get(i);
             if (Options.TraceLIRGeneratorLevel.getValue() >= 3) {
-                TTY.println("LIRGen for " + instr);
+                TTY.println("LIRGen for " + valueNode);
             }
-            if (instr instanceof ValueNode) {
-                ValueNode valueNode = (ValueNode) instr;
-                Value operand = getOperand(valueNode);
-                if (operand == null) {
-                    if (!peephole(valueNode)) {
-                        try {
-                            doRoot((ValueNode) instr);
-                        } catch (GraalInternalError e) {
-                            throw GraalGraphInternalError.transformAndAddContext(e, instr);
-                        } catch (Throwable e) {
-                            throw new GraalGraphInternalError(e).addContext(instr);
-                        }
+            Value operand = getOperand(valueNode);
+            if (operand == null) {
+                if (!peephole(valueNode)) {
+                    try {
+                        doRoot(valueNode);
+                    } catch (GraalInternalError e) {
+                        throw GraalGraphInternalError.transformAndAddContext(e, valueNode);
+                    } catch (Throwable e) {
+                        throw new GraalGraphInternalError(e).addContext(valueNode);
                     }
-                } else if (ComplexMatchValue.INTERIOR_MATCH.equals(operand)) {
-                    // Doesn't need to be evaluated
-                    Debug.log("interior match for %s", valueNode);
-                } else if (operand instanceof ComplexMatchValue) {
-                    Debug.log("complex match for %s", valueNode);
-                    ComplexMatchValue match = (ComplexMatchValue) operand;
-                    operand = match.evaluate(this);
-                    if (operand != null) {
-                        setResult(valueNode, operand);
-                    }
-                } else {
-                    // There can be cases in which the result of an instruction is already set
-                    // before by other instructions.
                 }
+            } else if (ComplexMatchValue.INTERIOR_MATCH.equals(operand)) {
+                // Doesn't need to be evaluated
+                Debug.log("interior match for %s", valueNode);
+            } else if (operand instanceof ComplexMatchValue) {
+                Debug.log("complex match for %s", valueNode);
+                ComplexMatchValue match = (ComplexMatchValue) operand;
+                operand = match.evaluate(this);
+                if (operand != null) {
+                    setResult(valueNode, operand);
+                }
+            } else {
+                // There can be cases in which the result of an instruction is already set
+                // before by other instructions.
             }
         }
 
@@ -253,23 +250,19 @@
         gen.doBlockEnd(block);
     }
 
-    protected void matchComplexExpressions(List<ScheduledNode> nodes) {
+    protected void matchComplexExpressions(List<ValueNode> nodes) {
         if (matchRules != null) {
             try (Scope s = Debug.scope("MatchComplexExpressions")) {
                 if (LogVerbose.getValue()) {
                     int i = 0;
-                    for (ScheduledNode node : nodes) {
+                    for (ValueNode node : nodes) {
                         Debug.log("%d: (%s) %1S", i++, node.usages().count(), node);
                     }
                 }
 
                 // Match the nodes in backwards order to encourage longer matches.
                 for (int index = nodes.size() - 1; index >= 0; index--) {
-                    ScheduledNode snode = nodes.get(index);
-                    if (!(snode instanceof ValueNode)) {
-                        continue;
-                    }
-                    ValueNode node = (ValueNode) snode;
+                    ValueNode node = nodes.get(index);
                     if (getOperand(node) != null) {
                         continue;
                     }
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/match/MatchContext.java	Fri Jan 23 22:13:55 2015 +0100
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/match/MatchContext.java	Sat Jan 24 00:45:12 2015 +0100
@@ -41,7 +41,7 @@
 
     private final ValueNode root;
 
-    private final List<ScheduledNode> nodes;
+    private final List<ValueNode> nodes;
 
     private final MatchStatement rule;
 
@@ -65,7 +65,7 @@
         }
     }
 
-    public MatchContext(NodeLIRBuilder builder, MatchStatement rule, int index, ValueNode node, List<ScheduledNode> nodes) {
+    public MatchContext(NodeLIRBuilder builder, MatchStatement rule, int index, ValueNode node, List<ValueNode> nodes) {
         this.builder = builder;
         this.rule = rule;
         this.root = node;
@@ -99,7 +99,7 @@
     public Result validate() {
         // Ensure that there's no unsafe work in between these operations.
         for (int i = startIndex; i <= endIndex; i++) {
-            ScheduledNode node = nodes.get(i);
+            ValueNode node = nodes.get(i);
             if (node instanceof VirtualObjectNode || node instanceof FloatingNode) {
                 // The order of evaluation of these nodes controlled by data dependence so they
                 // don't interfere with this match.
@@ -108,7 +108,7 @@
                 if (LogVerbose.getValue()) {
                     Debug.log("unexpected node %s", node);
                     for (int j = startIndex; j <= endIndex; j++) {
-                        ScheduledNode theNode = nodes.get(j);
+                        ValueNode theNode = nodes.get(j);
                         Debug.log("%s(%s) %1s", (consumed != null && consumed.contains(theNode) || theNode == root) ? "*" : " ", theNode.usages().count(), theNode);
                     }
                 }
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/match/MatchPattern.java	Fri Jan 23 22:13:55 2015 +0100
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/match/MatchPattern.java	Sat Jan 24 00:45:12 2015 +0100
@@ -50,11 +50,11 @@
     static class Result {
         final MatchResultCode code;
 
-        final ScheduledNode node;
+        final ValueNode node;
 
         final MatchPattern matcher;
 
-        Result(MatchResultCode result, ScheduledNode node, MatchPattern matcher) {
+        Result(MatchResultCode result, ValueNode node, MatchPattern matcher) {
             this.code = result;
             this.node = node;
             this.matcher = matcher;
@@ -90,12 +90,12 @@
             return Debug.isEnabled() ? new Result(MatchResultCode.TOO_MANY_USERS, node, matcher) : CACHED_TOO_MANY_USERS;
         }
 
-        static Result notInBlock(ScheduledNode node, MatchPattern matcher) {
+        static Result notInBlock(ValueNode node, MatchPattern matcher) {
             MatchResult_NOT_IN_BLOCK.increment();
             return Debug.isEnabled() ? new Result(MatchResultCode.NOT_IN_BLOCK, node, matcher) : CACHED_NOT_IN_BLOCK;
         }
 
-        static Result notSafe(ScheduledNode node, MatchPattern matcher) {
+        static Result notSafe(ValueNode node, MatchPattern matcher) {
             MatchResult_NOT_SAFE.increment();
             return Debug.isEnabled() ? new Result(MatchResultCode.NOT_SAFE, node, matcher) : CACHED_NOT_SAFE;
         }
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/match/MatchStatement.java	Fri Jan 23 22:13:55 2015 +0100
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/match/MatchStatement.java	Sat Jan 24 00:45:12 2015 +0100
@@ -80,7 +80,7 @@
      * @return true if the statement matched something and set a {@link ComplexMatchResult} to be
      *         evaluated by the NodeLIRBuilder.
      */
-    public boolean generate(NodeLIRBuilder builder, int index, ValueNode node, List<ScheduledNode> nodes) {
+    public boolean generate(NodeLIRBuilder builder, int index, ValueNode node, List<ValueNode> nodes) {
         assert index == nodes.indexOf(node);
         // Check that the basic shape matches
         Result result = pattern.matchShape(node, this);
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ScheduledNode.java	Fri Jan 23 22:13:55 2015 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2012, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.oracle.graal.nodes;
-
-import com.oracle.graal.graph.*;
-import com.oracle.graal.nodeinfo.*;
-
-@NodeInfo
-public abstract class ScheduledNode extends Node {
-
-    @Override
-    public StructuredGraph graph() {
-        return (StructuredGraph) super.graph();
-    }
-}
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ValueNode.java	Fri Jan 23 22:13:55 2015 +0100
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ValueNode.java	Sat Jan 24 00:45:12 2015 +0100
@@ -32,7 +32,7 @@
  * instructions.
  */
 @NodeInfo
-public abstract class ValueNode extends ScheduledNode implements KindProvider {
+public abstract class ValueNode extends com.oracle.graal.graph.Node implements KindProvider {
 
     /**
      * The kind of this value. This is {@link Kind#Void} for instructions that produce no value.
@@ -52,6 +52,11 @@
         this.stamp = stamp;
     }
 
+    @Override
+    public StructuredGraph graph() {
+        return (StructuredGraph) super.graph();
+    }
+
     /**
      * Checks if the given stamp is different than the current one (
      * {@code newStamp.equals(oldStamp) == false}). If it is different then the new stamp will
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/NodeLIRBuilderTool.java	Fri Jan 23 22:13:55 2015 +0100
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/NodeLIRBuilderTool.java	Sat Jan 24 00:45:12 2015 +0100
@@ -71,5 +71,5 @@
 
     Value[] visitInvokeArguments(CallingConvention cc, Collection<ValueNode> arguments);
 
-    void doBlock(Block block, StructuredGraph graph, BlockMap<List<ScheduledNode>> blockMap);
+    void doBlock(Block block, StructuredGraph graph, BlockMap<List<ValueNode>> blockMap);
 }
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/LoweringPhase.java	Fri Jan 23 22:13:55 2015 +0100
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/LoweringPhase.java	Sat Jan 24 00:45:12 2015 +0100
@@ -301,7 +301,7 @@
             final LoweringToolImpl loweringTool = new LoweringToolImpl(context, startAnchor, activeGuards, b.getBeginNode(), schedule.getCFG());
 
             // Lower the instructions of this block.
-            List<ScheduledNode> nodes = schedule.nodesFor(b);
+            List<ValueNode> nodes = schedule.nodesFor(b);
             for (Node node : nodes) {
 
                 if (node.isDeleted()) {
@@ -368,7 +368,7 @@
             List<Node> unscheduledUsages = new ArrayList<>();
             if (node instanceof FloatingNode) {
                 for (Node usage : node.usages()) {
-                    if (usage instanceof ScheduledNode) {
+                    if (usage instanceof ValueNode) {
                         Block usageBlock = schedule.getCFG().blockFor(usage);
                         if (usageBlock == null) {
                             unscheduledUsages.add(usage);
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ProfileCompiledMethodsPhase.java	Fri Jan 23 22:13:55 2015 +0100
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ProfileCompiledMethodsPhase.java	Sat Jan 24 00:45:12 2015 +0100
@@ -46,8 +46,8 @@
  * a method and at each loop header.
  *
  * A schedule is created so that floating nodes can also be taken into account. The weight of a node
- * is determined heuristically in the
- * {@link ProfileCompiledMethodsPhase#getNodeWeight(ScheduledNode)} method.
+ * is determined heuristically in the {@link ProfileCompiledMethodsPhase#getNodeWeight(ValueNode)}
+ * method.
  *
  * Additionally, there's a second counter that's only increased for code sections without invokes.
  */
@@ -117,14 +117,14 @@
         double count = 0;
         for (Block block : blocks) {
             double blockProbability = probabilities.applyAsDouble(block.getBeginNode());
-            for (ScheduledNode node : schedule.getBlockToNodesMap().get(block)) {
+            for (ValueNode node : schedule.getBlockToNodesMap().get(block)) {
                 count += blockProbability * getNodeWeight(node);
             }
         }
         return count;
     }
 
-    private static double getNodeWeight(ScheduledNode node) {
+    private static double getNodeWeight(ValueNode node) {
         if (node instanceof MergeNode) {
             return ((MergeNode) node).phiPredecessorCount();
         } else if (node instanceof BeginNode || node instanceof AbstractEndNode || node instanceof MonitorIdNode || node instanceof ConstantNode || node instanceof ParameterNode ||
--- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/ScheduledNodeIterator.java	Fri Jan 23 22:13:55 2015 +0100
+++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/ScheduledNodeIterator.java	Sat Jan 24 00:45:12 2015 +0100
@@ -40,7 +40,7 @@
 
     private FixedWithNextNode lastFixed;
     private FixedWithNextNode reconnect;
-    private ListIterator<ScheduledNode> iterator;
+    private ListIterator<ValueNode> iterator;
 
     public void processNodes(Block block, SchedulePhase shedule) {
         lastFixed = block.getBeginNode();
--- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/schedule/SchedulePhase.java	Fri Jan 23 22:13:55 2015 +0100
+++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/schedule/SchedulePhase.java	Sat Jan 24 00:45:12 2015 +0100
@@ -269,7 +269,7 @@
     /**
      * Map from blocks to the nodes in each block.
      */
-    private BlockMap<List<ScheduledNode>> blockToNodesMap;
+    private BlockMap<List<ValueNode>> blockToNodesMap;
     private BlockMap<KillSet> blockToKillSet;
     private final SchedulingStrategy selectedStrategy;
     private final MemoryScheduling memsched;
@@ -383,20 +383,20 @@
     /**
      * Gets the map from each block to the nodes in the block.
      */
-    public BlockMap<List<ScheduledNode>> getBlockToNodesMap() {
+    public BlockMap<List<ValueNode>> getBlockToNodesMap() {
         return blockToNodesMap;
     }
 
     /**
      * Gets the nodes in a given block.
      */
-    public List<ScheduledNode> nodesFor(Block block) {
+    public List<ValueNode> nodesFor(Block block) {
         return blockToNodesMap.get(block);
     }
 
     private void assignBlockToNodes(StructuredGraph graph, SchedulingStrategy strategy) {
         for (Block block : cfg.getBlocks()) {
-            List<ScheduledNode> nodes = new ArrayList<>();
+            List<ValueNode> nodes = new ArrayList<>();
             if (blockToNodesMap.get(block) != null) {
                 throw new SchedulingError();
             }
@@ -407,8 +407,8 @@
         }
 
         for (Node n : graph.getNodes()) {
-            if (n instanceof ScheduledNode) {
-                assignBlockToNode((ScheduledNode) n, strategy);
+            if (n instanceof ValueNode) {
+                assignBlockToNode((ValueNode) n, strategy);
             }
         }
     }
@@ -417,7 +417,7 @@
      * Assigns a block to the given node. This method expects that PhiNodes and FixedNodes are
      * already assigned to a block.
      */
-    private void assignBlockToNode(ScheduledNode node, SchedulingStrategy strategy) {
+    private void assignBlockToNode(ValueNode node, SchedulingStrategy strategy) {
         assert !node.isDeleted();
 
         if (cfg.getNodeToBlock().containsKey(node)) {
@@ -617,7 +617,7 @@
      *
      * @param strategy
      */
-    private Block latestBlock(ScheduledNode node, SchedulingStrategy strategy) {
+    private Block latestBlock(ValueNode node, SchedulingStrategy strategy) {
         CommonDominatorBlockClosure cdbc = new CommonDominatorBlockClosure(null);
         for (Node succ : node.successors().nonNull()) {
             if (cfg.getNodeToBlock().get(succ) == null) {
@@ -747,7 +747,7 @@
      * @param usage the usage whose blocks need to be considered
      * @param closure the closure that will be called for each block
      */
-    private void blocksForUsage(ScheduledNode node, Node usage, BlockClosure closure, SchedulingStrategy strategy) {
+    private void blocksForUsage(ValueNode node, Node usage, BlockClosure closure, SchedulingStrategy strategy) {
         if (node instanceof PhiNode) {
             throw new SchedulingError(node.toString());
         }
@@ -807,20 +807,20 @@
                         throw new SchedulingError(unscheduledUsage.toString());
                     }
                     // Otherwise: Put the input into the same block as the usage.
-                    assignBlockToNode((ScheduledNode) unscheduledUsage, strategy);
+                    assignBlockToNode((ValueNode) unscheduledUsage, strategy);
                     closure.apply(cfg.getNodeToBlock().get(unscheduledUsage));
                 }
             }
         } else {
             // All other types of usages: Put the input into the same block as the usage.
-            assignBlockToNode((ScheduledNode) usage, strategy);
+            assignBlockToNode((ValueNode) usage, strategy);
             closure.apply(cfg.getNodeToBlock().get(usage));
         }
     }
 
     private void ensureScheduledUsages(Node node, SchedulingStrategy strategy) {
-        for (Node usage : node.usages().filter(ScheduledNode.class)) {
-            assignBlockToNode((ScheduledNode) usage, strategy);
+        for (Node usage : node.usages().filter(ValueNode.class)) {
+            assignBlockToNode((ValueNode) usage, strategy);
         }
         // now true usages are ready
     }
@@ -835,8 +835,8 @@
     }
 
     private boolean noDuplicatedNodesInBlock(Block b) {
-        List<ScheduledNode> list = blockToNodesMap.get(b);
-        Set<ScheduledNode> hashset = Node.newSet(list);
+        List<ValueNode> list = blockToNodesMap.get(b);
+        Set<ValueNode> hashset = Node.newSet(list);
         return list.size() == hashset.size();
     }
 
@@ -848,7 +848,7 @@
             throw new SchedulingError();
         }
 
-        List<ScheduledNode> sortedInstructions;
+        List<ValueNode> sortedInstructions;
         switch (strategy) {
             case EARLIEST:
                 sortedInstructions = sortNodesWithinBlockEarliest(b, visited);
@@ -866,9 +866,9 @@
         blockToNodesMap.put(b, sortedInstructions);
     }
 
-    private static List<ScheduledNode> removeProxies(List<ScheduledNode> list) {
-        List<ScheduledNode> result = new ArrayList<>();
-        for (ScheduledNode n : list) {
+    private static List<ValueNode> removeProxies(List<ValueNode> list) {
+        List<ValueNode> result = new ArrayList<>();
+        for (ValueNode n : list) {
             if (!(n instanceof ProxyNode)) {
                 result.add(n);
             }
@@ -876,9 +876,9 @@
         return result;
     }
 
-    private static List<ScheduledNode> filterSchedulableNodes(List<ScheduledNode> list) {
-        List<ScheduledNode> result = new ArrayList<>();
-        for (ScheduledNode n : list) {
+    private static List<ValueNode> filterSchedulableNodes(List<ValueNode> list) {
+        List<ValueNode> result = new ArrayList<>();
+        for (ValueNode n : list) {
             if (!(n instanceof PhiNode)) {
                 result.add(n);
             }
@@ -886,12 +886,12 @@
         return result;
     }
 
-    private static boolean sameOrderForFixedNodes(List<ScheduledNode> fixed, List<ScheduledNode> sorted) {
-        Iterator<ScheduledNode> fixedIterator = fixed.iterator();
-        Iterator<ScheduledNode> sortedIterator = sorted.iterator();
+    private static boolean sameOrderForFixedNodes(List<ValueNode> fixed, List<ValueNode> sorted) {
+        Iterator<ValueNode> fixedIterator = fixed.iterator();
+        Iterator<ValueNode> sortedIterator = sorted.iterator();
 
         while (sortedIterator.hasNext()) {
-            ScheduledNode sortedCurrent = sortedIterator.next();
+            ValueNode sortedCurrent = sortedIterator.next();
             if (sortedCurrent instanceof FixedNode) {
                 if (!(fixedIterator.hasNext() && fixedIterator.next() == sortedCurrent)) {
                     return false;
@@ -912,10 +912,10 @@
         private Block block;
         private NodeBitMap visited;
         private NodeBitMap beforeLastLocation;
-        private List<ScheduledNode> sortedInstructions;
+        private List<ValueNode> sortedInstructions;
         private List<FloatingReadNode> reads;
 
-        SortState(Block block, NodeBitMap visited, NodeBitMap beforeLastLocation, List<ScheduledNode> sortedInstructions) {
+        SortState(Block block, NodeBitMap visited, NodeBitMap beforeLastLocation, List<ValueNode> sortedInstructions) {
             this.block = block;
             this.visited = visited;
             this.beforeLastLocation = beforeLastLocation;
@@ -961,7 +961,7 @@
             return reads.size();
         }
 
-        void removeRead(ScheduledNode i) {
+        void removeRead(ValueNode i) {
             assert reads != null;
             reads.remove(i);
         }
@@ -971,15 +971,15 @@
             return new ArrayList<>(reads);
         }
 
-        List<ScheduledNode> getSortedInstructions() {
+        List<ValueNode> getSortedInstructions() {
             return sortedInstructions;
         }
 
-        boolean containsInstruction(ScheduledNode i) {
+        boolean containsInstruction(ValueNode i) {
             return sortedInstructions.contains(i);
         }
 
-        void addInstruction(ScheduledNode i) {
+        void addInstruction(ValueNode i) {
             sortedInstructions.add(i);
         }
     }
@@ -989,12 +989,12 @@
      * all inputs. This means that a node is added to the list after all its inputs have been
      * processed.
      */
-    private List<ScheduledNode> sortNodesWithinBlockLatest(Block b, NodeBitMap visited, NodeBitMap beforeLastLocation) {
+    private List<ValueNode> sortNodesWithinBlockLatest(Block b, NodeBitMap visited, NodeBitMap beforeLastLocation) {
         SortState state = new SortState(b, visited, beforeLastLocation, new ArrayList<>(blockToNodesMap.get(b).size() + 2));
-        List<ScheduledNode> instructions = blockToNodesMap.get(b);
+        List<ValueNode> instructions = blockToNodesMap.get(b);
 
         if (memsched == MemoryScheduling.OPTIMAL) {
-            for (ScheduledNode i : instructions) {
+            for (ValueNode i : instructions) {
                 if (i instanceof FloatingReadNode) {
                     FloatingReadNode frn = (FloatingReadNode) i;
                     if (!frn.location().getLocationIdentity().isImmutable()) {
@@ -1008,14 +1008,14 @@
             }
         }
 
-        for (ScheduledNode i : instructions) {
+        for (ValueNode i : instructions) {
             addToLatestSorting(i, state);
         }
         assert state.readsSize() == 0 : "not all reads are scheduled";
 
         // Make sure that last node gets really last (i.e. when a frame state successor hangs off
         // it).
-        List<ScheduledNode> sortedInstructions = state.getSortedInstructions();
+        List<ValueNode> sortedInstructions = state.getSortedInstructions();
         Node lastSorted = sortedInstructions.get(sortedInstructions.size() - 1);
         if (lastSorted != b.getEndNode()) {
             int idx = sortedInstructions.indexOf(b.getEndNode());
@@ -1066,13 +1066,13 @@
                 if (input instanceof VirtualState) {
                     addUnscheduledToLatestSorting((VirtualState) input, sortState);
                 } else {
-                    addToLatestSorting((ScheduledNode) input, sortState);
+                    addToLatestSorting((ValueNode) input, sortState);
                 }
             }
         }
     }
 
-    private void addToLatestSorting(ScheduledNode i, SortState state) {
+    private void addToLatestSorting(ValueNode i, SortState state) {
         if (i == null || state.isVisited(i) || cfg.getNodeToBlock().get(i) != state.currentBlock() || i instanceof PhiNode) {
             return;
         }
@@ -1095,7 +1095,7 @@
                 }
             } else {
                 if (!(i instanceof ProxyNode && input instanceof LoopExitNode)) {
-                    addToLatestSorting((ScheduledNode) input, state);
+                    addToLatestSorting((ValueNode) input, state);
                 }
             }
         }
@@ -1112,7 +1112,7 @@
             assert MemoryCheckpoint.TypeAssertion.correctType(i);
         }
 
-        addToLatestSorting((ScheduledNode) i.predecessor(), state);
+        addToLatestSorting((ValueNode) i.predecessor(), state);
         state.markVisited(i);
         addUnscheduledToLatestSorting(stateAfter, state);
 
@@ -1131,15 +1131,15 @@
      * all usages. The resulting list is reversed to create an earliest-possible scheduling of
      * nodes.
      */
-    private List<ScheduledNode> sortNodesWithinBlockEarliest(Block b, NodeBitMap visited) {
-        List<ScheduledNode> sortedInstructions = new ArrayList<>(blockToNodesMap.get(b).size() + 2);
+    private List<ValueNode> sortNodesWithinBlockEarliest(Block b, NodeBitMap visited) {
+        List<ValueNode> sortedInstructions = new ArrayList<>(blockToNodesMap.get(b).size() + 2);
         addToEarliestSorting(b, b.getEndNode(), sortedInstructions, visited);
         Collections.reverse(sortedInstructions);
         return sortedInstructions;
     }
 
-    private void addToEarliestSorting(Block b, ScheduledNode i, List<ScheduledNode> sortedInstructions, NodeBitMap visited) {
-        ScheduledNode instruction = i;
+    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) {
                 return;
@@ -1153,14 +1153,14 @@
                     if (instruction instanceof LoopExitNode && usage instanceof ProxyNode) {
                         // value proxies should be scheduled before the loopexit, not after
                     } else {
-                        addToEarliestSorting(b, (ScheduledNode) usage, sortedInstructions, visited);
+                        addToEarliestSorting(b, (ValueNode) usage, sortedInstructions, visited);
                     }
                 }
             }
 
             if (instruction instanceof BeginNode) {
                 ArrayList<ProxyNode> proxies = (instruction instanceof LoopExitNode) ? new ArrayList<>() : null;
-                for (ScheduledNode inBlock : blockToNodesMap.get(b)) {
+                for (ValueNode inBlock : blockToNodesMap.get(b)) {
                     if (!visited.isMarked(inBlock)) {
                         if (inBlock instanceof ProxyNode) {
                             proxies.add((ProxyNode) inBlock);
@@ -1176,7 +1176,7 @@
                 break;
             } else {
                 sortedInstructions.add(instruction);
-                instruction = (ScheduledNode) instruction.predecessor();
+                instruction = (ValueNode) instruction.predecessor();
             }
         }
     }
--- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/util/GraphOrder.java	Fri Jan 23 22:13:55 2015 +0100
+++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/util/GraphOrder.java	Sat Jan 24 00:45:12 2015 +0100
@@ -148,7 +148,7 @@
 
                 @Override
                 protected NodeBitMap processBlock(final Block block, final NodeBitMap currentState) {
-                    final List<ScheduledNode> list = schedule.getBlockToNodesMap().get(block);
+                    final List<ValueNode> list = schedule.getBlockToNodesMap().get(block);
 
                     /*
                      * A stateAfter is not valid directly after its associated state split, but
@@ -156,7 +156,7 @@
                      * will be checked at the correct position.
                      */
                     FrameState pendingStateAfter = null;
-                    for (final ScheduledNode node : list) {
+                    for (final ValueNode node : list) {
                         FrameState stateAfter = node instanceof StateSplit ? ((StateSplit) node).stateAfter() : null;
                         if (node instanceof FullInfopointNode) {
                             stateAfter = ((FullInfopointNode) node).getState();
--- a/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/BinaryGraphPrinter.java	Fri Jan 23 22:13:55 2015 +0100
+++ b/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/BinaryGraphPrinter.java	Sat Jan 24 00:45:12 2015 +0100
@@ -140,7 +140,7 @@
             }
         }
         ControlFlowGraph cfg = schedule == null ? null : schedule.getCFG();
-        BlockMap<List<ScheduledNode>> blockToNodes = schedule == null ? null : schedule.getBlockToNodesMap();
+        BlockMap<List<ValueNode>> blockToNodes = schedule == null ? null : schedule.getBlockToNodesMap();
         List<Block> blocks = cfg == null ? null : cfg.getBlocks();
         writeNodes(graph);
         writeBlocks(blocks, blockToNodes);
@@ -467,11 +467,11 @@
         }
     }
 
-    private void writeBlocks(List<Block> blocks, BlockMap<List<ScheduledNode>> blockToNodes) throws IOException {
+    private void writeBlocks(List<Block> blocks, BlockMap<List<ValueNode>> blockToNodes) throws IOException {
         if (blocks != null) {
             writeInt(blocks.size());
             for (Block block : blocks) {
-                List<ScheduledNode> nodes = blockToNodes.get(block);
+                List<ValueNode> nodes = blockToNodes.get(block);
                 writeInt(block.getId());
                 writeInt(nodes.size());
                 for (Node node : nodes) {
--- a/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/CFGPrinter.java	Fri Jan 23 22:13:55 2015 +0100
+++ b/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/CFGPrinter.java	Sat Jan 24 00:45:12 2015 +0100
@@ -579,7 +579,7 @@
         printedNodes = null;
     }
 
-    private void printScheduledBlock(Block block, List<ScheduledNode> nodesFor) {
+    private void printScheduledBlock(Block block, List<ValueNode> nodesFor) {
         printBlockProlog(block);
         begin("IR");
         out.println("HIR");
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/SnippetTemplate.java	Fri Jan 23 22:13:55 2015 +0100
+++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/SnippetTemplate.java	Sat Jan 24 00:45:12 2015 +0100
@@ -993,7 +993,7 @@
         }
     };
 
-    private boolean assertSnippetKills(ScheduledNode replacee) {
+    private boolean assertSnippetKills(ValueNode replacee) {
         if (!replacee.graph().isAfterFloatingReadPhase()) {
             // no floating reads yet, ignore locations created while lowering
             return true;