Commit 86fdda05 by Jan Hubicka Committed by Jan Hubicka

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
parent d2537732
2017-06-06 Jan Hubicka <hubicka@ucw.cz> 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. * shrink-wrap.c (handle_simple_exit): Update profile.
(try_shrink_wrapping): Upate profile. (try_shrink_wrapping): Upate profile.
......
...@@ -9077,7 +9077,9 @@ execute_fixup_cfg (void) ...@@ -9077,7 +9077,9 @@ execute_fixup_cfg (void)
cgraph_node *node = cgraph_node::get (current_function_decl); cgraph_node *node = cgraph_node::get (current_function_decl);
profile_count num = node->count; profile_count num = node->count;
profile_count den = ENTRY_BLOCK_PTR_FOR_FN (cfun)->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) if (scale)
{ {
......
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