Mercurial > hg > graal-compiler
changeset 19901:c5c1c2de3cb8
Fix another bug in the new scheduler found by the new verification phase.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Tue, 17 Mar 2015 17:13:25 +0100 |
parents | b1a15754f63e |
children | d66d53b6b73c |
files | graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/cfg/Block.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/cfg/HIRLoop.java |
diffstat | 2 files changed, 16 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/cfg/Block.java Tue Mar 17 17:12:47 2015 +0100 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/cfg/Block.java Tue Mar 17 17:13:25 2015 +0100 @@ -237,15 +237,21 @@ if (this.killLocationsBetweenThisAndDominator == null) { LocationSet dominatorResult = new LocationSet(); Block stopBlock = getDominator(); - for (Block b : this.getPredecessors()) { - if (b != stopBlock && (!this.isLoopHeader() || b.getLoopDepth() < this.getLoopDepth())) { - dominatorResult.addAll(b.getKillLocations()); - if (dominatorResult.isAny()) { - break; - } - b.calcKillLocationsBetweenThisAndTarget(dominatorResult, stopBlock); - if (dominatorResult.isAny()) { - break; + if (this.isLoopHeader()) { + assert stopBlock.getLoopDepth() < this.getLoopDepth(); + dominatorResult.addAll(((HIRLoop) this.getLoop()).getKillLocations()); + } else { + for (Block b : this.getPredecessors()) { + assert !this.isLoopHeader(); + if (b != stopBlock) { + dominatorResult.addAll(b.getKillLocations()); + if (dominatorResult.isAny()) { + break; + } + b.calcKillLocationsBetweenThisAndTarget(dominatorResult, stopBlock); + if (dominatorResult.isAny()) { + break; + } } } }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/cfg/HIRLoop.java Tue Mar 17 17:12:47 2015 +0100 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/cfg/HIRLoop.java Tue Mar 17 17:13:25 2015 +0100 @@ -39,7 +39,7 @@ return ((LoopBeginNode) getHeader().getBeginNode()).loopEnds().count(); } - private LocationSet getKillLocations() { + public LocationSet getKillLocations() { if (killLocations == null) { killLocations = new LocationSet(); for (Block b : this.getBlocks()) {