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: Richard Henderson <rth at cygnus dot com>
- Date: Wed, 8 Mar 2000 09:14:03 -0800
- Cc: Jeffrey A Law <law 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
- References: <10422.952494061@upchuck> <Pine.LNX.4.10.10003080829090.4375-100000@balti.cygnus.co.uk>
On Wed, Mar 08, 2000 at 08:33:01AM +0000, Bernd Schmidt wrote:
> 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.
Yep.
> 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.
Yep.
! /* We allow one special case which happens to work on all machines we
! currently support: a single set with the source being a PLUS of an
! eliminable register and a constant. */
I'd been thinking of allowing it any time you see
(plus (operandN) (operandN+1))
and the second operand is a constant. But this takes care of
the overwhelming majority, so I wouldn't worry about it.
Ok.
Thanks for taking care of this.
r~