From 57fa080bf6c0ae01bf1643a87e72ca636bde0454 Mon Sep 17 00:00:00 2001 From: Bin Cheng Date: Mon, 27 Feb 2017 10:20:36 +0000 Subject: re PR tree-optimization/77536 (Vectorizer not maintaining relationship of relative block frequencies in absence of real profile data) PR tree-optimization/77536 * tree-ssa-loop-manip.c (niter_for_unrolled_loop): New function. (tree_transform_and_unroll_loop): Use above function to compute the estimated niter of unrolled loop and use it when scaling profile. Also use count info rather than frequency if it's non-zero. * tree-ssa-loop-manip.h niter_for_unrolled_loop(): New declaration. * tree-vect-loop.c (scale_profile_for_vect_loop): New function. (vect_transform_loop): Call above function. gcc/testsuite * gcc.dg/vect/pr79347.c: Revise testing string. From-SVN: r245754 --- gcc/tree-ssa-loop-manip.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/tree-ssa-loop-manip.h') diff --git a/gcc/tree-ssa-loop-manip.h b/gcc/tree-ssa-loop-manip.h index 1e7531f..a139050 100644 --- a/gcc/tree-ssa-loop-manip.h +++ b/gcc/tree-ssa-loop-manip.h @@ -48,6 +48,7 @@ extern bool gimple_duplicate_loop_to_header_edge (struct loop *, edge, int); extern bool can_unroll_loop_p (struct loop *loop, unsigned factor, struct tree_niter_desc *niter); +extern gcov_type niter_for_unrolled_loop (struct loop *, unsigned); extern void tree_transform_and_unroll_loop (struct loop *, unsigned, edge, struct tree_niter_desc *, transform_callback, void *); -- cgit v1.1