From 6331b6fa2c9eca625aabcecf3a691577b3cca229 Mon Sep 17 00:00:00 2001 From: hubicka Date: Fri, 10 Aug 2012 07:52:23 +0000 Subject: PR middle-end/54146 * ipa-inline-transform.c (inline_call): Add UPDATE_OVERALL_SUMMARY parameter; honnor it. * ipa-inline.c (recursive_inlining): Update call of inline_call. (inline_small_functions): Likewise. (ipa_inline): Likewise. (inline_always_inline_functions): Likewise. (early_inline_small_functions): Likewise. (flatten_function): Do separate update of summary info. * ipa-inline.h (inline_update_overall_summary): Declare. (inline_call): Update. * ipa-inline-analysis.c (inline_merge_summary): Break out updating code to ... (inline_update_overall_summary): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190283 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ipa-inline-transform.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'gcc/ipa-inline-transform.c') diff --git a/gcc/ipa-inline-transform.c b/gcc/ipa-inline-transform.c index d64c6129835..53c468717c7 100644 --- a/gcc/ipa-inline-transform.c +++ b/gcc/ipa-inline-transform.c @@ -193,13 +193,17 @@ clone_inlined_nodes (struct cgraph_edge *e, bool duplicate, /* Mark edge E as inlined and update callgraph accordingly. UPDATE_ORIGINAL specify whether profile of original function should be updated. If any new indirect edges are discovered in the process, add them to NEW_EDGES, unless - it is NULL. Return true iff any new callgraph edges were discovered as a + it is NULL. If UPDATE_OVERALL_SUMMARY is false, do not bother to recompute overall + size of caller after inlining. Caller is required to eventually do it via + inline_update_overall_summary. + + Return true iff any new callgraph edges were discovered as a result of inlining. */ bool inline_call (struct cgraph_edge *e, bool update_original, VEC (cgraph_edge_p, heap) **new_edges, - int *overall_size) + int *overall_size, bool update_overall_summary) { int old_size = 0, new_size = 0; struct cgraph_node *to = NULL; @@ -244,6 +248,8 @@ inline_call (struct cgraph_edge *e, bool update_original, old_size = inline_summary (to)->size; inline_merge_summary (e); + if (update_overall_summary) + inline_update_overall_summary (to); new_size = inline_summary (to)->size; if (overall_size) *overall_size += new_size - old_size; -- cgit v1.2.1