Mercurial > hg > graal-compiler
diff graal/GraalCompiler/src/com/oracle/max/graal/schedule/Schedule.java @ 2838:adc4b3ec0a8c
Deleted LIR critical edge splitter and replaced with GraalIR edge splitter using Anchor nodes (=> simpler).
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Tue, 31 May 2011 15:17:55 +0200 |
parents | 1cd59ca9ac86 |
children | c061a6be3728 7f14e6b48a9c |
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/oracle/max/graal/schedule/Schedule.java Tue May 31 13:42:01 2011 +0200 +++ b/graal/GraalCompiler/src/com/oracle/max/graal/schedule/Schedule.java Tue May 31 15:17:55 2011 +0200 @@ -432,6 +432,9 @@ } public static int trueSuccessorCount(Node n) { + if (n == null) { + return 0; + } int i = 0; for (Node s : n.successors()) { if (isCFG(s)) { @@ -440,4 +443,21 @@ } return i; } + + public static int truePredecessorCount(Node n) { + if (n == null) { + return 0; + } + int i = 0; + for (Node s : n.predecessors()) { + if (isCFG(s)) { + i++; + } + } + + if (n instanceof LoopBegin) { + i++; + } + return i; + } }