diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-27 08:10:45 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-27 08:10:45 +0000 |
commit | 8e7c2b9c94b04b1911dac37bb663c710920ad54e (patch) | |
tree | 6c6d63882b828324a5a6f9dca7526476ac9e8128 /gcc/tree-ssa-alias.c | |
parent | fa83830dcb078559a8cef38060ad988e432987ee (diff) | |
download | gcc-8e7c2b9c94b04b1911dac37bb663c710920ad54e.tar.gz |
2010-06-27 Richard Guenther <rguenther@suse.de>
PR middle-end/44684
* tree-ssa-alias.c (refs_may_alias_p_1): Allow SSA name refs.
(stmt_may_clobber_ref_p_1): Do not bother to call the oracle
for register LHS. Or non-store assignments.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161456 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r-- | gcc/tree-ssa-alias.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index 95f26f1ed0a..28b8fb779c2 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -801,11 +801,13 @@ refs_may_alias_p_1 (ao_ref *ref1, ao_ref *ref2, bool tbaa_p) alias_set_type set; gcc_checking_assert ((!ref1->ref + || TREE_CODE (ref1->ref) == SSA_NAME || DECL_P (ref1->ref) || handled_component_p (ref1->ref) || INDIRECT_REF_P (ref1->ref) || TREE_CODE (ref1->ref) == TARGET_MEM_REF) && (!ref2->ref + || TREE_CODE (ref2->ref) == SSA_NAME || DECL_P (ref2->ref) || handled_component_p (ref2->ref) || INDIRECT_REF_P (ref2->ref) @@ -1409,11 +1411,15 @@ stmt_may_clobber_ref_p_1 (gimple stmt, ao_ref *ref) return call_may_clobber_ref_p_1 (stmt, ref); } - else if (is_gimple_assign (stmt)) + else if (gimple_assign_single_p (stmt)) { - ao_ref r; - ao_ref_init (&r, gimple_assign_lhs (stmt)); - return refs_may_alias_p_1 (ref, &r, true); + tree lhs = gimple_assign_lhs (stmt); + if (!is_gimple_reg (lhs)) + { + ao_ref r; + ao_ref_init (&r, gimple_assign_lhs (stmt)); + return refs_may_alias_p_1 (ref, &r, true); + } } else if (gimple_code (stmt) == GIMPLE_ASM) return true; |