diff options
author | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-03 06:20:21 +0000 |
---|---|---|
committer | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-03 06:20:21 +0000 |
commit | 2f16183e45bde2a4c53ef9288a4752b66a1db674 (patch) | |
tree | 0f27e072946d5679715a3b35a103656388cb972e /gcc/emit-rtl.c | |
parent | 1398cbfdee648c91906897a24cbc34d50042406b (diff) | |
download | gcc-2f16183e45bde2a4c53ef9288a4752b66a1db674.tar.gz |
* fold-const.c (operand_equal_p): Accept a NULL operand 0 for
COMPONENT_REFs.
* emit-rtl.c (mem_attrs_htab_eq): Use iterative_hash_expr for
hashing trees instead of a pointer hash.
(mem_attrs_htab_eq): Do a deep compare instead of a pointer
compare for MEM_EXPR.
PR rtl-optimization/25130
* cse.c (exp_equiv_p): Compare MEM_ATTRS instead of MEM_ALIAS_SET
when comparing MEMs for GCSE
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109264 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 828651041a0..aaab19ed4d3 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -254,7 +254,7 @@ mem_attrs_htab_hash (const void *x) return (p->alias ^ (p->align * 1000) ^ ((p->offset ? INTVAL (p->offset) : 0) * 50000) ^ ((p->size ? INTVAL (p->size) : 0) * 2500000) - ^ (size_t) p->expr); + ^ (size_t) iterative_hash_expr (p->expr, 0)); } /* Returns nonzero if the value represented by X (which is really a @@ -267,8 +267,11 @@ mem_attrs_htab_eq (const void *x, const void *y) mem_attrs *p = (mem_attrs *) x; mem_attrs *q = (mem_attrs *) y; - return (p->alias == q->alias && p->expr == q->expr && p->offset == q->offset - && p->size == q->size && p->align == q->align); + return (p->alias == q->alias && p->offset == q->offset + && p->size == q->size && p->align == q->align + && (p->expr == q->expr + || (p->expr != NULL_TREE && q->expr != NULL_TREE + && operand_equal_p (p->expr, q->expr, 0)))); } /* Allocate a new mem_attrs structure and insert it into the hash table if |