# HG changeset patch # User Thomas Wuerthinger # Date 1425213383 -3600 # Node ID aed19d655de9f61515120c398e1ce9fa2a0380ca # Parent 10a1fc5e32090a6a793b64149d6f2fdf6c8c0c28 Remove dead code in schedule phase. diff -r 10a1fc5e3209 -r aed19d655de9 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 Sat Feb 28 15:52:13 2015 -0800 +++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/schedule/SchedulePhase.java Sun Mar 01 13:36:23 2015 +0100 @@ -982,25 +982,8 @@ List sortedInstructions = state.getSortedInstructions(); Node lastSorted = sortedInstructions.get(sortedInstructions.size() - 1); if (lastSorted != b.getEndNode()) { - int idx = sortedInstructions.indexOf(b.getEndNode()); - boolean canNotMove = false; - for (int i = idx + 1; i < sortedInstructions.size(); i++) { - if (sortedInstructions.get(i).inputs().contains(b.getEndNode())) { - canNotMove = true; - break; - } - } - if (canNotMove) { - if (b.getEndNode() instanceof ControlSplitNode) { - throw new GraalGraphInternalError("Schedule is not possible : needs to move a node after the last node of the block which can not be move").addContext(lastSorted).addContext( - b.getEndNode()); - } - - // b.setLastNode(lastSorted); - } else { - sortedInstructions.remove(b.getEndNode()); - sortedInstructions.add(b.getEndNode()); - } + sortedInstructions.remove(b.getEndNode()); + sortedInstructions.add(b.getEndNode()); } return sortedInstructions; }