diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-08-28 01:32:10 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-08-28 01:32:10 +0000 |
commit | 3fc84d1a6942cf9b424a612a080f40c9b7856e15 (patch) | |
tree | aa4a146075ee60eeed30ad01f50c72a006080fae /gcc/flow.c | |
parent | ae7d8bb606f81d84339ca8a545b578f2996d98d7 (diff) | |
download | gcc-3fc84d1a6942cf9b424a612a080f40c9b7856e15.tar.gz |
* flow.c (redirect_edge_succ_nodup): Return new edge.
(try_simplify_condjump): Use new edge.
* basic-block.h (redirect_edge_succ_nodup): Update prototype.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45222 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/flow.c')
-rw-r--r-- | gcc/flow.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/flow.c b/gcc/flow.c index f1e7a6c3c7b..d2f37e5f2d4 100644 --- a/gcc/flow.c +++ b/gcc/flow.c @@ -3335,8 +3335,10 @@ try_simplify_condjump (cbranch_block) /* Success. Update the CFG to match. Note that after this point the edge variable names appear backwards; the redirection is done this way to preserve edge profile data. */ - redirect_edge_succ_nodup (cbranch_jump_edge, cbranch_dest_block); - redirect_edge_succ_nodup (cbranch_fallthru_edge, jump_dest_block); + cbranch_jump_edge = redirect_edge_succ_nodup (cbranch_jump_edge, + cbranch_dest_block); + cbranch_fallthru_edge = redirect_edge_succ_nodup (cbranch_fallthru_edge, + jump_dest_block); cbranch_jump_edge->flags |= EDGE_FALLTHRU; cbranch_fallthru_edge->flags &= ~EDGE_FALLTHRU; @@ -9029,7 +9031,7 @@ redirect_edge_succ (e, new_succ) /* Like previous but avoid possible dupplicate edge. */ -void +edge redirect_edge_succ_nodup (e, new_succ) edge e; basic_block new_succ; @@ -9045,9 +9047,11 @@ redirect_edge_succ_nodup (e, new_succ) s->probability += e->probability; s->count += e->count; remove_edge (e); + e = s; } else redirect_edge_succ (e, new_succ); + return e; } /* Redirect an edge's predecessor from one block to another. */ |