]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
alias.c (find_base_term): Use frame_pointer_rtx when handling an ADDRESSOF.
authorJohn Wehle <john@feith.com>
Wed, 13 Sep 2000 06:27:16 +0000 (06:27 +0000)
committerJohn Wehle <wehle@gcc.gnu.org>
Wed, 13 Sep 2000 06:27:16 +0000 (06:27 +0000)
* alias.c (find_base_term): Use frame_pointer_rtx
when handling an ADDRESSOF.

* cse.c (canon_hash): Handle USE of BLKmode memory.
(cse_insn): Outgoing arguments for a libcall don't
affect any recorded expressions.

From-SVN: r36384

gcc/ChangeLog
gcc/alias.c
gcc/cse.c

index 55ee61332ba0e560711686fbc0fcb579f3b9ef2d..15f235d404aa41a976e75d5d3767671cd7988405 100644 (file)
@@ -1,3 +1,12 @@
+Wed Sep 13 02:31:23 EDT 2000  John Wehle  (john@feith.com)
+
+       * alias.c (find_base_term): Use frame_pointer_rtx
+       when handling an ADDRESSOF.
+
+       * cse.c (canon_hash): Handle USE of BLKmode memory.
+       (cse_insn): Outgoing arguments for a libcall don't
+       affect any recorded expressions.
+
 2000-09-12  Tom Tromey  <tromey@cygnus.com>
 
        * configure, config.in: Rebuilt.
index 61a1bd673542d5a1b6ff7caf1967bb668b8d44a8..32d63b269c51a03d2e04d698426470f7a93f57a7 100644 (file)
@@ -1132,7 +1132,7 @@ find_base_term (x)
       return x;
 
     case ADDRESSOF:
-      return REG_BASE_VALUE (stack_pointer_rtx);
+      return REG_BASE_VALUE (frame_pointer_rtx);
 
     default:
       return 0;
index 553ffaec37103e17ed5f596e7673853331a00d34..2396889c7d0f5241e47884be317121c9f305060d 100644 (file)
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -2352,6 +2352,28 @@ canon_hash (x, mode)
       x = XEXP (x, 0);
       goto repeat;
 
+    case USE:
+      /* A USE that mentions non-volatile memory needs special
+        handling since the MEM may be BLKmode which normally
+        prevents an entry from being made.  Pure calls are
+        marked by a USE which mentions BLKmode memory.  */
+      if (GET_CODE (XEXP (x, 0)) == MEM
+         && ! MEM_VOLATILE_P (XEXP (x, 0)))
+       {
+         hash += (unsigned)USE;
+         x = XEXP (x, 0);
+
+         if (! RTX_UNCHANGING_P (x) || FIXED_BASE_PLUS_P (XEXP (x, 0)))
+           hash_arg_in_memory = 1;
+
+         /* Now that we have already found this special case,
+            might as well speed it up as much as possible.  */
+         hash += (unsigned) MEM;
+         x = XEXP (x, 0);
+         goto repeat;
+       }
+      break;
+
     case PRE_DEC:
     case PRE_INC:
     case POST_DEC:
@@ -5760,9 +5782,15 @@ cse_insn (insn, libcall_insn)
 
       else if (do_not_record)
        {
-         if (GET_CODE (dest) == REG || GET_CODE (dest) == SUBREG
-             || GET_CODE (dest) == MEM)
+         if (GET_CODE (dest) == REG || GET_CODE (dest) == SUBREG)
            invalidate (dest, VOIDmode);
+         else if (GET_CODE (dest) == MEM)
+           {
+             /* Outgoing arguments for a libcall don't
+                affect any recorded expressions.  */
+             if (! libcall_insn || insn == libcall_insn)
+               invalidate (dest, VOIDmode);
+           }
          else if (GET_CODE (dest) == STRICT_LOW_PART
                   || GET_CODE (dest) == ZERO_EXTRACT)
            invalidate (XEXP (dest, 0), GET_MODE (dest));
@@ -5919,9 +5947,15 @@ cse_insn (insn, libcall_insn)
           previous quantity's chain.
           Needed for memory if this is a nonvarying address, unless
           we have just done an invalidate_memory that covers even those.  */
-       if (GET_CODE (dest) == REG || GET_CODE (dest) == SUBREG
-           || GET_CODE (dest) == MEM)
+       if (GET_CODE (dest) == REG || GET_CODE (dest) == SUBREG)
          invalidate (dest, VOIDmode);
+       else if (GET_CODE (dest) == MEM)
+         {
+           /* Outgoing arguments for a libcall don't
+              affect any recorded expressions.  */
+           if (! libcall_insn || insn == libcall_insn)
+             invalidate (dest, VOIDmode);
+         }
        else if (GET_CODE (dest) == STRICT_LOW_PART
                 || GET_CODE (dest) == ZERO_EXTRACT)
          invalidate (XEXP (dest, 0), GET_MODE (dest));