regclass.c (reg_scan_mark_refs): Be more selective about when we mark a register...
authorJeffrey A Law <law@cygnus.com>
Thu, 26 Mar 1998 23:51:11 +0000 (23:51 +0000)
committerJeff Law <law@gcc.gnu.org>
Thu, 26 Mar 1998 23:51:11 +0000 (16:51 -0700)
        * regclass.c (reg_scan_mark_refs): Be more selective about
        when we mark a register with REGNO_POINTER_FLAG.

From-SVN: r18849

gcc/ChangeLog
gcc/regclass.c

index a86f834ee33e0b995a05684fc2a4d8be6e5d0206..54a1c3e40e0635db99890894896365daf3ebfc67 100644 (file)
@@ -1,3 +1,8 @@
+Fri Mar 27 00:49:46 1998  Jeffrey A Law  (law@cygnus.com)
+
+       * regclass.c (reg_scan_mark_refs): Be more selective about
+       when we mark a register with REGNO_POINTER_FLAG.
+
 Thu Mar 26 23:00:11 1998  J"orn Rennecke <amylaar@cygnus.co.uk>
 
        reload inheritance improvement:
index 396222b7192c38e1fa3502812cccc0f499d9d10a..e964e99a82c03d8e950aafb68e912f2b61bca36a 100644 (file)
@@ -1919,6 +1919,12 @@ reg_scan_mark_refs (x, insn, note_flag)
 
       if (GET_CODE (SET_DEST (x)) == REG
          && REGNO (SET_DEST (x)) >= FIRST_PSEUDO_REGISTER
+         /* If the destination pseudo is set more than once, then other
+            sets might not be to a pointer value (consider access to a
+            union in two threads of control in the presense of global
+            optimizations).  So only set REGNO_POINTER_FLAG on the destination
+            pseudo if this is the only set of that pseudo.  */
+         && REG_N_SETS (REGNO (SET_DEST (x))) == 1
          && ! REG_USERVAR_P (SET_DEST (x))
          && ! REGNO_POINTER_FLAG (REGNO (SET_DEST (x)))
          && ((GET_CODE (SET_SRC (x)) == REG