diff options
author | Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> | 2002-09-07 16:02:55 +0200 |
---|---|---|
committer | Zdenek Dvorak <rakdver@gcc.gnu.org> | 2002-09-07 14:02:55 +0000 |
commit | 39587bb9f39130beb3a499e4ecb67b7971354ef1 (patch) | |
tree | 212ae3fc2c728076495908805b060a2ede8f6bb6 | |
parent | 92d9256d257aab3b1d05cb1a89d13f7b9d129a62 (diff) | |
download | gcc-39587bb9f39130beb3a499e4ecb67b7971354ef1.zip gcc-39587bb9f39130beb3a499e4ecb67b7971354ef1.tar.gz gcc-39587bb9f39130beb3a499e4ecb67b7971354ef1.tar.bz2 |
cfgcleanup.c (try_crossjump_to_edge): Fix updating of liveness information.
* cfgcleanup.c (try_crossjump_to_edge): Fix updating of liveness
information.
From-SVN: r56916
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cfgcleanup.c | 28 |
2 files changed, 11 insertions, 22 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 798c3ad..e666c3f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-09-07 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> + + * cfgcleanup.c (try_crossjump_to_edge): Fix updating of liveness + information. + 2002-09-07 Graham Stott <graham.stott@btinternet.con> * rtlanal.c (dead_or_set_regno_p): Fix typo. diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index 1d662ce..f6a011a 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -1308,11 +1308,9 @@ try_crossjump_to_edge (mode, e1, e2) { int nmatch; basic_block src1 = e1->src, src2 = e2->src; - basic_block redirect_to; + basic_block redirect_to, redirect_from, to_remove; rtx newpos1, newpos2; edge s; - rtx last; - rtx label; /* Search backward through forwarder blocks. We don't need to worry about multiple entry or chained forwarders, as they will be optimized @@ -1440,28 +1438,14 @@ try_crossjump_to_edge (mode, e1, e2) if (GET_CODE (newpos1) == NOTE) newpos1 = NEXT_INSN (newpos1); - last = src1->end; - /* Emit the jump insn. */ - label = block_label (redirect_to); - emit_jump_insn_after (gen_jump (label), src1->end); - JUMP_LABEL (src1->end) = label; - LABEL_NUSES (label)++; + redirect_from = split_block (src1, PREV_INSN (newpos1))->src; + to_remove = redirect_from->succ->dest; - /* Delete the now unreachable instructions. */ - delete_insn_chain (newpos1, last); + redirect_edge_and_branch_force (redirect_from->succ, redirect_to); + flow_delete_block (to_remove); - /* Make sure there is a barrier after the new jump. */ - last = next_nonnote_insn (src1->end); - if (!last || GET_CODE (last) != BARRIER) - emit_barrier_after (src1->end); - - /* Update CFG. */ - while (src1->succ) - remove_edge (src1->succ); - make_single_succ_edge (src1, redirect_to, 0); - - update_forwarder_flag (src1); + update_forwarder_flag (redirect_from); return true; } |