This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Avoid redundant add in dreferencing local objects on i386
- To: Bernd Schmidt <bernds at balti dot cygnus dot co dot uk>
- Subject: Re: Avoid redundant add in dreferencing local objects on i386
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Tue, 07 Mar 2000 22:41:01 -0700
- cc: Richard Henderson <rth at cygnus dot com>, Jan Hubicka <hubicka at atrey dot karlin dot mff dot cuni dot cz>, egcs-patches at egcs dot cygnus dot com
- Reply-To: law at cygnus dot com
In message <Pine.LNX.4.10.10003061249480.9963-100000@balti.cygnus.co.uk>you w
rite:
> On Mon, 28 Feb 2000, Richard Henderson wrote:
>
> > On Mon, Feb 28, 2000 at 02:48:12PM +0100, Jan Hubicka wrote:
> > > * i386.md: New peep2s to avoid redundant add in frame pointer
> > > dereferencing.
> >
> > I'd rather fix this in reload. It's been annoying me since
> > Bernd reorganized elimination.
>
> Like this?
>
> Bernd
>
> * reload1.c (eliminate_regs_in_insn): Handle additions of eliminable
> register and a constant specially.
Yes. This looks good to me. My only concern is what happens if the new
offset is greater than the old offset and as a result creates an invalid
insn because the larger offset.
Maybe some other code takes care of this, maybe not. We should find out
before installing this patch.
jeff