diff options
author | Kazu Hirata <kazu@cs.umass.edu> | 2004-10-25 21:46:18 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2004-10-25 21:46:18 +0000 |
commit | 5132abc2a854979cf96b725ee0aaef2cd3121799 (patch) | |
tree | bae5635c52da0ceca84728ad777ac4425db8d162 /gcc/cfgloopmanip.c | |
parent | 3401a17fcbee4b9524111a94ddd5208661ad39ce (diff) | |
download | gcc-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/cfgloopmanip.c')
-rw-r--r-- | gcc/cfgloopmanip.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/cfgloopmanip.c b/gcc/cfgloopmanip.c index 6d47756..f3e8f18 100644 --- a/gcc/cfgloopmanip.c +++ b/gcc/cfgloopmanip.c @@ -482,13 +482,14 @@ scale_loop_frequencies (struct loop *loop, int num, int den) accordingly. Everything between them plus LATCH_EDGE destination must be dominated by HEADER_EDGE destination, and back-reachable from LATCH_EDGE source. HEADER_EDGE is redirected to basic block SWITCH_BB, - FALLTHRU_EDGE (SWITCH_BB) to original destination of HEADER_EDGE and - BRANCH_EDGE (SWITCH_BB) to original destination of LATCH_EDGE. + FALSE_EDGE of SWITCH_BB to original destination of HEADER_EDGE and + TRUE_EDGE of SWITCH_BB to original destination of LATCH_EDGE. Returns newly created loop. */ struct loop * loopify (struct loops *loops, edge latch_edge, edge header_edge, - basic_block switch_bb, bool redirect_all_edges) + basic_block switch_bb, edge true_edge, edge false_edge, + bool redirect_all_edges) { basic_block succ_bb = latch_edge->dest; basic_block pred_bb = header_edge->src; @@ -514,14 +515,14 @@ loopify (struct loops *loops, edge latch_edge, edge header_edge, /* Redirect edges. */ loop_redirect_edge (latch_edge, loop->header); - loop_redirect_edge (BRANCH_EDGE (switch_bb), succ_bb); + loop_redirect_edge (true_edge, succ_bb); /* During loop versioning, one of the switch_bb edge is already properly set. Do not redirect it again unless redirect_all_edges is true. */ if (redirect_all_edges) { loop_redirect_edge (header_edge, switch_bb); - loop_redirect_edge (FALLTHRU_EDGE (switch_bb), loop->header); + loop_redirect_edge (false_edge, loop->header); /* Update dominators. */ set_immediate_dominator (CDI_DOMINATORS, switch_bb, pred_bb); |