Mercurial > hg > graal-compiler
changeset 10036:5260095a574b
Fixed probability computation for invokes with an exception edge.
author | Christian Haeubl <haeubl@ssw.jku.at> |
---|---|
date | Fri, 14 Jun 2013 09:28:07 +0200 |
parents | 0c717bcb2988 |
children | 91b9c3f0100a |
files | graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/ComputeProbabilityClosure.java |
diffstat | 1 files changed, 5 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/ComputeProbabilityClosure.java Thu Jun 13 14:47:32 2013 +0200 +++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/ComputeProbabilityClosure.java Fri Jun 14 09:28:07 2013 +0200 @@ -45,7 +45,6 @@ * <li>{@link PropagateLoopFrequency} propagates the loop frequencies and multiplies each * {@link FixedNode}'s probability with its loop frequency.</li> * </ol> - * TODO: add exception probability information to Invokes */ public class ComputeProbabilityClosure { @@ -291,19 +290,11 @@ public void afterSplit(AbstractBeginNode node) { assert node.predecessor() != null; Node pred = node.predecessor(); - if (pred instanceof Invoke) { - Invoke x = (Invoke) pred; - if (x.next() != node) { - probability = 0; - } - } else { - assert pred instanceof ControlSplitNode; - ControlSplitNode x = (ControlSplitNode) pred; - double nodeProbability = x.probability(node); - assert nodeProbability >= 0.0 : "Node " + x + " provided negative probability for begin " + node + ": " + nodeProbability; - probability *= nodeProbability; - assert probability >= 0.0; - } + ControlSplitNode x = (ControlSplitNode) pred; + double nodeProbability = x.probability(node); + assert nodeProbability >= 0.0 : "Node " + x + " provided negative probability for begin " + node + ": " + nodeProbability; + probability *= nodeProbability; + assert probability >= 0.0; } }