aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2017-07-16 20:25:26 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2017-07-16 18:25:26 +0000
commit1234ee19c9a7b175c154f987d3089d669d17501a (patch)
tree68b1b5e7c40dc5d48e22f371d06b21cb8e460a76 /gcc/tree-vect-loop.c
parent109bb9be651660bd3624509880c5cb487698a2e9 (diff)
downloadgcc-1234ee19c9a7b175c154f987d3089d669d17501a.zip
gcc-1234ee19c9a7b175c154f987d3089d669d17501a.tar.gz
gcc-1234ee19c9a7b175c154f987d3089d669d17501a.tar.bz2
tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Use profile_proability for scalling.
* tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Use profile_proability for scalling. * scale_profile_for_vect_loop.c (scale_profile_for_vect_loop): Likewise. From-SVN: r250245
Diffstat (limited to 'gcc/tree-vect-loop.c')
-rw-r--r--gcc/tree-vect-loop.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index 8168f27..6c18c8f 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -7222,13 +7222,11 @@ scale_profile_for_vect_loop (struct loop *loop, unsigned vf)
.apply_scale (1, new_est_niter + 1);
edge exit_l = single_pred_edge (loop->latch);
- int prob = exit_l->probability.initialized_p ()
- ? exit_l->probability.to_reg_br_prob_base () : 0;
+ profile_probability prob = exit_l->probability;
exit_l->probability = exit_e->probability.invert ();
exit_l->count = exit_bb->count - exit_e->count;
- if (prob > 0)
- scale_bbs_frequencies_int (&loop->latch, 1,
- exit_l->probability.to_reg_br_prob_base (), prob);
+ if (prob.initialized_p () && exit_l->probability.initialized_p ())
+ scale_bbs_frequencies (&loop->latch, 1, exit_l->probability / prob);
}
/* Function vect_transform_loop.