This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Check that there are no missing probabilities
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 13 Oct 2017 15:38:33 +0200
- Subject: Check that there are no missing probabilities
- Authentication-results: sourceware.org; auth=none
Hi,
this patch enables check that no edge probabilities are missing.
Honza
* cfghooks.c (verify_flow_info): Check that edge probabilities are
set.
Index: cfghooks.c
===================================================================
--- cfghooks.c (revision 253694)
+++ cfghooks.c (working copy)
@@ -160,6 +161,13 @@ verify_flow_info (void)
e->src->index, e->dest->index);
err = 1;
}
+ if (profile_status_for_fn (cfun) >= PROFILE_GUESSED
+ && !e->probability.initialized_p ())
+ {
+ error ("Uninitialized probability of edge %i->%i", e->src->index,
+ e->dest->index);
+ err = 1;
+ }
if (!e->probability.verify ())
{
error ("verify_flow_info: Wrong probability of edge %i->%i",