This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Avoid redundant add in dreferencing local objects on i386


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~

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]