diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-10-13 13:37:49 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-10-13 13:37:49 +0000 |
commit | 9705c1f3b5a6949ae0652e90d586da7b5fc0a1da (patch) | |
tree | 19810ca45c541d1b9be7f918e72d1c94928980c0 | |
parent | c7cae1379b85604b30ef84aa3fffde2ec8532066 (diff) | |
download | gcc-9705c1f3b5a6949ae0652e90d586da7b5fc0a1da.tar.gz |
* cfghooks.c (verify_flow_info): Check that edge probabilities are
set.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@253728 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cfghooks.c | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 78bd1f88c63..fefac6e0c95 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +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> * tree-core.h (tree_contains_struct): Make bool. diff --git a/gcc/cfghooks.c b/gcc/cfghooks.c index 18dc49a035e..c15c58c728e 100644 --- a/gcc/cfghooks.c +++ b/gcc/cfghooks.c @@ -152,6 +152,7 @@ verify_flow_info (void) bb->index, bb->frequency); err = 1; } + FOR_EACH_EDGE (e, ei, bb->succs) { if (last_visited [e->dest->index] == bb) @@ -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", |