This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix ICE in do_estimate_edge_time
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 18 Nov 2019 20:30:34 +0100
- Subject: Fix ICE in do_estimate_edge_time
Hi,
this patch fixes two problems triggered by lto boostrap lean. First
inline_small_functions starts adding new edges before reseting old data
in cache. Second is about disabling the test for functions with IPA
count (since updating it triggers small roundoff errors) which
incorrectly ask count of edge->callee which may be an alias.
lto-lean-profiledbootstrapped/regtested x86_64-linux, comitted.
PR ipa/92508
* ipa-inline.c (inline_small_functions): Add new edges after reseting
caches.
* ipa-inline-analysis.c (do_estimate_edge_time): Fix sanity check.
Index: ipa-inline.c
===================================================================
--- ipa-inline.c (revision 278390)
+++ ipa-inline.c (working copy)
@@ -2136,9 +2135,8 @@ inline_small_functions (void)
gcc_checking_assert (!callee->inlined_to);
inline_call (edge, true, &new_indirect_edges, &overall_size, true);
- add_new_edges_to_heap (&edge_heap, new_indirect_edges);
-
reset_edge_caches (edge->callee);
+ add_new_edges_to_heap (&edge_heap, new_indirect_edges);
update_callee_keys (&edge_heap, where, updated_nodes);
}
Index: ipa-inline-analysis.c
===================================================================
--- ipa-inline-analysis.c (revision 278390)
+++ ipa-inline-analysis.c (working copy)
@@ -211,7 +211,7 @@ do_estimate_edge_time (struct cgraph_edg
nonspec_time = e->entry.nonspec_time;
hints = e->entry.hints;
if (flag_checking
- && !edge->callee->count.ipa_p ())
+ && !callee->count.ipa_p ())
{
sreal chk_time, chk_nonspec_time;
int chk_size, chk_min_size;