diff options
author | Jan Hubicka <jh@suse.cz> | 2010-05-28 17:56:16 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2010-05-28 15:56:16 +0000 |
commit | df24c2b88d3ca69d5a7fe29d8a527714fb3aec16 (patch) | |
tree | 08c90220d0cfdceddc947963eabaabf4be929223 /gcc | |
parent | c3a9a336d0552e81136f97dd22e8e1f7e8fd9216 (diff) | |
download | gcc-df24c2b88d3ca69d5a7fe29d8a527714fb3aec16.zip gcc-df24c2b88d3ca69d5a7fe29d8a527714fb3aec16.tar.gz gcc-df24c2b88d3ca69d5a7fe29d8a527714fb3aec16.tar.bz2 |
ipa-reference.c (add_static_var): Remove redundant all_module_statics check.
* ipa-reference.c (add_static_var): Remove redundant all_module_statics check.
(ipa_reference_write_optimization_summary): Call is_proper_for_analysis only
on local statics.
From-SVN: r159982
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ipa-reference.c | 25 |
2 files changed, 17 insertions, 14 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a490356..dff48ee 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-05-28 Jan Hubicka <jh@suse.cz> + + * ipa-reference.c (add_static_var): Remove redundant all_module_statics check. + (ipa_reference_write_optimization_summary): Call is_proper_for_analysis only + on local statics. + 2010-05-28 Iain Sandoe <iains@gcc.gnu.org> * config.gcc (*-*-darwin*): Adjust t-make fragments for Darwin. diff --git a/gcc/ipa-reference.c b/gcc/ipa-reference.c index bee0565..2fc9bed 100644 --- a/gcc/ipa-reference.c +++ b/gcc/ipa-reference.c @@ -239,13 +239,10 @@ add_static_var (tree var) { int uid = DECL_UID (var); gcc_assert (TREE_CODE (var) == VAR_DECL); - if (!bitmap_bit_p (all_module_statics, uid)) - { - if (dump_file) - splay_tree_insert (reference_vars_to_consider, - uid, (splay_tree_value)var); - bitmap_set_bit (all_module_statics, uid); - } + if (dump_file) + splay_tree_insert (reference_vars_to_consider, + uid, (splay_tree_value)var); + bitmap_set_bit (all_module_statics, uid); } /* Return true if the variable T is the right kind of static variable to @@ -962,15 +959,15 @@ ipa_reference_write_optimization_summary (cgraph_node_set set, /* See what variables we are interested in. */ for (vnode = varpool_nodes; vnode; vnode = vnode->next) - if (referenced_from_this_partition_p (&vnode->ref_list, set, vset)) + if (!vnode->externally_visible + && vnode->analyzed + && is_proper_for_analysis (vnode->decl) + && referenced_from_this_partition_p (&vnode->ref_list, set, vset)) { tree decl = vnode->decl; - if (is_proper_for_analysis (decl)) - { - bitmap_set_bit (ltrans_statics, DECL_UID (decl)); - splay_tree_insert (reference_vars_to_consider, - DECL_UID (decl), (splay_tree_value)decl); - } + bitmap_set_bit (ltrans_statics, DECL_UID (decl)); + splay_tree_insert (reference_vars_to_consider, + DECL_UID (decl), (splay_tree_value)decl); } for (node = cgraph_nodes; node; node = node->next) |