diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2017-06-06 13:30:54 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2017-06-06 11:30:54 +0000 |
commit | 86fdda05914d35026362dbf8bee8520d7e549525 (patch) | |
tree | 86f1d163af120b271b2aa90c1062335d826fa2f9 | |
parent | d2537732ca4c5545bac24d68df55dffc703bf4f6 (diff) | |
download | gcc-86fdda05914d35026362dbf8bee8520d7e549525.zip gcc-86fdda05914d35026362dbf8bee8520d7e549525.tar.gz gcc-86fdda05914d35026362dbf8bee8520d7e549525.tar.bz2 |
re PR bootstrap/80978 (LTO/PGO bootstrap broken by r248863)
PR bootstrap/80978
* tree-cfg.c (execute_fixup_cfg): Fix condition on when to rescale
profile.
From-SVN: r248915
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/tree-cfg.c | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index baee1e6..1e0542e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2017-06-06 Jan Hubicka <hubicka@ucw.cz> + PR bootstrap/80978 + * tree-cfg.c (execute_fixup_cfg): Fix condition on when to rescale + profile. + +2017-06-06 Jan Hubicka <hubicka@ucw.cz> + * shrink-wrap.c (handle_simple_exit): Update profile. (try_shrink_wrapping): Upate profile. diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 1d5271a..c84e99d 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -9077,7 +9077,9 @@ execute_fixup_cfg (void) cgraph_node *node = cgraph_node::get (current_function_decl); profile_count num = node->count; profile_count den = ENTRY_BLOCK_PTR_FOR_FN (cfun)->count; - bool scale = num.initialized_p () && den.initialized_p () && !(num == den); + bool scale = num.initialized_p () + && (den > 0 || num == profile_count::zero ()) + && !(num == den); if (scale) { |