diff options
Diffstat (limited to 'gcc/cgraphclones.c')
-rw-r--r-- | gcc/cgraphclones.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/cgraphclones.c b/gcc/cgraphclones.c index fa6a911..f015f18 100644 --- a/gcc/cgraphclones.c +++ b/gcc/cgraphclones.c @@ -102,8 +102,7 @@ cgraph_clone_edge (struct cgraph_edge *e, struct cgraph_node *n, int freq_scale, bool update_original) { struct cgraph_edge *new_edge; - /* Update this to use GCOV_COMPUTE_SCALE. */ - gcov_type count = e->count * count_scale / REG_BR_PROB_BASE; + gcov_type count = apply_probability (e->count, count_scale); gcov_type freq; /* We do not want to ignore loop nest after frequency drops to 0. */ @@ -205,8 +204,7 @@ cgraph_clone_node (struct cgraph_node *n, tree decl, gcov_type count, int freq, if (new_node->count > n->count) count_scale = REG_BR_PROB_BASE; else - /* Update to use GCOV_COMPUTE_SCALE. */ - count_scale = new_node->count * REG_BR_PROB_BASE / n->count; + count_scale = GCOV_COMPUTE_SCALE (new_node->count, n->count); } else count_scale = 0; |