diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-03-05 08:43:13 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-03-05 08:43:13 +0000 |
commit | 6b1460deb360c711fa1ec42bfcf8386eaa4cad0e (patch) | |
tree | ad667ca422096dfb4edaba7918f77ac8678165b2 | |
parent | 9327cf314c281a09348f256ce259b694655d2830 (diff) | |
download | gcc-6b1460deb360c711fa1ec42bfcf8386eaa4cad0e.tar.gz |
2015-03-05 Richard Biener <rguenther@suse.de>
PR ipa/65270
* ipa-icf-gimple.c (func_checker::compare_memory_operand):
Compare dependence info.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@221204 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ipa-icf-gimple.c | 17 |
2 files changed, 23 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 93b88681e5f..a50a378044e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2015-03-05 Richard Biener <rguenther@suse.de> + PR ipa/65270 + * ipa-icf-gimple.c (func_checker::compare_memory_operand): + Compare dependence info. + +2015-03-05 Richard Biener <rguenther@suse.de> + PR middle-end/65233 * ipa-polymorphic-call.c: Include tree-ssa-operands.h and tree-into-ssa.h. diff --git a/gcc/ipa-icf-gimple.c b/gcc/ipa-icf-gimple.c index ffb4a50cb6d..4f1a8ce6e95 100644 --- a/gcc/ipa-icf-gimple.c +++ b/gcc/ipa-icf-gimple.c @@ -305,6 +305,23 @@ func_checker::compare_memory_operand (tree t1, tree t2) get_object_alignment_1 (b2, &align2, &tem); if (align1 != align2) return return_false_with_msg ("different access alignment"); + + /* Similarly we have to compare dependence info where equality + tells us we are safe (even some unequal values would be safe + but then we have to maintain a map of bases and cliques). */ + unsigned short clique1 = 0, base1 = 0, clique2 = 0, base2 = 0; + if (TREE_CODE (b1) == MEM_REF) + { + clique1 = MR_DEPENDENCE_CLIQUE (b1); + base1 = MR_DEPENDENCE_BASE (b1); + } + if (TREE_CODE (b2) == MEM_REF) + { + clique2 = MR_DEPENDENCE_CLIQUE (b2); + base2 = MR_DEPENDENCE_BASE (b2); + } + if (clique1 != clique2 || base1 != base2) + return return_false_with_msg ("different dependence info"); } return compare_operand (t1, t2); |