This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Avoid unnecesary MEM RTXes


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]