diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-02-22 09:32:35 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-02-22 09:32:35 +0000 |
commit | 6ec9c8c50a63c8f1e1ce471639460b6d880956c7 (patch) | |
tree | 5ac6f9056926a53719d7f72d459009fd358327cd /gcc/ipa-inline-transform.c | |
parent | 9a0f46cdcb01523aa946436209d420c572ada904 (diff) | |
download | gcc-6ec9c8c50a63c8f1e1ce471639460b6d880956c7.tar.gz |
2016-02-22 Richard Biener <rguenther@suse.de>
PR ipa/37448
* ipa-inline-transform.c (inline_call): When not updating
overall summaries adjust self size by the growth estimate.
* ipa-inline.c (inline_to_all_callers_1): Add to the callers
hash-set, do not update overall summaries here. Renamed from ...
(inline_to_all_callers): ... this which is now wrapping the
above and performing delayed overall summary update.
(early_inline_small_functions): Delay updating of the overall
summary.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233598 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-inline-transform.c')
-rw-r--r-- | gcc/ipa-inline-transform.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc/ipa-inline-transform.c b/gcc/ipa-inline-transform.c index 759ab78d3ca..5dc0b5af287 100644 --- a/gcc/ipa-inline-transform.c +++ b/gcc/ipa-inline-transform.c @@ -301,9 +301,11 @@ inline_call (struct cgraph_edge *e, bool update_original, struct cgraph_node *callee = e->callee->ultimate_alias_target (); bool new_edges_found = false; + int estimated_growth = 0; + if (! update_overall_summary) + estimated_growth = estimate_edge_growth (e); /* This is used only for assert bellow. */ #if 0 - int estimated_growth = estimate_edge_growth (e); bool predicated = inline_edge_summary (e)->predicate != NULL; #endif @@ -373,7 +375,13 @@ inline_call (struct cgraph_edge *e, bool update_original, new_edges_found = ipa_propagate_indirect_call_infos (curr, new_edges); check_speculations (e->callee); if (update_overall_summary) - inline_update_overall_summary (to); + inline_update_overall_summary (to); + else + /* Update self size by the estimate so overall function growth limits + work for further inlining into this function. Before inlining + the function we inlined to again we expect the caller to update + the overall summary. */ + inline_summaries->get (to)->size += estimated_growth; new_size = inline_summaries->get (to)->size; if (callee->calls_comdat_local) |