aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-manip.c
diff options
context:
space:
mode:
authorKazu Hirata <kazu@cs.umass.edu>2004-10-25 21:46:18 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2004-10-25 21:46:18 +0000
commit5132abc2a854979cf96b725ee0aaef2cd3121799 (patch)
treebae5635c52da0ceca84728ad777ac4425db8d162 /gcc/tree-ssa-loop-manip.c
parent3401a17fcbee4b9524111a94ddd5208661ad39ce (diff)
downloadgcc-5132abc2a854979cf96b725ee0aaef2cd3121799.zip
gcc-5132abc2a854979cf96b725ee0aaef2cd3121799.tar.gz
gcc-5132abc2a854979cf96b725ee0aaef2cd3121799.tar.bz2
cfgloopmanip.c (loopify): Take two more arguments true_edge and false_edge.
* cfgloopmanip.c (loopify): Take two more arguments true_edge and false_edge. * cfgloop.h: Adjust the corresponding prototype. * loop-unswitch.c (unswitch_loop): Adjust a call to loopify. * tree-ssa-loop-manip.c (tree_ssa_loop_version): Likewise. From-SVN: r89555
Diffstat (limited to 'gcc/tree-ssa-loop-manip.c')
-rw-r--r--gcc/tree-ssa-loop-manip.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/tree-ssa-loop-manip.c b/gcc/tree-ssa-loop-manip.c
index 2dff13d..dc4b174 100644
--- a/gcc/tree-ssa-loop-manip.c
+++ b/gcc/tree-ssa-loop-manip.c
@@ -785,7 +785,7 @@ struct loop *
tree_ssa_loop_version (struct loops *loops, struct loop * loop,
tree cond_expr, basic_block *condition_bb)
{
- edge entry, latch_edge, exit;
+ edge entry, latch_edge, exit, true_edge, false_edge;
basic_block first_head, second_head;
int irred_flag;
struct loop *nloop;
@@ -819,10 +819,12 @@ tree_ssa_loop_version (struct loops *loops, struct loop * loop,
cond_expr);
latch_edge = EDGE_SUCC (loop->latch->rbi->copy, 0);
+
+ extract_true_false_edges_from_block (*condition_bb, &true_edge, &false_edge);
nloop = loopify (loops,
latch_edge,
EDGE_PRED (loop->header->rbi->copy, 0),
- *condition_bb,
+ *condition_bb, true_edge, false_edge,
false /* Do not redirect all edges. */);
exit = loop->single_exit;
@@ -833,7 +835,8 @@ tree_ssa_loop_version (struct loops *loops, struct loop * loop,
lv_update_pending_stmts (latch_edge);
/* loopify redirected condition_bb's succ edge. Update its PENDING_STMTS. */
- lv_update_pending_stmts (FALLTHRU_EDGE (*condition_bb));
+ extract_true_false_edges_from_block (*condition_bb, &true_edge, &false_edge);
+ lv_update_pending_stmts (false_edge);
/* Adjust irreducible flag. */
if (irred_flag)