This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] for Re: REG_FREQ
- From: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: gcc at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Fri, 20 Dec 2002 02:16:41 +0100
- Subject: [PATCH] for Re: REG_FREQ
- References: <20021219155414.GA3066@atrey.karlin.mff.cuni.cz> <20021219231554.GG23391@kam.mff.cuni.cz>
Hello,
> > I have noticed that REG_FREQ is not zeroed anywhere; it means that
> > frequencies are just accumulating into it during multiple calls to
> > recompute_reg_usage. Is that intentional? I so, what is the rationale?
>
> No, it is not intentional nor rational. Please just zero it out.
> I wonder why it works quite well as it is :))
OK, commited as obvious.
Zdenek
Changelog:
* flow.c (allocate_reg_life_data): Reset REG_FREQ.
Index: flow.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/flow.c,v
retrieving revision 1.542
diff -c -3 -p -r1.542 flow.c
*** flow.c 16 Dec 2002 18:19:27 -0000 1.542
--- flow.c 20 Dec 2002 00:48:49 -0000
*************** allocate_reg_life_data ()
*** 1529,1534 ****
--- 1529,1535 ----
REG_N_DEATHS (i) = 0;
REG_N_CALLS_CROSSED (i) = 0;
REG_LIVE_LENGTH (i) = 0;
+ REG_FREQ (i) = 0;
REG_BASIC_BLOCK (i) = REG_BLOCK_UNKNOWN;
}
}