# HG changeset patch # User Gilles Duboscq # Date 1380209584 -7200 # Node ID bd3441f941f93f74ae642fe48485d61c91719bfd # Parent d72c314260dc32e7103291ef9b6bd015a1d54d75 Use ControlSplitNode and ControlSinkNode in GraphBuilderPhase.isBlockEnd Remove Util.isFixed/isFloating diff -r d72c314260dc -r bd3441f941f9 graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java --- a/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java Thu Sep 26 17:30:19 2013 +0200 +++ b/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java Thu Sep 26 17:33:04 2013 +0200 @@ -50,7 +50,6 @@ import com.oracle.graal.nodes.type.*; import com.oracle.graal.nodes.util.*; import com.oracle.graal.phases.*; -import com.oracle.graal.phases.util.*; /** * The {@code GraphBuilder} class parses the bytecode of a method and builds the IR graph. @@ -1693,20 +1692,7 @@ } private static boolean isBlockEnd(Node n) { - return trueSuccessorCount(n) > 1 || n instanceof ReturnNode || n instanceof UnwindNode || n instanceof DeoptimizeNode; - } - - private static int trueSuccessorCount(Node n) { - if (n == null) { - return 0; - } - int i = 0; - for (Node s : n.successors()) { - if (Util.isFixed(s)) { - i++; - } - } - return i; + return n instanceof ControlSplitNode || n instanceof ControlSinkNode; } private void iterateBytecodesForBlock(Block block) { diff -r d72c314260dc -r bd3441f941f9 graal/com.oracle.graal.phases/src/com/oracle/graal/phases/util/Util.java --- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/util/Util.java Thu Sep 26 17:30:19 2013 +0200 +++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/util/Util.java Thu Sep 26 17:33:04 2013 +0200 @@ -26,9 +26,6 @@ import com.oracle.graal.api.code.*; import com.oracle.graal.debug.*; -import com.oracle.graal.graph.*; -import com.oracle.graal.nodes.*; -import com.oracle.graal.nodes.calc.*; /** * The {@code Util} class contains a motley collection of utility methods used throughout the @@ -319,14 +316,6 @@ return (short) v; } - public static boolean isFixed(Node n) { - return n instanceof FixedNode; - } - - public static boolean isFloating(Node n) { - return n instanceof FloatingNode; - } - /** * Creates an array of integers of length "size", in which each number from 0 to (size - 1) * occurs exactly once. The integers are sorted using the given comparator. This can be used to