Mercurial > hg > graal-jvmci-8
changeset 11837:bd3441f941f9
Use ControlSplitNode and ControlSinkNode in GraphBuilderPhase.isBlockEnd
Remove Util.isFixed/isFloating
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Thu, 26 Sep 2013 17:33:04 +0200 |
parents | d72c314260dc |
children | 16d0eb40d31c |
files | graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java graal/com.oracle.graal.phases/src/com/oracle/graal/phases/util/Util.java |
diffstat | 2 files changed, 1 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- 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) {
--- 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