This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Avoid unnecesary MEM RTXes
- From: Richard Henderson <rth at redhat dot com>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 23 Jan 2004 10:56:19 -0800
- Subject: Re: Avoid unnecesary MEM RTXes
- References: <20040123124849.GQ13170@kam.mff.cuni.cz>
On Fri, Jan 23, 2004 at 01:48:49PM +0100, Jan Hubicka wrote:
> An alternative would be to teach emit-rtl.c code to change memories to
> not produce new copy when nothing changes, but I would rather go via
> abort.
I think the alternative may be better because, as you've shown,
it's easy to mess up. ;-) To wit:
> ! rtx canon = canon_rtx (XEXP (x, 0));
> !
> ! if (canon != XEXP (x, 0))
> ! x = replace_equiv_address_nv (x, canon_rtx (XEXP (x, 0)));
Calling canon_rtx twice.
r~