auto-profile.c (afdo_annotate_cfg): Invoke update_ssa in the right place.

gcc/ChangeLog:
2014-12-17  Dehao Chen  <dehao@google.com>

        * auto-profile.c (afdo_annotate_cfg): Invoke update_ssa in the right
        place.
        (auto_profile): Recompute inline summary after processing cgraph node.

From-SVN: r218854
This commit is contained in:
Dehao Chen 2014-12-18 00:19:24 +00:00 committed by Dehao Chen
parent 6fc5f22af3
commit 29ca9bfb90
2 changed files with 13 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2014-12-17 Dehao Chen <dehao@google.com>
* auto-profile.c (afdo_annotate_cfg): Invoke update_ssa in the right
place.
(auto_profile): Recompute inline summary after processing cgraph node.
2014-12-17 Oleg Endo <olegendo@gcc.gnu.org>
PR target/51244

View File

@ -1521,7 +1521,12 @@ afdo_annotate_cfg (const stmt_set &promoted_stmts)
profile_status_for_fn (cfun) = PROFILE_READ;
}
if (flag_value_profile_transformations)
gimple_value_profile_transformations ();
{
gimple_value_profile_transformations ();
free_dominance_info (CDI_DOMINATORS);
free_dominance_info (CDI_POST_DOMINATORS);
update_ssa (TODO_update_ssa);
}
}
/* Wrapper function to invoke early inliner. */
@ -1599,7 +1604,6 @@ auto_profile (void)
early_inline ();
autofdo::afdo_annotate_cfg (promoted_stmts);
compute_function_frequency ();
update_ssa (TODO_update_ssa);
/* Local pure-const may imply need to fixup the cfg. */
if (execute_fixup_cfg () & TODO_cleanup_cfg)
@ -1608,6 +1612,7 @@ auto_profile (void)
free_dominance_info (CDI_DOMINATORS);
free_dominance_info (CDI_POST_DOMINATORS);
cgraph_edge::rebuild_edges ();
compute_inline_parameters (cgraph_node::get (current_function_decl), true);
pop_cfun ();
}