This is the mail archive of the
mailing list for the GCC project.
PR bootstrap/50709 (bootstrap miscompare)
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 19 Oct 2011 18:41:49 +0200
- Subject: PR bootstrap/50709 (bootstrap miscompare)
the ENABLE_CHECKING code verifying consistency of inliner cache has effect on changing
order of querries to the fibheap that consequentely makes entries with same key come
in different orders.
Fixed by enabling the checking aways. I also added extra check that the keys are conservatively
--- ChangeLog (revision 180190)
+++ ChangeLog (working copy)
@@ -1,3 +1,9 @@
+2011-10-19 Jan Hubicka <firstname.lastname@example.org>
+ PR bootstrap/50709
+ * ipa-inline.c (inline_small_functions): Fix checking code to not make
+ effect on fibheap stability.
2011-10-19 Roland Stigge <email@example.com>
--- ipa-inline.c (revision 180190)
+++ ipa-inline.c (working copy)
@@ -1384,6 +1384,7 @@ inline_small_functions (void)
struct cgraph_node *where, *callee;
int badness = fibheap_min_key (heap);
+ int cached_badness = -1;
edge = (struct cgraph_edge *) fibheap_extract_min (heap);
@@ -1392,16 +1393,20 @@ inline_small_functions (void)
- /* Be sure that caches are maintained consistent. */
+ /* Be sure that caches are maintained conservatively consistent.
+ This means that cached badness is allways smaller or equal
+ to the real badness. */
+ cached_badness = edge_badness (edge, false);
/* When updating the edge costs, we only decrease badness in the keys.
Increases of badness are handled lazilly; when we see key with out
of date value on it, we re-insert it now. */
current_badness = edge_badness (edge, false);
+ gcc_assert (cached_badness == -1 || cached_badness <= current_badness);
gcc_assert (current_badness >= badness);
if (current_badness != badness)