Commit 39587bb9 by Zdenek Dvorak Committed by Zdenek Dvorak

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
parent 92d9256d
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> 2002-09-07 Graham Stott <graham.stott@btinternet.con>
* rtlanal.c (dead_or_set_regno_p): Fix typo. * rtlanal.c (dead_or_set_regno_p): Fix typo.
......
...@@ -1308,11 +1308,9 @@ try_crossjump_to_edge (mode, e1, e2) ...@@ -1308,11 +1308,9 @@ try_crossjump_to_edge (mode, e1, e2)
{ {
int nmatch; int nmatch;
basic_block src1 = e1->src, src2 = e2->src; basic_block src1 = e1->src, src2 = e2->src;
basic_block redirect_to; basic_block redirect_to, redirect_from, to_remove;
rtx newpos1, newpos2; rtx newpos1, newpos2;
edge s; edge s;
rtx last;
rtx label;
/* Search backward through forwarder blocks. We don't need to worry /* Search backward through forwarder blocks. We don't need to worry
about multiple entry or chained forwarders, as they will be optimized about multiple entry or chained forwarders, as they will be optimized
...@@ -1440,28 +1438,14 @@ try_crossjump_to_edge (mode, e1, e2) ...@@ -1440,28 +1438,14 @@ try_crossjump_to_edge (mode, e1, e2)
if (GET_CODE (newpos1) == NOTE) if (GET_CODE (newpos1) == NOTE)
newpos1 = NEXT_INSN (newpos1); newpos1 = NEXT_INSN (newpos1);
last = src1->end;
/* Emit the jump insn. */ redirect_from = split_block (src1, PREV_INSN (newpos1))->src;
label = block_label (redirect_to); to_remove = redirect_from->succ->dest;
emit_jump_insn_after (gen_jump (label), src1->end);
JUMP_LABEL (src1->end) = label;
LABEL_NUSES (label)++;
/* Delete the now unreachable instructions. */ redirect_edge_and_branch_force (redirect_from->succ, redirect_to);
delete_insn_chain (newpos1, last); flow_delete_block (to_remove);
/* Make sure there is a barrier after the new jump. */ update_forwarder_flag (redirect_from);
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);
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment