diff options
author | Richard Guenther <rguenther@suse.de> | 2008-06-11 09:22:27 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2008-06-11 09:22:27 +0000 |
commit | fd73537b313ab678323c5ca392a5b4d00572b647 (patch) | |
tree | 23b06d8a746a3a709b462d97b637223b78a6f62c /gcc/tree-ssa-sink.c | |
parent | 6717c5442ef81a7242e3ae1bd9f9274ab688ea2f (diff) | |
download | gcc-fd73537b313ab678323c5ca392a5b4d00572b647.tar.gz |
tree-flow.h (may_point_to_global_var): Declare.
2008-06-11 Richard Guenther <rguenther@suse.de>
* tree-flow.h (may_point_to_global_var): Declare.
* tree-ssa-alias.c (may_point_to_global_var): New function.
* tree-ssa-sink.c (is_hidden_global_store): Use it.
From-SVN: r136657
Diffstat (limited to 'gcc/tree-ssa-sink.c')
-rw-r--r-- | gcc/tree-ssa-sink.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/gcc/tree-ssa-sink.c b/gcc/tree-ssa-sink.c index 8945a612663..ebf54e2070b 100644 --- a/gcc/tree-ssa-sink.c +++ b/gcc/tree-ssa-sink.c @@ -189,20 +189,7 @@ is_hidden_global_store (tree stmt) } else if (INDIRECT_REF_P (lhs)) - { - tree ptr = TREE_OPERAND (lhs, 0); - struct ptr_info_def *pi = SSA_NAME_PTR_INFO (ptr); - tree nmt = (pi) ? pi->name_mem_tag : NULL_TREE; - tree smt = symbol_mem_tag (SSA_NAME_VAR (ptr)); - - /* If either the name tag or the symbol tag for PTR is a - global variable, then the store is necessary. */ - if ((nmt && is_global_var (nmt)) - || (smt && is_global_var (smt))) - { - return true; - } - } + return may_point_to_global_var (TREE_OPERAND (lhs, 0)); else gcc_unreachable (); } |