From: Richard Henderson Date: Sat, 16 Oct 1999 07:08:27 +0000 (-0700) Subject: gcse.c (hash_expr_1): Add in MEM_ALIAS_SET. X-Git-Tag: prereleases/libstdc++-2.92~10000 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=297c3335895f3eba396572abb4e760633511f1a4;p=thirdparty%2Fgcc.git gcse.c (hash_expr_1): Add in MEM_ALIAS_SET. * gcse.c (hash_expr_1): Add in MEM_ALIAS_SET. (expr_equiv_p): Reject memories with different alias sets. From-SVN: r30039 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b6e34ecf649d..fdae41bc012d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Sat Oct 16 00:07:01 1999 Richard Henderson + + * 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 * flags.h (flag_bounds_check, flag_bounded_pointers): New extern decls. diff --git a/gcc/gcse.c b/gcc/gcse.c index d660a493dc14..f43f3823c42f 100644 --- a/gcc/gcse.c +++ b/gcc/gcse.c @@ -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: