This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: An issue for the SC: horrible documentation quality of GCC
- From: Jan Hubicka <jh at suse dot cz>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: rth at redhat dot com, gcc at gcc dot gnu dot org
- Date: Sat, 10 May 2003 00:19:46 +0200
- Subject: Re: An issue for the SC: horrible documentation quality of GCC
- References: <10305092141.AA19446@vlsi1.ultra.nyu.edu>
> Because cse.c is too slow. It cannot be used for code cleanup
> within another pass. Compilation time being high on everyone's
> minds, I think this is an exceedingly good reason to have two
> passes.
>
> Fair enough, but it would seem that all it has to do is to add a
> REG_EQUAL note to accomplish its inter-pass purposes and then let CSE
> decide whether the zero or a register is best.
This would not work for the copy propagation (as we need to remove the
reference to the register in order to get dead code removed).
For constant propagation this scheme would work I guess. It came in
with the original gcse checkin in 97 (about the time I started to get
interested in GCC) and in fact I've added the code to add REG_EQUAL
notes in order to get it working in more complicated situations. (where
the actual replacement is not possible - old code just gave up). I
never tried the more radical approach of killing the replacement code
entirely.
Can you do some benchmarking on ROMP? I was worried about that when I
was adding the local coprop pass (that don't introduce the problem just
make it worse) and i did evaulation on SPARC (maybe MIPS, don't remember
exactly) and the code produced was faster and shorter on the average so
I concluded that this should be mostly safe. When the constant is
expensive, it usually means that it needs to be loaded to the register
always and then the pattern should refuse immediate operand. Perhaps
ROMP is different.
Honza