public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Work around --enable-checking profiledbootstrap issue
@ 2015-01-16  4:09 Jan Hubicka
  0 siblings, 0 replies; only message in thread
From: Jan Hubicka @ 2015-01-16  4:09 UTC (permalink / raw)
  To: gcc-patches

Hi,
this patch fixes ICE during profiledbootstrap. The underlying problem is somewhat hard
to fix (and not too important), so I will pospone it for next stage1.

Honza

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 219700)
+++ ChangeLog	(working copy)
@@ -1,3 +1,8 @@
+2015-01-15  Jan Hubicka  <hubicka@ucw.cz>
+
+	* ipa-inline.c (inline_small_functions): Work around hints
+	cache issue.
+
 2015-01-15  Sandra Loosemore  <sandra@codesourcery.com>
 
 	PR target/59710
Index: ipa-inline.c
===================================================================
--- ipa-inline.c	(revision 219700)
+++ ipa-inline.c	(working copy)
@@ -1655,7 +1655,18 @@ inline_small_functions (void)
       reset_edge_growth_cache (edge);
       gcc_assert (old_size_est == estimate_edge_size (edge));
       gcc_assert (old_time_est == estimate_edge_time (edge));
-      gcc_assert (old_hints_est == estimate_edge_hints (edge));
+      /* FIXME:
+
+         gcc_assert (old_hints_est == estimate_edge_hints (edge));
+
+	 fails with profile feedback because some hints depends on
+	 maybe_hot_edge_p predicate and because callee gets inlined to other
+	 calls, the edge may become cold.
+	 This ought to be fixed by computing relative probabilities
+	 for given invocation but that will be better done once whole
+	 code is converted to sreals.  Disable for now and revert to "wrong"
+	 value so enable/disable checking paths agree.  */
+      edge_growth_cache[edge->uid].hints = old_hints_est + 1;
 
       /* When updating the edge costs, we only decrease badness in the keys.
 	 Increases of badness are handled lazilly; when we see key with out

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-01-16  3:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-16  4:09 Work around --enable-checking profiledbootstrap issue Jan Hubicka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).