diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2019-11-30 22:25:24 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2019-11-30 21:25:24 +0000 |
commit | a9a4edf0e71bbac9f1b5dcecdcf9250111d16889 (patch) | |
tree | 2e6926128dc761f83fcb484edba15157e0da53ec /gcc/tree-cfg.c | |
parent | d7ddfbcb7fa6e700639c9b916bf8a5ed15600950 (diff) | |
download | gcc-a9a4edf0e71bbac9f1b5dcecdcf9250111d16889.zip gcc-a9a4edf0e71bbac9f1b5dcecdcf9250111d16889.tar.gz gcc-a9a4edf0e71bbac9f1b5dcecdcf9250111d16889.tar.bz2 |
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
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r-- | gcc/tree-cfg.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index eb268e3..8e5179e 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)) |