# HG changeset patch # User Christian Haeubl # Date 1371194887 -7200 # Node ID 5260095a574b5150f43fab462b0a55f184c4fa12 # Parent 0c717bcb298841883f30d85b4f0a2ea0cb204120 Fixed probability computation for invokes with an exception edge. diff -r 0c717bcb2988 -r 5260095a574b graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/ComputeProbabilityClosure.java --- 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 @@ *
  • {@link PropagateLoopFrequency} propagates the loop frequencies and multiplies each * {@link FixedNode}'s probability with its loop frequency.
  • * - * 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; } }