diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-05 13:05:06 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-05 13:05:06 +0000 |
commit | 7e304b71a3bc534bc4033214abff0a5fbca4b280 (patch) | |
tree | 6dfae1a4a0cc077331f6a132085edd0b377def68 /gcc/emit-rtl.c | |
parent | 0fe55bbaee526ba675c86364d3158f3d4512d9c9 (diff) | |
download | gcc-7e304b71a3bc534bc4033214abff0a5fbca4b280.tar.gz |
2014-08-05 Richard Biener <rguenther@suse.de>
PR rtl-optimization/61672
* emit-rtl.h (mem_attrs_eq_p): Declare.
* emit-rtl.c (mem_attrs_eq_p): Export. Handle NULL mem-attrs.
* cse.c (exp_equiv_p): Use mem_attrs_eq_p.
* cfgcleanup.c (merge_memattrs): Likewise.
Include emit-rtl.h.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213638 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 80e5b2c1cc6..94f32753491 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -290,9 +290,13 @@ const_fixed_htab_eq (const void *x, const void *y) /* Return true if the given memory attributes are equal. */ -static bool +bool mem_attrs_eq_p (const struct mem_attrs *p, const struct mem_attrs *q) { + if (p == q) + return true; + if (!p || !q) + return false; return (p->alias == q->alias && p->offset_known_p == q->offset_known_p && (!p->offset_known_p || p->offset == q->offset) |