From: Jan Hubicka Date: Thu, 16 Nov 2017 11:04:40 +0000 (+0100) Subject: tree-vect-loop-manip.c (vect_do_peeling): Do not use scale_bbs_frequencies_int. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=00fa28d1b471a3aca9994a21363ce3f58b6bd2f2;p=gcc.git tree-vect-loop-manip.c (vect_do_peeling): Do not use scale_bbs_frequencies_int. * tree-vect-loop-manip.c (vect_do_peeling): Do not use scale_bbs_frequencies_int. From-SVN: r254810 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 93d4cb3423c..872ca086308 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-11-14 Jan Hubicka + + * tree-vect-loop-manip.c (vect_do_peeling): Do not use + scale_bbs_frequencies_int. + 2017-11-14 Jan Hubicka * final.c (compute_alignments): Use counts rather than frequencies. diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c index be34310fd03..1df591e69f2 100644 --- a/gcc/tree-vect-loop-manip.c +++ b/gcc/tree-vect-loop-manip.c @@ -1844,14 +1844,16 @@ vect_do_peeling (loop_vec_info loop_vinfo, tree niters, tree nitersm1, /* Simply propagate profile info from guard_bb to guard_to which is a merge point of control flow. */ guard_to->count = guard_bb->count; + /* Scale probability of epilog loop back. FIXME: We should avoid scaling down and back up. Profile may get lost if we scale down to 0. */ - int scale_up = REG_BR_PROB_BASE * REG_BR_PROB_BASE - / prob_vector.to_reg_br_prob_base (); basic_block *bbs = get_loop_body (epilog); - scale_bbs_frequencies_int (bbs, epilog->num_nodes, scale_up, - REG_BR_PROB_BASE); + for (unsigned int i = 0; i < epilog->num_nodes; i++) + bbs[i]->count = bbs[i]->count.apply_scale + (bbs[i]->count, + bbs[i]->count.apply_probability + (prob_vector)); free (bbs); }