diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-02-13 20:04:32 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-02-13 20:04:32 +0000 |
commit | 2bec736553ee6c466ea88628d15b2445b1b422ad (patch) | |
tree | cbd9d2763be56ba7e0493d6c2d5c3a02ae33004d /gcc/ipa-inline-transform.c | |
parent | 6a3e66dcc0730393d57d4ba8bed927c4b1f24b75 (diff) | |
download | gcc-2bec736553ee6c466ea88628d15b2445b1b422ad.tar.gz |
PR ipa/65028
* ipa-inline-transform.c (mark_all_inlined_calls_cdtor): New function.
(inline_call): Use it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220693 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-inline-transform.c')
-rw-r--r-- | gcc/ipa-inline-transform.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/ipa-inline-transform.c b/gcc/ipa-inline-transform.c index 235219dd82e..52493cc4d00 100644 --- a/gcc/ipa-inline-transform.c +++ b/gcc/ipa-inline-transform.c @@ -261,6 +261,22 @@ clone_inlined_nodes (struct cgraph_edge *e, bool duplicate, } } +/* Mark all call graph edges coming out of NODE and all nodes that have been + inlined to it as in_polymorphic_cdtor. */ + +static void +mark_all_inlined_calls_cdtor (cgraph_node *node) +{ + for (cgraph_edge *cs = node->callees; cs; cs = cs->next_callee) + { + cs->in_polymorphic_cdtor = true; + if (!cs->inline_failed) + mark_all_inlined_calls_cdtor (cs->callee); + } + for (cgraph_edge *cs = node->indirect_calls; cs; cs = cs->next_callee) + cs->in_polymorphic_cdtor = true; +} + /* Mark edge E as inlined and update callgraph accordingly. UPDATE_ORIGINAL specify whether profile of original function should be updated. If any new @@ -332,6 +348,8 @@ inline_call (struct cgraph_edge *e, bool update_original, old_size = inline_summaries->get (to)->size; inline_merge_summary (e); + if (e->in_polymorphic_cdtor) + mark_all_inlined_calls_cdtor (e->callee); if (opt_for_fn (e->caller->decl, optimize)) new_edges_found = ipa_propagate_indirect_call_infos (curr, new_edges); if (update_overall_summary) |