[3.3/mainilne] Fix kernel misscopmiilation for hammer

Jan Hubicka jh@suse.cz
Tue Feb 25 22:45:00 GMT 2003


> > On Sat, Feb 22, 2003 at 10:57:05PM +0100, Jan Hubicka wrote:
> > > this patch fixes nasty RTL sharing problem.  The movabs patterns match
> > > operand inside the MEM reference.  When reloading happends the possibly
> > > shared MEM reference is modified in place.
> > 
> > This is incorrect.  MEM can't be shared.
> 
> Apparently it is.  What I've seen it was same as DECL_RTL in the tree.
> Hmm, any idea where global variable RTL is generated?  I guess copy_rtx
> is missing there...
Hmm, I guess problem is that we do not clone constant memory references.
    case MEM:
      /* A MEM is allowed to be shared if its address is constant.

         We used to allow sharing of MEMs which referenced
         virtual_stack_vars_rtx or virtual_incoming_args_rtx, but
         that can lose.  instantiate_virtual_regs will not unshare
         the MEMs, and combine may change the structure of the address
         because it looks safe and profitable in one context, but
         in some other context it creates unrecognizable RTL.  */
      if (CONSTANT_ADDRESS_P (XEXP (x, 0)))
        return x;
> 
> Honza
> > 
> > 
> > r~



More information about the Gcc-patches mailing list