[tree-ssa] Fix minor branch prediction bug II
Jan Hubicka
jh@suse.cz
Sat Apr 17 23:44:00 GMT 2004
Hi,
This patch fix small pasto in the combine_predictions_for_bb. Will
install it as obvious to tree-ssa once testing pass.
Bootstrapped/regtested tree-profilng branch.
Honza
2004-04-18 Jan Hubicka <jh@suse.cz>
* predict.c (combine_predictions_for_bb): Fix pasto.
Index: predict.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/predict.c,v
retrieving revision 1.71.2.18.2.6
diff -c -3 -p -r1.71.2.18.2.6 predict.c
*** predict.c 4 Apr 2004 12:23:47 -0000 1.71.2.18.2.6
--- predict.c 17 Apr 2004 18:20:02 -0000
*************** combine_predictions_for_bb (FILE *file,
*** 431,437 ****
edge e, first = NULL, second = NULL;
for (e = bb->succ; e; e = e->succ_next)
! if (!(bb->succ->flags & EDGE_EH))
{
nedges ++;
if (first && !second)
--- 430,436 ----
edge e, first = NULL, second = NULL;
for (e = bb->succ; e; e = e->succ_next)
! if (!(e->flags & (EDGE_EH | EDGE_FAKE)))
{
nedges ++;
if (first && !second)
*************** combine_predictions_for_bb (FILE *file,
*** 449,459 ****
if (nedges != 2)
{
for (e = bb->succ; e; e = e->succ_next)
! if (!(bb->succ->flags & EDGE_EH))
e->probability = (REG_BR_PROB_BASE + nedges / 2) / nedges;
else
e->probability = 0;
bb_ann (bb)->predictions = NULL;
return;
}
--- 448,461 ----
if (nedges != 2)
{
for (e = bb->succ; e; e = e->succ_next)
! if (!(e->flags & (EDGE_EH | EDGE_FAKE)))
e->probability = (REG_BR_PROB_BASE + nedges / 2) / nedges;
else
e->probability = 0;
bb_ann (bb)->predictions = NULL;
+ if (file)
+ fprintf (file, "%i edges in bb %i predicted to even probabilities\n",
+ nedges, bb->index);
return;
}
More information about the Gcc-patches
mailing list