Commit 9cdc325a by Jan Hubicka Committed by Jan Hubicka

cfghooks.c (verify_flow_info): Check that edge probabilities are set.


	* cfghooks.c (verify_flow_info): Check that edge probabilities are
	set.

From-SVN: r253728
parent 15f7a469
2017-10-13 Jan Hubicka <hubicka@ucw.cz>
* cfghooks.c (verify_flow_info): Check that edge probabilities are
set.
2017-10-13 Nathan Sidwell <nathan@acm.org> 2017-10-13 Nathan Sidwell <nathan@acm.org>
* tree-core.h (tree_contains_struct): Make bool. * tree-core.h (tree_contains_struct): Make bool.
...@@ -152,6 +152,7 @@ verify_flow_info (void) ...@@ -152,6 +152,7 @@ verify_flow_info (void)
bb->index, bb->frequency); bb->index, bb->frequency);
err = 1; err = 1;
} }
FOR_EACH_EDGE (e, ei, bb->succs) FOR_EACH_EDGE (e, ei, bb->succs)
{ {
if (last_visited [e->dest->index] == bb) if (last_visited [e->dest->index] == bb)
...@@ -160,6 +161,13 @@ verify_flow_info (void) ...@@ -160,6 +161,13 @@ verify_flow_info (void)
e->src->index, e->dest->index); e->src->index, e->dest->index);
err = 1; 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 ()) if (!e->probability.verify ())
{ {
error ("verify_flow_info: Wrong probability of edge %i->%i", error ("verify_flow_info: Wrong probability of edge %i->%i",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment