+2013-09-13 Jan Hubicka <jh@suse.cz>
+
+ * ipa-inline-analysis.c (struct growth_data): Add node.
+ (do_estimate_growth_1): Fix detection of recursion.
+
2013-09-13 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/58392
struct growth_data
{
+ struct cgraph_node *node;
bool self_recursive;
int growth;
};
{
gcc_checking_assert (e->inline_failed);
- if (e->caller == node
+ if (e->caller == d->node
|| (e->caller->global.inlined_to
- && e->caller->global.inlined_to == node))
+ && e->caller->global.inlined_to == d->node))
d->self_recursive = true;
d->growth += estimate_edge_growth (e);
}
int
do_estimate_growth (struct cgraph_node *node)
{
- struct growth_data d = { 0, false };
+ struct growth_data d = { node, 0, false };
struct inline_summary *info = inline_summary (node);
cgraph_for_node_and_aliases (node, do_estimate_growth_1, &d, true);