Mercurial > hg > graal-compiler
changeset 3135:f5c607fb850d
Fix bug in peeling in updating the parent loops after peeling. Added verify to If
author | Gilles Duboscq <gilles.duboscq@oracle.com> |
---|---|
date | Sun, 03 Jul 2011 11:05:05 +0200 |
parents | 4b63eb1197ca |
children | 2def3cad2e00 9bb94b82f264 |
files | graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/If.java graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/util/LoopUtil.java |
diffstat | 2 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/If.java Sat Jul 02 02:46:04 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/If.java Sun Jul 03 11:05:05 2011 +0200 @@ -96,6 +96,14 @@ } @Override + public boolean verify() { + assertTrue(compare() != null); + assertTrue(trueSuccessor() != null); + assertTrue(falseSuccessor() != null); + return true; + } + + @Override public void print(LogStream out) { out.print("if "). print(compare()).
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/util/LoopUtil.java Sat Jul 02 02:46:04 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/util/LoopUtil.java Sun Jul 03 11:05:05 2011 +0200 @@ -264,7 +264,7 @@ System.out.println(" - " + entry.getKey() + " -> " + entry.getValue()); } System.out.println(" Exits :"); - for (Entry<Node, Placeholder> entry : peeling.exits.entries()) { + for (Entry<Node, StateSplit> entry : peeling.exits.entries()) { System.out.println(" - " + entry.getKey() + " -> " + entry.getValue()); } System.out.println(" PhiInits :"); @@ -282,7 +282,7 @@ // update parents Loop parent = loop.parent(); while (parent != null) { - parent.nodes = computeLoopNodes(loop.loopBegin); + parent.nodes = computeLoopNodes(parent.loopBegin); parent.exits = computeLoopExits(parent.loopBegin, parent.nodes); parent = parent.parent; }