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: Jeffrey A Law <law at cygnus dot com>
- Subject: Re: Avoid redundant add in dreferencing local objects on i386
- From: Bernd Schmidt <bernds at balti dot cygnus dot co dot uk>
- Date: Wed, 8 Mar 2000 08:33:01 +0000 (GMT)
- 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
> >
> > * 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.
As far as I can tell the original register elimination code did the same
thing and did not run into problems related to this. This patch just
re-adds one possible transformation.
If the offset gets out of range, what ought to happen is that we'll
reload it into a register and the insn will turn into an addition of
two regs.
Bernd