Mercurial > hg > graal-compiler
changeset 6433:4bd8711d824a
small fix to tail duplication heuristics
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Tue, 25 Sep 2012 11:29:36 +0200 |
parents | 3638582c26eb |
children | 58d7df6720ff |
files | graal/com.oracle.graal.compiler.phases/src/com/oracle/graal/compiler/phases/TailDuplicationPhase.java |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler.phases/src/com/oracle/graal/compiler/phases/TailDuplicationPhase.java Tue Sep 25 09:10:40 2012 +0200 +++ b/graal/com.oracle.graal.compiler.phases/src/com/oracle/graal/compiler/phases/TailDuplicationPhase.java Tue Sep 25 11:29:36 2012 +0200 @@ -95,8 +95,13 @@ while (current instanceof FixedWithNextNode) { current = ((FixedWithNextNode) current).next(); for (PhiNode phi : improvements) { - if (current.inputs().contains(phi)) { - opportunities++; + for (Node input : current.inputs()) { + if (input == phi) { + opportunities++; + } + if (input.inputs().contains(phi)) { + opportunities++; + } } } }