# HG changeset patch # User Thomas Wuerthinger # Date 1425997294 -3600 # Node ID 34fd3a18f211a35d6bf40aa232f76a81e3d4f56a # Parent b8cab8ce9827188c89a20e69f6476a187259b2af Clean up unused methods in schedule phase. diff -r b8cab8ce9827 -r 34fd3a18f211 graal/com.oracle.graal.phases/src/com/oracle/graal/phases/schedule/SchedulePhase.java --- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/schedule/SchedulePhase.java Tue Mar 10 15:20:13 2015 +0100 +++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/schedule/SchedulePhase.java Tue Mar 10 15:21:34 2015 +0100 @@ -1231,47 +1231,4 @@ } } } - - /** - * Sorts the nodes within a block by adding the nodes to a list in a post-order iteration over - * all usages. The resulting list is reversed to create an earliest-possible scheduling of - * nodes. - */ - private List sortNodesWithinBlockEarliest(Block b, NodeBitMap visited) { - List sortedInstructions = new ArrayList<>(blockToNodesMap.get(b).size() + 2); - addToEarliestSorting(b, b.getEndNode(), sortedInstructions, visited); - Collections.reverse(sortedInstructions); - return sortedInstructions; - } - - private void addToEarliestSorting(Block b, ValueNode i, List sortedInstructions, NodeBitMap visited) { - ValueNode instruction = i; - while (true) { - if (instruction == null || visited.isMarked(instruction) || cfg.getNodeToBlock().get(instruction) != b || instruction instanceof PhiNode || instruction instanceof ProxyNode) { - return; - } - - visited.mark(instruction); - for (Node usage : instruction.usages()) { - if (usage instanceof VirtualState) { - // only fixed nodes can have VirtualState -> no need to schedule them - } else { - addToEarliestSorting(b, (ValueNode) usage, sortedInstructions, visited); - } - } - - if (instruction instanceof AbstractBeginNode) { - for (ValueNode inBlock : blockToNodesMap.get(b)) { - if (!visited.isMarked(inBlock)) { - addToEarliestSorting(b, inBlock, sortedInstructions, visited); - } - } - sortedInstructions.add(instruction); - break; - } else { - sortedInstructions.add(instruction); - instruction = (ValueNode) instruction.predecessor(); - } - } - } }