diff options
author | Richard Biener <rguenther@suse.de> | 2016-02-22 09:32:35 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2016-02-22 09:32:35 +0000 |
commit | bddead150b7e66b097f920b48980f0c65ff8e09e (patch) | |
tree | 5ac6f9056926a53719d7f72d459009fd358327cd /gcc/ipa-inline-transform.c | |
parent | f97374a73fbd90651c925386234329d65d59ce80 (diff) | |
download | gcc-bddead150b7e66b097f920b48980f0c65ff8e09e.zip gcc-bddead150b7e66b097f920b48980f0c65ff8e09e.tar.gz gcc-bddead150b7e66b097f920b48980f0c65ff8e09e.tar.bz2 |
re PR middle-end/37448 (cannot compile big function)
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.
From-SVN: r233598
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 759ab78..5dc0b5a 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) |