From 29ca9bfb905a864546e5b22ca3f5b3ebd5cbb0a8 Mon Sep 17 00:00:00 2001 From: Dehao Chen Date: Thu, 18 Dec 2014 00:19:24 +0000 Subject: [PATCH] auto-profile.c (afdo_annotate_cfg): Invoke update_ssa in the right place. gcc/ChangeLog: 2014-12-17 Dehao Chen * 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 --- gcc/ChangeLog | 6 ++++++ gcc/auto-profile.c | 9 +++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f9e1af53b42..c315f63fc2c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-12-17 Dehao Chen + + * 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 PR target/51244 diff --git a/gcc/auto-profile.c b/gcc/auto-profile.c index 7055c4ac819..085bbd6ec54 100644 --- a/gcc/auto-profile.c +++ b/gcc/auto-profile.c @@ -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 (); } -- 2.30.2