diff options
author | Richard Biener <rguenther@suse.de> | 2018-05-25 13:08:28 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2018-05-25 13:08:28 +0000 |
commit | 27312bf2148af2bea946fcec8f4c2e1231e8d63b (patch) | |
tree | f39e10cb0937194fe5afa1b80ccfc7c530de6755 /gcc/tree-ssa-alias.c | |
parent | b55f342bdd8bec16b727a5889c589dd85c5ca3c3 (diff) | |
download | gcc-27312bf2148af2bea946fcec8f4c2e1231e8d63b.zip gcc-27312bf2148af2bea946fcec8f4c2e1231e8d63b.tar.gz gcc-27312bf2148af2bea946fcec8f4c2e1231e8d63b.tar.bz2 |
tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter, defaulted to true.
2018-05-25 Richard Biener <rguenther@suse.de>
* tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
defaulted to true.
(ref_maybe_used_by_stmt_p): Likewise.
(stmt_may_clobber_ref_p): Likewise.
(stmt_may_clobber_ref_p_1): Likewise.
* tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
and pass it along.
(ref_maybe_used_by_stmt_p): Likewise.
(stmt_may_clobber_ref_p): Likewise.
(stmt_may_clobber_ref_p_1): Likewise.
* tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
the alias oracle to disambiguate DRs with stmts DR analysis
couldn't handle.
(vect_analyze_data_refs): Do not give up on not analyzable
DRs for BB vectorization. Remove code truncating the dataref
vector.
From-SVN: r260757
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r-- | gcc/tree-ssa-alias.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index 5776687..7b25778 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -1509,21 +1509,21 @@ refs_may_alias_p_1 (ao_ref *ref1, ao_ref *ref2, bool tbaa_p) } static bool -refs_may_alias_p (tree ref1, ao_ref *ref2) +refs_may_alias_p (tree ref1, ao_ref *ref2, bool tbaa_p) { ao_ref r1; ao_ref_init (&r1, ref1); - return refs_may_alias_p_1 (&r1, ref2, true); + return refs_may_alias_p_1 (&r1, ref2, tbaa_p); } bool -refs_may_alias_p (tree ref1, tree ref2) +refs_may_alias_p (tree ref1, tree ref2, bool tbaa_p) { ao_ref r1, r2; bool res; ao_ref_init (&r1, ref1); ao_ref_init (&r2, ref2); - res = refs_may_alias_p_1 (&r1, &r2, true); + res = refs_may_alias_p_1 (&r1, &r2, tbaa_p); if (res) ++alias_stats.refs_may_alias_p_may_alias; else @@ -1559,7 +1559,7 @@ refs_output_dependent_p (tree store1, tree store2) otherwise return false. */ static bool -ref_maybe_used_by_call_p_1 (gcall *call, ao_ref *ref) +ref_maybe_used_by_call_p_1 (gcall *call, ao_ref *ref, bool tbaa_p) { tree base, callee; unsigned i; @@ -1860,7 +1860,7 @@ process_args: { ao_ref r; ao_ref_init (&r, op); - if (refs_may_alias_p_1 (&r, ref, true)) + if (refs_may_alias_p_1 (&r, ref, tbaa_p)) return true; } } @@ -1869,10 +1869,10 @@ process_args: } static bool -ref_maybe_used_by_call_p (gcall *call, ao_ref *ref) +ref_maybe_used_by_call_p (gcall *call, ao_ref *ref, bool tbaa_p) { bool res; - res = ref_maybe_used_by_call_p_1 (call, ref); + res = ref_maybe_used_by_call_p_1 (call, ref, tbaa_p); if (res) ++alias_stats.ref_maybe_used_by_call_p_may_alias; else @@ -1885,7 +1885,7 @@ ref_maybe_used_by_call_p (gcall *call, ao_ref *ref) true, otherwise return false. */ bool -ref_maybe_used_by_stmt_p (gimple *stmt, ao_ref *ref) +ref_maybe_used_by_stmt_p (gimple *stmt, ao_ref *ref, bool tbaa_p) { if (is_gimple_assign (stmt)) { @@ -1901,17 +1901,17 @@ ref_maybe_used_by_stmt_p (gimple *stmt, ao_ref *ref) || gimple_assign_rhs_code (stmt) == CONSTRUCTOR) return false; - return refs_may_alias_p (rhs, ref); + return refs_may_alias_p (rhs, ref, tbaa_p); } else if (is_gimple_call (stmt)) - return ref_maybe_used_by_call_p (as_a <gcall *> (stmt), ref); + return ref_maybe_used_by_call_p (as_a <gcall *> (stmt), ref, tbaa_p); else if (greturn *return_stmt = dyn_cast <greturn *> (stmt)) { tree retval = gimple_return_retval (return_stmt); if (retval && TREE_CODE (retval) != SSA_NAME && !is_gimple_min_invariant (retval) - && refs_may_alias_p (retval, ref)) + && refs_may_alias_p (retval, ref, tbaa_p)) return true; /* If ref escapes the function then the return acts as a use. */ tree base = ao_ref_base (ref); @@ -1929,11 +1929,11 @@ ref_maybe_used_by_stmt_p (gimple *stmt, ao_ref *ref) } bool -ref_maybe_used_by_stmt_p (gimple *stmt, tree ref) +ref_maybe_used_by_stmt_p (gimple *stmt, tree ref, bool tbaa_p) { ao_ref r; ao_ref_init (&r, ref); - return ref_maybe_used_by_stmt_p (stmt, &r); + return ref_maybe_used_by_stmt_p (stmt, &r, tbaa_p); } /* If the call in statement CALL may clobber the memory reference REF @@ -2245,7 +2245,7 @@ call_may_clobber_ref_p (gcall *call, tree ref) otherwise return false. */ bool -stmt_may_clobber_ref_p_1 (gimple *stmt, ao_ref *ref) +stmt_may_clobber_ref_p_1 (gimple *stmt, ao_ref *ref, bool tbaa_p) { if (is_gimple_call (stmt)) { @@ -2255,7 +2255,7 @@ stmt_may_clobber_ref_p_1 (gimple *stmt, ao_ref *ref) { ao_ref r; ao_ref_init (&r, lhs); - if (refs_may_alias_p_1 (ref, &r, true)) + if (refs_may_alias_p_1 (ref, &r, tbaa_p)) return true; } @@ -2268,7 +2268,7 @@ stmt_may_clobber_ref_p_1 (gimple *stmt, ao_ref *ref) { ao_ref r; ao_ref_init (&r, lhs); - return refs_may_alias_p_1 (ref, &r, true); + return refs_may_alias_p_1 (ref, &r, tbaa_p); } } else if (gimple_code (stmt) == GIMPLE_ASM) @@ -2278,11 +2278,11 @@ stmt_may_clobber_ref_p_1 (gimple *stmt, ao_ref *ref) } bool -stmt_may_clobber_ref_p (gimple *stmt, tree ref) +stmt_may_clobber_ref_p (gimple *stmt, tree ref, bool tbaa_p) { ao_ref r; ao_ref_init (&r, ref); - return stmt_may_clobber_ref_p_1 (stmt, &r); + return stmt_may_clobber_ref_p_1 (stmt, &r, tbaa_p); } /* Return true if store1 and store2 described by corresponding tuples |