This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[mainline/profiling-branch] Fix small bug in predict.c
- From: Jan Hubicka <jh at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 18 Mar 2004 16:03:50 +0100
- Subject: [mainline/profiling-branch] Fix small bug in predict.c
Hi,
this bug cause EXIT_BLOCK_PTR to have always frequency of 0.
I've bootstrapped/regtested i686-pc-gnu-linux and installed it to
mainline and tree-profiling branch as obvious.
Honza
2004-03-18 Jan Hubicka <jh@suse.cz>
* predict.c (propagate_freq): Compute correctly frequency of
EXIT_BLOCK.
Index: predict.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/predict.c,v
retrieving revision 1.71.2.18.2.1
diff -c -3 -p -r1.71.2.18.2.1 predict.c
*** predict.c 3 Mar 2004 14:18:08 -0000 1.71.2.18.2.1
--- predict.c 18 Mar 2004 11:58:16 -0000
*************** propagate_freq (struct loop *loop)
*** 1262,1268 ****
/* For each basic block we need to visit count number of his predecessors
we need to visit first. */
! FOR_EACH_BB (bb)
{
if (BLOCK_INFO (bb)->tovisit)
{
--- 1262,1268 ----
/* For each basic block we need to visit count number of his predecessors
we need to visit first. */
! FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
{
if (BLOCK_INFO (bb)->tovisit)
{