struct inline_edge_summary *es = inline_edge_summary (edge);
gcc_checking_assert (edge->inline_failed);
- estimate_node_size_and_time (edge->callee,
+ estimate_node_size_and_time (cgraph_function_or_thunk_node (edge->callee, NULL),
evaluate_conditions_for_edge (edge, true),
&size, &time);
else
{
if (!DECL_EXTERNAL (node->decl)
- && !cgraph_will_be_removed_from_program_if_no_direct_calls (node))
+ && cgraph_will_be_removed_from_program_if_no_direct_calls (node))
d.growth -= info->size;
/* COMDAT functions are very often not shared across multiple units since they
come from various template instantiations. Take this into account. */
struct cgraph_edge *edge;
struct cgraph_edge *e = node->callees;
struct cgraph_node *where = node;
+ int i;
+ struct ipa_ref *ref;
if (where->global.inlined_to)
where = where->global.inlined_to;
for (edge = where->callers; edge; edge = edge->next_caller)
if (edge->inline_failed)
reset_edge_growth_cache (edge);
+ for (i = 0; ipa_ref_list_refering_iterate (&where->ref_list, i, ref); i++)
+ if (ref->use == IPA_REF_ALIAS)
+ reset_edge_caches (ipa_ref_refering_node (ref));
if (!e)
return;
int i;
struct ipa_ref *ref;
- if (!inline_summary (node)->inlinable
+ if ((!node->alias && !inline_summary (node)->inlinable)
|| cgraph_function_body_availability (node) <= AVAIL_OVERWRITABLE
|| node->global.inlined_to)
return;