ipa-cp.c (update_profiling_info): Call adjust_for_ipa_scaling for zero profile count.
authorBin Cheng <bin.cheng@linux.alibaba.com>
Sun, 9 Dec 2018 06:37:56 +0000 (06:37 +0000)
committerBin Cheng <amker@gcc.gnu.org>
Sun, 9 Dec 2018 06:37:56 +0000 (06:37 +0000)
* ipa-cp.c (update_profiling_info): Call adjust_for_ipa_scaling for
zero profile count.

From-SVN: r266918

gcc/ChangeLog
gcc/ipa-cp.c

index f97a51ef7ffcd7528bfe036914f0500353500440..515fb32997d1607bcc4546d7828f00c559535ce8 100644 (file)
@@ -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
index c7c462ab816352bd61e584e3da4008d3befadf43..d9ac7d8c35c82eaef7f1ea54805970d2aef0506f 100644 (file)
@@ -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);