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]

Patch (ver. 2) to improve memrefs_conflist_p ADDRESSOF handling


This patch allows gcc to realize that variables located in the frame
can't conflict with addressof.  This patch passes make bootstrap and
make check on FreeBSD-3.5 x86, IBM AIX 4.3, and Solaris 7 SPARC.

ChangeLog:

Sat Sep  9 07:31:37 EDT 2000  John Wehle  (john@feith.com)

	* alias.c (memrefs_conflict_p): An ADDRESSOF doesn't
	conflict with frame_pointer_rtx.

Enjoy!

-- John Wehle
------------------8<------------------------8<------------------------
*** gcc/alias.c.ORIGINAL	Wed Sep 13 02:30:38 2000
--- gcc/alias.c	Tue Sep 12 14:31:33 2000
*************** memrefs_conflict_p (xsize, x, ysize, y, 
*** 1457,1464 ****
        return memrefs_conflict_p (xsize, x, ysize, XEXP (y, 0), c);
      }
  
!   if (GET_CODE (x) == ADDRESSOF && GET_CODE (y) == ADDRESSOF)
!     return xsize < 0 || ysize < 0;
  
    if (CONSTANT_P (x))
      {
--- 1457,1473 ----
        return memrefs_conflict_p (xsize, x, ysize, XEXP (y, 0), c);
      }
  
!   if (GET_CODE (x) == ADDRESSOF)
!     {
!       if (y == frame_pointer_rtx
! 	  || GET_CODE (y) == ADDRESSOF)
! 	return xsize <= 0 || ysize <= 0;
!     }
!   if (GET_CODE (y) == ADDRESSOF)
!     {
!       if (x == frame_pointer_rtx)
! 	return xsize <= 0 || ysize <= 0;
!     }
  
    if (CONSTANT_P (x))
      {
-------------------------------------------------------------------------
|   Feith Systems  |   Voice: 1-215-646-8000  |  Email: john@feith.com  |
|    John Wehle    |     Fax: 1-215-540-5495  |                         |
-------------------------------------------------------------------------


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