auto-profile.c (afdo_annotate_cfg): Call update_max_bb_count even if autofdo counts...
authorBin Cheng <bin.cheng@linux.alibaba.com>
Fri, 14 Dec 2018 05:46:55 +0000 (05:46 +0000)
committerBin Cheng <amker@gcc.gnu.org>
Fri, 14 Dec 2018 05:46:55 +0000 (05:46 +0000)
* auto-profile.c (afdo_annotate_cfg): Call update_max_bb_count even
if autofdo counts are all zeros.

From-SVN: r267121

gcc/ChangeLog
gcc/auto-profile.c

index cb5824a7caffcc1e9acc2c06b437b5b5861ad664..39521bc129e95a5549b97bf2bfb392e40b88bdf5 100644 (file)
@@ -1,3 +1,8 @@
+2018-12-14  Bin Cheng  <bin.cheng@linux.alibaba.com>
+
+       * auto-profile.c (afdo_annotate_cfg): Call update_max_bb_count even
+       if autofdo counts are all zeros.
+
 2018-12-14  Bin Cheng  <bin.cheng@linux.alibaba.com>
 
        * auto-profile.c (afdo_indirect_call): Skip generating histogram
index f51a4bf4ce111bee1f2ee21c2a6218d8e2b79efb..d337cbc7200333519d2546c45f02f767e5c7ad67 100644 (file)
@@ -1553,9 +1553,9 @@ afdo_annotate_cfg (const stmt_set &promoted_stmts)
     {
       /* Calculate, propagate count and probability information on CFG.  */
       afdo_calculate_branch_prob (&annotated_bb);
-      update_max_bb_count ();
-      profile_status_for_fn (cfun) = PROFILE_READ;
     }
+  update_max_bb_count ();
+  profile_status_for_fn (cfun) = PROFILE_READ;
   if (flag_value_profile_transformations)
     {
       gimple_value_profile_transformations ();