* 4.6: do not divide by 0 on insane profile
@ 2011-05-25 13:37 Jan Hubicka
0 siblings, 0 replies; only message in thread
From: Jan Hubicka @ 2011-05-25 13:37 UTC (permalink / raw)
To: gcc-patches
Hi,
cgraph_decide_recursive_inlining may decide to divide by 0 when profile is read
but it is small enough, so even count of 0 is considered as possibly hot. This
particularly happens when profile was not really read after all.
The problem is fixed on mainline differently. This patch just obviously plugs
the symptom.
Bootstrapped/regtested x86_64-linux, comitted.
Index: ChangeLog
===================================================================
--- ChangeLog (revision 174182)
+++ ChangeLog (working copy)
@@ -1,3 +1,9 @@
+2011-05-18 Jan Hubicka <jh@suse.cz>
+
+ PR tree-optimization/44897
+ * ipa-inline.c (cgraph_decide_recursive_inlining): Do not divide
+ by zero for insane profiles.
+
2011-05-24 Eric Botcazou <ebotcazou@adacore.com>
* config/sparc/sparc.c (sparc_option_override): If not set by the user,
Index: ipa-inline.c
===================================================================
--- ipa-inline.c (revision 173893)
+++ ipa-inline.c (working copy)
@@ -895,7 +895,7 @@ cgraph_decide_recursive_inlining (struct
continue;
}
- if (max_count)
+ if (max_count && node->count)
{
if (!cgraph_maybe_hot_edge_p (curr))
{
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-05-25 11:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-25 13:37 4.6: do not divide by 0 on insane profile 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).