This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: dead code in loop.c:insert_loop_mem
- To: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Subject: Re: dead code in loop.c:insert_loop_mem
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Fri, 21 Jan 2000 01:19:00 -0700
- cc: Joern Rennecke <amylaar at pasanda dot cygnus dot co dot uk>, gcc at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
In message <200001210811.IAA14061@phal.cygnus.co.uk>you write:
> > I don't think it's really dead code -- I think the call to rtx_equal_p sh
> ould
> > be comparing XEXP (m, 0) and XEXP (loop_mems[i].mem, 0) instead of the
> > MEM itself. That would make the code and comments consistent. It also m
> akes
> > perfect sense. If we are presented with the two addresses:
> >
> > (mem:SI (symbol_ref "foo"))
> > (mem:HI (symbol_ref "foo"))
> >
> > We do not want to try and optimize such memory references within a loop.
>
> But what about big / little endian differences? You might see the
> above for little endian, while on big endian you see:
>
> (mem:SI (symbol_ref "foo"))
> (mem:HI (const:SI (plus:SI (symbol_ref "foo") (const_int 2))))
I would expect it to be caught later when we test true_dependence while
walking down the memory list for the loop.
jeff