This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Google] Recompute function frequency after calculating branch probability


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]