Mercurial > hg > truffle
changeset 19751:34fd3a18f211
Clean up unused methods in schedule phase.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Tue, 10 Mar 2015 15:21:34 +0100 |
parents | b8cab8ce9827 |
children | 15bb034480d7 |
files | graal/com.oracle.graal.phases/src/com/oracle/graal/phases/schedule/SchedulePhase.java |
diffstat | 1 files changed, 0 insertions(+), 43 deletions(-) [+] |
line wrap: on
line diff
--- 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<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, 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 || 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(); - } - } - } }