This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC -- update_equiv_regs and friends
- To: john at feith dot com (John Wehle)
- Subject: Re: RFC -- update_equiv_regs and friends
- From: Joern Rennecke <amylaar at cambridge dot redhat dot com>
- Date: Fri, 2 Mar 2001 03:07:06 +0000 (GMT)
- Cc: rth at redhat dot com, amylaar at redhat dot com, law at redhat dot com,gcc at gcc dot gnu dot org
>
> > On Fri, Mar 02, 2001 at 02:36:08AM +0000, Joern Rennecke wrote:
> > > > 2) Change update_equiv_regs so it doesn't promote a REG_EQUAL note
> > > > to a REG_EQUIV if there's a register mentioned.
> > >
> > > Promoting REG_EQUAL to REG_EQUIV is an important optimization for some
> > > procesors for sums involving the stack pointer, the frame pointer,
> > > virtual_stack_var_rtx and the argument pointer.
> >
> > I think he meant "pseudo register mentioned", which is what
> > Jeff had being talking about.
>
> You're very kind. :-) Actually I was taking the viewpoint that
> promoting a REG_EQUAL which mentions hard registers (other than
> FIXED_REGISTERs) will probably have the same reload problem that
> Jeff mentioned.
The frame pointer is typically not fixed. Note that a register with the
same hard reg number and mode as frame_pointer_rtx is still not the same
as frame_pointer_rtx unless the pointer is the same. So the hard reg
number doesn't have enough information.
function_invariant_p handled this just fine. Why did you switch to
! rtx_varies_p ?