aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorBin Cheng <bin.cheng@linux.alibaba.com>2018-12-09 06:37:56 +0000
committerBin Cheng <amker@gcc.gnu.org>2018-12-09 06:37:56 +0000
commit5a686851dccf1150ba0356b4982f95069bc4cce2 (patch)
tree66b6726f33b5556cac47a0bda8a2cb798e087bdb /gcc
parent019761d2240fc7754a50ee2b9e199c0591c21c7a (diff)
downloadgcc-5a686851dccf1150ba0356b4982f95069bc4cce2.zip
gcc-5a686851dccf1150ba0356b4982f95069bc4cce2.tar.gz
gcc-5a686851dccf1150ba0356b4982f95069bc4cce2.tar.bz2
ipa-cp.c (update_profiling_info): Call adjust_for_ipa_scaling for zero profile count.
* ipa-cp.c (update_profiling_info): Call adjust_for_ipa_scaling for zero profile count. From-SVN: r266918
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/ipa-cp.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f97a51e..515fb32 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2018-12-08 Bin Cheng <bin.cheng@linux.alibaba.com>
+
+ * ipa-cp.c (update_profiling_info): Call adjust_for_ipa_scaling for
+ zero profile count.
+
2018-12-08 Jakub Jelinek <jakub@redhat.com>
PR fortran/88304
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index c7c462a..d9ac7d8 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -3719,9 +3719,11 @@ update_profiling_info (struct cgraph_node *orig_node,
new_sum = orig_node_count.combine_with_ipa_count (new_sum);
orig_node->count = remainder;
+ profile_count::adjust_for_ipa_scaling (&new_sum, &orig_node_count);
for (cs = new_node->callees; cs; cs = cs->next_callee)
cs->count = cs->count.apply_scale (new_sum, orig_node_count);
+ profile_count::adjust_for_ipa_scaling (&remainder, &orig_node_count);
for (cs = orig_node->callees; cs; cs = cs->next_callee)
cs->count = cs->count.apply_scale (remainder, orig_node_count);