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


>   > 
>   > 	* 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


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