This patch fixes PR bootstrap/57154. Bootstrapped on powerpc64-linux to ensure it fixes the bootstrap problem ...
12 years, 1 month ago
(2013-05-03 16:23:59 UTC)
#1
This patch fixes PR bootstrap/57154.
Bootstrapped on powerpc64-linux to ensure it fixes the bootstrap problem
reported
for that architecture, and also the test case attached to the bug report.
Also bootstrapped and regtested on x86_64-unknown-linux-gnu.
Ok for trunk?
Thanks,
Teresa
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.
Index: sched-rgn.c
===================================================================
--- sched-rgn.c (revision 198532)
+++ sched-rgn.c (working copy)
@@ -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);
--
This patch is available for review at http://codereview.appspot.com/9179043
On 05/03/2013 10:23 AM, Teresa Johnson wrote: > This patch fixes PR bootstrap/57154. > > ...
12 years, 1 month ago
(2013-05-03 16:40:25 UTC)
#2
On 05/03/2013 10:23 AM, Teresa Johnson wrote:
> This patch fixes PR bootstrap/57154.
>
> Bootstrapped on powerpc64-linux to ensure it fixes the bootstrap problem
reported
> for that architecture, and also the test case attached to the bug report.
> Also bootstrapped and regtested on x86_64-unknown-linux-gnu.
>
> Ok for trunk?
>
> Thanks,
> Teresa
>
> 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.
This is fine as it's the standard way to clamp probabilities.
jeff
Issue 9179043: [PATCH] Fix PR bootstrap/57154
Created 12 years, 1 month ago by tejohnson
Modified 10 years, 9 months ago
Reviewers: law_redhat.com
Base URL: svn+ssh://gcc.gnu.org/svn/gcc/trunk/gcc/
Comments: 0