aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-cp.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2017-11-18 23:55:56 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2017-11-18 22:55:56 +0000
commit517048cef0edf7ec35d7091ef4fea232edd48a53 (patch)
tree87fb8324893c35156edda2a67cd930e5e58da277 /gcc/ipa-cp.c
parent2563a16d3c7a56cd1e0cfe9b4ccb702edfb12312 (diff)
downloadgcc-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-cp.c')
-rw-r--r--gcc/ipa-cp.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index 4421abf..05228d0 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -3695,18 +3695,9 @@ update_profiling_info (struct cgraph_node *orig_node,
}
}
- if (!new_sum.nonzero_p ())
- {
- new_sum = new_sum.global0 ();
- new_node->count = new_sum;
- remainder = orig_node->count;
- }
- else
- {
- remainder = orig_node_count - new_sum;
- if (!remainder.nonzero_p ())
- remainder = orig_node_count.global0 ();
- }
+ remainder = orig_node_count.combine_with_ipa_count (orig_node_count.ipa ()
+ - new_sum.ipa ());
+ new_sum = orig_node_count.combine_with_ipa_count (new_sum);
orig_node->count = remainder;
for (cs = new_node->callees; cs; cs = cs->next_callee)