Avoid unnecesary MEM RTXes

Jan Hubicka jh@suse.cz
Mon Jan 26 15:16:00 GMT 2004


> On Fri, Jan 23, 2004 at 11:18:53AM -0800, Richard Henderson wrote:
> > On Fri, Jan 23, 2004 at 08:00:54PM +0100, Jan Hubicka wrote:
> > > Would be possible to consider the trivial change in emit-rtl preapproved
> > > if it passes?
> > 
> > Yes.
> 
> Is following change ok?
> Previously, mem = change_address (mem, VOIDmode, XEXP (mem, 0));
> changed mem to loose offset/alignment information, now it will be a nop.
> I'm now looking into the IA-32 stringops and this is something I need to do
> there if the count is not constant.  I thought calling get_mem_attrs
> directly was supposed to be avoided.

Perhaps we can invent new function doing that, like
clear_memory_attributes, or clear_memory_alignment to do what you need?

Honza



More information about the Gcc-patches mailing list