gcse.c (hash_expr_1): Add in MEM_ALIAS_SET.
authorRichard Henderson <rth@cygnus.com>
Sat, 16 Oct 1999 07:08:27 +0000 (00:08 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Sat, 16 Oct 1999 07:08:27 +0000 (00:08 -0700)
        * gcse.c (hash_expr_1): Add in MEM_ALIAS_SET.
        (expr_equiv_p): Reject memories with different alias sets.

From-SVN: r30039

gcc/ChangeLog
gcc/gcse.c

index b6e34ecf649dffdb8fc37bd0c3e14f6e60567637..fdae41bc012d0104be467d686d0b7175d4ac8ec2 100644 (file)
@@ -1,3 +1,8 @@
+Sat Oct 16 00:07:01 1999  Richard Henderson  <rth@cygnus.com>
+
+       * gcse.c (hash_expr_1): Add in MEM_ALIAS_SET.
+       (expr_equiv_p): Reject memories with different alias sets.
+
 Fri Oct 15 15:17:29 1999  Greg McGary  <gkm@gnu.org>
 
        * flags.h (flag_bounds_check, flag_bounded_pointers): New extern decls.
index d660a493dc147c4d8b16fd79fd3fdd4cf4a78696..f43f3823c42f6724973c3d574a8bbb897b07606d 100644 (file)
@@ -1446,6 +1446,7 @@ hash_expr_1 (x, mode, do_not_record_p)
          return 0;
        }
       hash += (unsigned) MEM;
+      hash += MEM_ALIAS_SET (x);
       x = XEXP (x, 0);
       goto repeat;
 
@@ -1578,6 +1579,14 @@ expr_equiv_p (x, y)
     case REG:
       return REGNO (x) == REGNO (y);
 
+    case MEM:
+      /* Can't merge two expressions in different alias sets, since we can
+        decide that the expression is transparent in a block when it isn't,
+        due to it being set with the different alias set.  */
+      if (MEM_ALIAS_SET (x) != MEM_ALIAS_SET (y))
+       return 0;
+      break;
+
     /*  For commutative operations, check both orders.  */
     case PLUS:
     case MULT: