Hi, This patch updates the function frequency after calculating branch probability. This is important because cold function could be promoted to hot after ipa-inline.
Bootstrapped and passed gcc regression tests. Okay for google-4_7? Thanks, Dehao --- a/gcc/predict.c +++ b/gcc/predict.c @@ -2877,7 +2877,10 @@ rebuild_frequencies (void) else if (profile_status == PROFILE_READ) { if (flag_auto_profile) - afdo_calculate_branch_prob (); + { + afdo_calculate_branch_prob (); + compute_function_frequency (); + } counts_to_freqs (); } else