ipa-inline.c (reset_edge_caches): Walk aliases.
* ipa-inline.c (reset_edge_caches): Walk aliases. (update_caller_keys): Do not test inlinability of aliases. * ipa-inline-analysis.c (do_estimate_edge_time): Look through alias. (do_estimate_growth): Fix typo. From-SVN: r174992
This commit is contained in:
parent
8775a18b96
commit
317a064665
2 changed files with 8 additions and 3 deletions
|
@ -2079,7 +2079,7 @@ do_estimate_edge_time (struct cgraph_edge *edge)
|
|||
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);
|
||||
|
||||
|
@ -2226,7 +2226,7 @@ do_estimate_growth (struct cgraph_node *node)
|
|||
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. */
|
||||
|
|
|
@ -929,6 +929,8 @@ reset_edge_caches (struct cgraph_node *node)
|
|||
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;
|
||||
|
@ -939,6 +941,9 @@ reset_edge_caches (struct cgraph_node *node)
|
|||
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;
|
||||
|
@ -980,7 +985,7 @@ update_caller_keys (fibheap_t heap, struct cgraph_node *node,
|
|||
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;
|
||||
|
|
Loading…
Add table
Reference in a new issue