Commit df24c2b8 by Jan Hubicka Committed by Jan Hubicka

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
parent c3a9a336
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> 2010-05-28 Iain Sandoe <iains@gcc.gnu.org>
* config.gcc (*-*-darwin*): Adjust t-make fragments for Darwin. * config.gcc (*-*-darwin*): Adjust t-make fragments for Darwin.
......
...@@ -239,13 +239,10 @@ add_static_var (tree var) ...@@ -239,13 +239,10 @@ add_static_var (tree var)
{ {
int uid = DECL_UID (var); int uid = DECL_UID (var);
gcc_assert (TREE_CODE (var) == VAR_DECL); 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,
if (dump_file) uid, (splay_tree_value)var);
splay_tree_insert (reference_vars_to_consider, bitmap_set_bit (all_module_statics, uid);
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 /* 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, ...@@ -962,15 +959,15 @@ ipa_reference_write_optimization_summary (cgraph_node_set set,
/* See what variables we are interested in. */ /* See what variables we are interested in. */
for (vnode = varpool_nodes; vnode; vnode = vnode->next) 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; 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,
bitmap_set_bit (ltrans_statics, DECL_UID (decl)); DECL_UID (decl), (splay_tree_value)decl);
splay_tree_insert (reference_vars_to_consider,
DECL_UID (decl), (splay_tree_value)decl);
}
} }
for (node = cgraph_nodes; node; node = node->next) for (node = cgraph_nodes; node; node = node->next)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment