diff options
author | Richard Biener <rguenther@suse.de> | 2020-01-10 13:24:04 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2020-01-10 13:24:04 +0000 |
commit | 6b412bf65c0947d589d0eaf6348f29e24cda01c9 (patch) | |
tree | f1f6400ffe6acb2d3a11ca3f7c7de89d29a3a4b3 /gcc | |
parent | bd6e6e0a3c1ba20b2fe4e4173c3f0dd5575b00ee (diff) | |
download | gcc-6b412bf65c0947d589d0eaf6348f29e24cda01c9.zip gcc-6b412bf65c0947d589d0eaf6348f29e24cda01c9.tar.gz gcc-6b412bf65c0947d589d0eaf6348f29e24cda01c9.tar.bz2 |
2020-01-10 Richard Biener <rguenther@suse.de>
* gimple-ssa-store-merging
(pass_store_merging::terminate_all_aliasing_chains): Cache alias info.
From-SVN: r280106
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/gimple-ssa-store-merging.c | 11 |
2 files changed, 13 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 81d8e5c..7f4b7fb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2020-01-10 Richard Biener <rguenther@suse.de> + + * gimple-ssa-store-merging + (pass_store_merging::terminate_all_aliasing_chains): Cache alias info. + 2020-01-10 Martin Liska <mliska@suse.cz> PR ipa/93217 diff --git a/gcc/gimple-ssa-store-merging.c b/gcc/gimple-ssa-store-merging.c index 741b1ec..8371323 100644 --- a/gcc/gimple-ssa-store-merging.c +++ b/gcc/gimple-ssa-store-merging.c @@ -2219,6 +2219,8 @@ pass_store_merging::terminate_all_aliasing_chains (imm_store_chain_info return false; tree store_lhs = gimple_store_p (stmt) ? gimple_get_lhs (stmt) : NULL_TREE; + ao_ref store_lhs_ref; + ao_ref_init (&store_lhs_ref, store_lhs); for (imm_store_chain_info *next = m_stores_head, *cur = next; cur; cur = next) { next = cur->next; @@ -2233,9 +2235,12 @@ pass_store_merging::terminate_all_aliasing_chains (imm_store_chain_info FOR_EACH_VEC_ELT (cur->m_store_info, i, info) { tree lhs = gimple_assign_lhs (info->stmt); - if (ref_maybe_used_by_stmt_p (stmt, lhs) - || stmt_may_clobber_ref_p (stmt, lhs) - || (store_lhs && refs_output_dependent_p (store_lhs, lhs))) + ao_ref lhs_ref; + ao_ref_init (&lhs_ref, lhs); + if (ref_maybe_used_by_stmt_p (stmt, &lhs_ref) + || stmt_may_clobber_ref_p_1 (stmt, &lhs_ref) + || (store_lhs && refs_may_alias_p_1 (&store_lhs_ref, + &lhs_ref, false))) { if (dump_file && (dump_flags & TDF_DETAILS)) { |