diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2014-06-13 00:23:55 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2014-06-12 22:23:55 +0000 |
commit | 24e49ea0b11e0ccfb2c18b7d79c5cb46f36f8db8 (patch) | |
tree | 614d47109aba7fe36bcb27ee602307278455a372 /gcc/ipa-inline-analysis.c | |
parent | 6ad386b725dfac340e0d337d4c20e603929c7f9a (diff) | |
download | gcc-24e49ea0b11e0ccfb2c18b7d79c5cb46f36f8db8.zip gcc-24e49ea0b11e0ccfb2c18b7d79c5cb46f36f8db8.tar.gz gcc-24e49ea0b11e0ccfb2c18b7d79c5cb46f36f8db8.tar.bz2 |
symtab.c (symtab_node::reset_section): New method.
* symtab.c (symtab_node::reset_section): New method.
* cgraph.c (cgraph_node_cannot_be_local_p_1): Accept non-local
for localization.
* cgraph.h (reset_section): Declare.
* ipa-inline-analysis.c (do_estimate_growth): Check for comdat groups;
do not consider comdat locals.
* cgraphclones.c (set_new_clone_decl_and_node_flags): Get section
for new symbol.
* ipa-visiblity.c (cgraph_externally_visible_p): Cleanup.
(update_visibility_by_resolution_info): Consider UNDEF; fix checking;
reset sections of symbols dragged out of the comdats.
(function_and_variable_visibility): Reset sections of localized symbols.
From-SVN: r211600
Diffstat (limited to 'gcc/ipa-inline-analysis.c')
-rw-r--r-- | gcc/ipa-inline-analysis.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c index c50a722..7f9febc 100644 --- a/gcc/ipa-inline-analysis.c +++ b/gcc/ipa-inline-analysis.c @@ -3877,7 +3877,7 @@ do_estimate_growth (struct cgraph_node *node) /* COMDAT functions are very often not shared across multiple units since they come from various template instantiations. Take this into account. */ - else if (DECL_COMDAT (node->decl) + else if (node->externally_visible && node->get_comdat_group () && cgraph_can_remove_if_no_direct_calls_p (node)) d.growth -= (info->size * (100 - PARAM_VALUE (PARAM_COMDAT_SHARING_PROBABILITY)) @@ -3928,7 +3928,7 @@ growth_likely_positive (struct cgraph_node *node, int edge_growth ATTRIBUTE_UNUS && (ret = node_growth_cache[node->uid])) return ret > 0; if (!cgraph_will_be_removed_from_program_if_no_direct_calls (node) - && (!DECL_COMDAT (node->decl) + && (!node->externally_visible || !node->get_comdat_group () || !cgraph_can_remove_if_no_direct_calls_p (node))) return true; max_callers = inline_summary (node)->size * 4 / edge_growth + 2; |