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]

fix kennerism


This change

Sat Dec 29 15:48:54 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

        * integrate.c (copy_rtx_and_substitute, case MEM): Likewise, but use
        replace_equiv_address_nv.

may have been bootstrapped on alphaev56-osf4.0c, but it sure wasn't
regression tested.  Or if "make check" was run, the results weren't
examined.  This causes 47 C regressions on alphaev56-linux, and may
be the reason libjava won't build (I've not gotten that far yet).

The issue is that if the old and new address are the same 
replace_equiv_address_nv will return the original MEM.  Which
results in shared rtx problems.  The original code unconditionally
created a new MEM, though why it used rtx_alloc and PUT_MODE, I
have no idea.


r~


        * integrate.c (copy_rtx_and_substitute): Fix error last change:
        we need to unconditionally create a new mem.

Index: integrate.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/integrate.c,v
retrieving revision 1.179
diff -c -p -d -r1.179 integrate.c
*** integrate.c	2001/12/29 21:35:02	1.179
--- integrate.c	2001/12/30 17:58:35
*************** copy_rtx_and_substitute (orig, map, for_
*** 2263,2271 ****
  	  return validize_mem (force_const_mem (const_mode, constant));
  	}
  
!      copy = replace_equiv_address_nv (orig,
! 				      copy_rtx_and_substitute (XEXP (orig, 0),
! 							       map, 0));
  
        /* If inlining and this is not for the LHS, turn off RTX_UNCHANGING_P
  	 since this may be an indirect reference to a parameter and the
--- 2263,2271 ----
  	  return validize_mem (force_const_mem (const_mode, constant));
  	}
  
!       copy = gen_rtx_MEM (mode, copy_rtx_and_substitute (XEXP (orig, 0),
! 							 map, 0));
!       MEM_COPY_ATTRIBUTES (copy, orig);
  
        /* If inlining and this is not for the LHS, turn off RTX_UNCHANGING_P
  	 since this may be an indirect reference to a parameter and the


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