re PR bootstrap/57154 (Bootstrap broken for powerpc64-unknown-linux-gnu)
authorTeresa Johnson <tejohnson@google.com>
Fri, 3 May 2013 16:48:24 +0000 (16:48 +0000)
committerTeresa Johnson <tejohnson@gcc.gnu.org>
Fri, 3 May 2013 16:48:24 +0000 (16:48 +0000)
2013-05-03  Teresa Johnson  <tejohnson@google.com>

PR bootstrap/57154
* sched-rgn.c (compute_dom_prob_ps): Ensure accumulated probabilities
do not exceed REG_BR_PROB_BASE.

From-SVN: r198584

gcc/ChangeLog
gcc/sched-rgn.c

index e0ddef9f8aedd697d1962d58f0e1731571bbf9d7..616db86615ab804496d30160fb1e8cad76b60389 100644 (file)
@@ -1,3 +1,9 @@
+2013-05-03  Teresa Johnson  <tejohnson@google.com>
+
+       PR bootstrap/57154
+       * sched-rgn.c (compute_dom_prob_ps): Ensure accumulated probabilities
+       do not exceed REG_BR_PROB_BASE.
+
 2013-05-03  Jeff Law  <law@redhat.com>
 
        PR tree-optimization/57144
index 3f5b4ba178b0e9cf5f25e752d4976a013f81a4da..2c971e2a99939bb902dc053cd51926ddc98ab203 100644 (file)
@@ -1442,6 +1442,12 @@ compute_dom_prob_ps (int bb)
        bitmap_set_bit (pot_split[bb], EDGE_TO_BIT (out_edge));
 
       prob[bb] += combine_probabilities (prob[pred_bb], in_edge->probability);
+      // The rounding divide in combine_probabilities can result in an extra
+      // probability increment propagating along 50-50 edges. Eventually when
+      // the edges re-merge, the accumulated probability can go slightly above
+      // REG_BR_PROB_BASE.
+      if (prob[bb] > REG_BR_PROB_BASE)
+        prob[bb] = REG_BR_PROB_BASE;
     }
 
   bitmap_set_bit (dom[bb], bb);