diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2017-11-18 23:55:56 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2017-11-18 22:55:56 +0000 |
commit | 517048cef0edf7ec35d7091ef4fea232edd48a53 (patch) | |
tree | 87fb8324893c35156edda2a67cd930e5e58da277 /gcc/ipa-inline-transform.c | |
parent | 2563a16d3c7a56cd1e0cfe9b4ccb702edfb12312 (diff) | |
download | gcc-517048cef0edf7ec35d7091ef4fea232edd48a53.zip gcc-517048cef0edf7ec35d7091ef4fea232edd48a53.tar.gz gcc-517048cef0edf7ec35d7091ef4fea232edd48a53.tar.bz2 |
cgraphclones.c (cgraph_edge::clone): Rename gcov_count to prof_count.
* cgraphclones.c (cgraph_edge::clone): Rename gcov_count to prof_count.
(cgraph_edge::clone): Cleanup updating of profile.
* ipa-cp.c (update_profiling_info): Likewise.
* ipa-inline-transform.c (inline_transform): Likewise.
* ipa-inline.c (inline_small_functions): Add missing space to dump.
* ipa-split.c (execute_split_functions): Do not split when function
is cold.
* predict.c (estimate_bb_frequencies): Cleanup updating of profile.
* profile-count.c (profile_count::dump): Add global0.
(profile_count::to_cgraph_frequency): Do not ICE when entry is
undefined.
(profile_count::to_sreal_scale): Likewise.
(profile_count::adjust_for_ipa_scaling): Fix typo in comment.
(profile_count::combine_with_ipa_count): New function.
* profile-count.h (profile_guessed_global0adjusted): New.
(profile_count::adjusted_zero): New.
(profile_count::global0adjusted): New.
(profile_count::combine_with_ipa_count): New.
* tree-inline.c (copy_edges_for_bb): Add NUM/DEN arugment;
correct profile of return block of split functions.
(copy_cfg_body): Remove unused profile_count.
(copy_body): Likewise.
(expand_call_inline): Update.
(tree_function_versioning): Update.
From-SVN: r254919
Diffstat (limited to 'gcc/ipa-inline-transform.c')
-rw-r--r-- | gcc/ipa-inline-transform.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/ipa-inline-transform.c b/gcc/ipa-inline-transform.c index 8e66483..0ed3fbd 100644 --- a/gcc/ipa-inline-transform.c +++ b/gcc/ipa-inline-transform.c @@ -657,11 +657,10 @@ inline_transform (struct cgraph_node *node) { profile_count num = node->count; profile_count den = ENTRY_BLOCK_PTR_FOR_FN (cfun)->count; - bool scale = num.initialized_p () && den.ipa_p () - && (den.nonzero_p () || num == profile_count::zero ()) - && !(num == den.ipa ()); + bool scale = num.initialized_p () && !(num == den); if (scale) { + profile_count::adjust_for_ipa_scaling (&num, &den); if (dump_file) { fprintf (dump_file, "Applying count scale "); @@ -672,11 +671,12 @@ inline_transform (struct cgraph_node *node) } basic_block bb; + cfun->cfg->count_max = profile_count::uninitialized (); FOR_ALL_BB_FN (bb, cfun) - if (num == profile_count::zero ()) - bb->count = bb->count.global0 (); - else + { bb->count = bb->count.apply_scale (num, den); + cfun->cfg->count_max = cfun->cfg->count_max.max (bb->count); + } ENTRY_BLOCK_PTR_FOR_FN (cfun)->count = node->count; } todo = optimize_inline_calls (current_function_decl); |