diff options
author | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-03 02:29:00 +0000 |
---|---|---|
committer | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-03 02:29:00 +0000 |
commit | 7cef6c97cbe9575d82af3934ba9db98706d40dbd (patch) | |
tree | 65c401413cfba6d2049e2a002755074729d4e079 /gcc/tree-ssa-loop-unswitch.c | |
parent | f517b36eec084c177098f54c4755ab7222fb7e2f (diff) | |
download | gcc-7cef6c97cbe9575d82af3934ba9db98706d40dbd.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120378 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-loop-unswitch.c')
-rw-r--r-- | gcc/tree-ssa-loop-unswitch.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c index 52465db8611..7a329c96487 100644 --- a/gcc/tree-ssa-loop-unswitch.c +++ b/gcc/tree-ssa-loop-unswitch.c @@ -269,13 +269,17 @@ static struct loop * tree_unswitch_loop (struct loop *loop, basic_block unswitch_on, tree cond) { - basic_block condition_bb; + unsigned prob_true; + edge edge_true, edge_false; /* Some sanity checking. */ gcc_assert (flow_bb_inside_loop_p (loop, unswitch_on)); gcc_assert (EDGE_COUNT (unswitch_on->succs) == 2); gcc_assert (loop->inner == NULL); + extract_true_false_edges_from_block (unswitch_on, &edge_true, &edge_false); + prob_true = edge_true->probability; return loop_version (loop, unshare_expr (cond), - &condition_bb, false); + NULL, prob_true, prob_true, + REG_BR_PROB_BASE - prob_true, false); } |