From a9a4edf0e71bbac9f1b5dcecdcf9250111d16889 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Sat, 30 Nov 2019 22:25:24 +0100 Subject: [PATCH] Update max_bb_count in execute_fixup_cfg * tree-cfg.c (execute_fixup_cfg): Update also max_bb_count when scaling happen. From-SVN: r278879 --- gcc/ChangeLog | 5 +++++ gcc/tree-cfg.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c03556b8d3b..e173bad5c44 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-11-30 Jan Hubicka + + * tree-cfg.c (execute_fixup_cfg): Update also max_bb_count when + scaling happen. + 2019-11-30 Jan Hubicka * cgraph.h (symtab_node): Add symver flag. diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index eb268e32b2d..8e5179e6291 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -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)) -- 2.30.2