From 03cb2019ff14e03b2256bc6dca8a1bd3ec2bede9 Mon Sep 17 00:00:00 2001 From: Zdenek Dvorak Date: Wed, 3 Jan 2007 02:29:00 +0000 Subject: loop-unswitch.c (unswitch_loop): Pass probabilities to loopify. * loop-unswitch.c (unswitch_loop): Pass probabilities to loopify. * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Pass probabilities to loop_version. * cfgloopmanip.c (scale_loop_frequencies): Export. (loopify): Scale the frequencies by prescribed coefficients. (set_zero_probability): New function. (duplicate_loop_to_header_edge): Improve updating of frequencies. (lv_adjust_loop_entry_edge, loop_version): Set probabilities and frequencies according to arguments. * tree-ssa-loop-manip.c (tree_unroll_loop): Set probabilities correctly. * cfg.c (scale_bbs_frequencies_int): Allow scaling the frequencies up. * modulo-sched.c (sms_schedule): Set probabilities for entering versioned loop correctly. * tree-vect-transform.c (vect_transform_loop): Ditto. * cfgloop.h (loopify, loop_version): Declaration changed. (scale_loop_frequencies): Declared. * gcc.dg/tree-ssa/update-unroll-1.c: New test. * gcc.dg/tree-ssa/update-unswitch-1.c: New test. From-SVN: r120378 --- gcc/loop-unswitch.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/loop-unswitch.c') diff --git a/gcc/loop-unswitch.c b/gcc/loop-unswitch.c index 38706d174d8..b0e2aaa12be 100644 --- a/gcc/loop-unswitch.c +++ b/gcc/loop-unswitch.c @@ -451,7 +451,8 @@ unswitch_loop (struct loop *loop, basic_block unswitch_on, rtx cond, rtx cinsn) /* Loopify from the copy of LOOP body, constructing the new loop. */ nloop = loopify (latch_edge, single_pred_edge (get_bb_copy (loop->header)), switch_bb, - BRANCH_EDGE (switch_bb), FALLTHRU_EDGE (switch_bb), true); + BRANCH_EDGE (switch_bb), FALLTHRU_EDGE (switch_bb), true, + prob, REG_BR_PROB_BASE - prob); /* Remove branches that are now unreachable in new loops. */ remove_path (true_edge); -- cgit v1.2.1