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]
Other format: [Raw text]

Re: [patch] Store motion rewrite


Hello,

> On Wed, Apr 02, 2003 at 12:53:08AM +0200, Zdenek Dvorak wrote:
> > !       /* But even a const call reads its parameters.  Check whether the
> > ! 	 base of some of registers used in mem is stack pointer.  */
> > !       for (reg = x_regs; reg; reg = XEXP (reg, 1))
> > ! 	{
> > ! 	  base = find_base_term (reg);
> > ! 	  if (!base
> > ! 	      || (GET_CODE (base) == ADDRESS
> > ! 		  && GET_MODE (base) == Pmode
> > ! 		  && XEXP (base, 0) == stack_pointer_rtx))
> > ! 	    return true;
> 
> Are we 100% certain that all such addresses can be so identified?
> That is, at no point are such temporary registers reused (and thus
> have no function invariant base)?

I don't know -- someone better informed than me about alias analysis?

> I'd rather we be conservatively correct and do
> 
> 	if (base
> 	    && !(GET_CODE (base) == ADDRESS
> 	          && GET_MODE (base) == Pmode
> 	          && XEXP (base, 0) == stack_pointer_rtx))
> 	  return true;

how is this supposed to work???

Zdenek


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