Update max_bb_count in execute_fixup_cfg
authorJan Hubicka <hubicka@ucw.cz>
Sat, 30 Nov 2019 21:25:24 +0000 (22:25 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sat, 30 Nov 2019 21:25:24 +0000 (21:25 +0000)
* tree-cfg.c (execute_fixup_cfg): Update also max_bb_count when
scaling happen.

From-SVN: r278879

gcc/ChangeLog
gcc/tree-cfg.c

index c03556b..e173bad 100644 (file)
@@ -1,5 +1,10 @@
 2019-11-30  Jan Hubicka  <hubicka@ucw.cz>
 
+       * tree-cfg.c (execute_fixup_cfg): Update also max_bb_count when
+       scaling happen.
+
+2019-11-30  Jan Hubicka  <hubicka@ucw.cz>
+
        * cgraph.h (symtab_node): Add symver flag.
        * cgraphunit.c (process_symver_attribute): New.
        (process_common_attributes): Use process_symver_attribute.
index eb268e3..8e5179e 100644 (file)
@@ -9551,6 +9551,7 @@ execute_fixup_cfg (void)
   gimple_stmt_iterator gsi;
   int todo = 0;
   cgraph_node *node = cgraph_node::get (current_function_decl);
+  /* Same scaling is also done by ipa_merge_profiles.  */
   profile_count num = node->count;
   profile_count den = ENTRY_BLOCK_PTR_FOR_FN (cfun)->count;
   bool scale = num.initialized_p () && !(num == den);
@@ -9664,7 +9665,10 @@ execute_fixup_cfg (void)
        }
     }
   if (scale)
-    compute_function_frequency ();
+    {
+      update_max_bb_count ();
+      compute_function_frequency ();
+    }
 
   if (current_loops
       && (todo & TODO_cleanup_cfg))