aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-inline.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2019-11-04 15:07:09 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2019-11-04 14:07:09 +0000
commit7237f93eb3aaecb27800ce1688ece4c4cbcb790b (patch)
treede11c563dd2b2c4fbed7b425e99ea70d6cb79842 /gcc/ipa-inline.c
parent6fb349540ce6464e9222d4c236a2c43a174d058b (diff)
downloadgcc-7237f93eb3aaecb27800ce1688ece4c4cbcb790b.zip
gcc-7237f93eb3aaecb27800ce1688ece4c4cbcb790b.tar.gz
gcc-7237f93eb3aaecb27800ce1688ece4c4cbcb790b.tar.bz2
cgraphclones.c (cgraph_node::create_version_clone): Do not duplicate summaries.
* cgraphclones.c (cgraph_node::create_version_clone): Do not duplicate summaries. * ipa-fnsummary.c (ipa_fn_summary_alloc): Allocate size summary first. (ipa_fn_summary_t::duplicate): Use get instead of get_create to access call summaries. (dump_ipa_call_summary): Be ready for missing edge summaries. (analyze_function_body): Use get instead of get_create to access edge summary. (estimate_calls_size_and_time): Do not access summaries of inlined edges; sanity check they are missing. (ipa_call_context::estimate_size_and_time): Use get instead of get_create to access node summary. (inline_update_callee_summaries): Do not update depth of inlined edge. (ipa_merge_fn_summary_after_inlining): Remove inline edge from growth caches. (ipa_merge_fn_summary_after_inlining): Use get instead of get_create. * ipa-fnsummary.h (ipa_remove_from_growth_caches): Declare. * ipa-inline-analyssi.c (edge_growth_cache): Turn to fast summary. (initialize_growth_caches): Update. (do_estimate_edge_time): Remove redundant copy of context. (ipa_remove_from_growth_caches): New function. * ipa-inline.c (flatten_function): Update overall summary only when optimizing. (inline_to_all_callers): Update overall summary of function inlined to. * ipa-inline.h (edge_growth_cache): Turn to fast summary. * symbol-summary.h (call_summary_base): Set m_initialize_when_cloning to false. From-SVN: r277780
Diffstat (limited to 'gcc/ipa-inline.c')
-rw-r--r--gcc/ipa-inline.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index dacec7d..b2c90cc 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -2290,9 +2290,9 @@ flatten_function (struct cgraph_node *node, bool early, bool update)
}
node->aux = NULL;
- if (update)
- ipa_update_overall_fn_summary (node->inlined_to
- ? node->inlined_to : node);
+ cgraph_node *where = node->inlined_to ? node->inlined_to : node;
+ if (update && opt_for_fn (where->decl, optimize))
+ ipa_update_overall_fn_summary (where);
}
/* Inline NODE to all callers. Worker for cgraph_for_node_and_aliases.
@@ -2367,7 +2367,7 @@ inline_to_all_callers (struct cgraph_node *node, void *data)
we have a lot of calls to the same function. */
for (hash_set<cgraph_node *>::iterator i = callers.begin ();
i != callers.end (); ++i)
- ipa_update_overall_fn_summary (*i);
+ ipa_update_overall_fn_summary ((*i)->inlined_to ? (*i)->inlined_to : *i);
return res;
}