Fix ICE in compute_fn_summary
PR ipa/98338 * ipa-fnsummary.c (compute_fn_summary): Fix sanity check.
This commit is contained in:
parent
074226d5aa
commit
150bde36c1
@ -3143,11 +3143,18 @@ compute_fn_summary (struct cgraph_node *node, bool early)
|
|||||||
info->estimated_stack_size = size_info->estimated_self_stack_size;
|
info->estimated_stack_size = size_info->estimated_self_stack_size;
|
||||||
|
|
||||||
/* Code above should compute exactly the same result as
|
/* Code above should compute exactly the same result as
|
||||||
ipa_update_overall_fn_summary but because computation happens in
|
ipa_update_overall_fn_summary except for case when speculative
|
||||||
different order the roundoff errors result in slight changes. */
|
edges are present since these are accounted to size but not
|
||||||
|
self_size. Do not compare time since different order the roundoff
|
||||||
|
errors result in slight changes. */
|
||||||
ipa_update_overall_fn_summary (node);
|
ipa_update_overall_fn_summary (node);
|
||||||
/* In LTO mode we may have speculative edges set. */
|
if (flag_checking)
|
||||||
gcc_assert (in_lto_p || size_info->size == size_info->self_size);
|
{
|
||||||
|
for (e = node->indirect_calls; e; e = e->next_callee)
|
||||||
|
if (e->speculative)
|
||||||
|
break;
|
||||||
|
gcc_assert (e || size_info->size == size_info->self_size);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user