mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-08 19:20:44 +08:00
bb-reorder.c (make_reorder_chain_1): Search harder for the vax casesi fallthru edge.
2002-06-21 Richard Henderson <rth@redhat.com> * bb-reorder.c (make_reorder_chain_1): Search harder for the vax casesi fallthru edge. * cfglayout.c (cleanup_unconditional_jumps): Use redirect_edge_succ_nodup. Do not delete ADDR_VEC insns as dead. * cfgrtl.c (force_nonfallthru_and_redirect): Place redirection block after ADDR_VEC. From-SVN: r54885
This commit is contained in:
parent
b62cc13a20
commit
31a782981f
@ -1,3 +1,12 @@
|
||||
2002-06-21 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* bb-reorder.c (make_reorder_chain_1): Search harder for the
|
||||
vax casesi fallthru edge.
|
||||
* cfglayout.c (cleanup_unconditional_jumps): Use
|
||||
redirect_edge_succ_nodup. Do not delete ADDR_VEC insns as dead.
|
||||
* cfgrtl.c (force_nonfallthru_and_redirect): Place redirection
|
||||
block after ADDR_VEC.
|
||||
|
||||
2002-06-21 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
|
||||
|
||||
* config/sparc/t-linux64 (EXTRA_MULTILIB_PARTS): Add crtfastmath.o.
|
||||
|
@ -209,17 +209,21 @@ make_reorder_chain_1 (bb, prev)
|
||||
/* In the absence of a prediction, disturb things as little as possible
|
||||
by selecting the old "next" block from the list of successors. If
|
||||
there had been a fallthru edge, that will be the one. */
|
||||
/* Note that the fallthru block may not be next any time we eliminate
|
||||
forwarder blocks. */
|
||||
if (! next)
|
||||
{
|
||||
for (e = bb->succ; e ; e = e->succ_next)
|
||||
if (e->dest == bb->next_bb)
|
||||
if (e->flags & EDGE_FALLTHRU)
|
||||
{
|
||||
if ((e->flags & EDGE_FALLTHRU)
|
||||
|| (e->dest->succ
|
||||
&& ! (e->flags & (EDGE_ABNORMAL_CALL | EDGE_EH))))
|
||||
next = e->dest;
|
||||
next = e->dest;
|
||||
break;
|
||||
}
|
||||
else if (e->dest == bb->next_bb)
|
||||
{
|
||||
if (! (e->flags & (EDGE_ABNORMAL_CALL | EDGE_EH)))
|
||||
next = e->dest;
|
||||
}
|
||||
}
|
||||
|
||||
/* Make sure we didn't select a silly next block. */
|
||||
|
@ -608,10 +608,9 @@ verify_insn_chain ()
|
||||
}
|
||||
|
||||
/* Remove any unconditional jumps and forwarder block creating fallthru
|
||||
edges instead. During BB reordering fallthru edges are not required
|
||||
edges instead. During BB reordering, fallthru edges are not required
|
||||
to target next basic block in the linear CFG layout, so the unconditional
|
||||
jumps are not needed. If LOOPS is not null, also update loop structure &
|
||||
dominators. */
|
||||
jumps are not needed. */
|
||||
|
||||
static void
|
||||
cleanup_unconditional_jumps ()
|
||||
@ -636,7 +635,7 @@ cleanup_unconditional_jumps ()
|
||||
fprintf (rtl_dump_file, "Removing forwarder BB %i\n",
|
||||
bb->index);
|
||||
|
||||
redirect_edge_succ (bb->pred, bb->succ->dest);
|
||||
redirect_edge_succ_nodup (bb->pred, bb->succ->dest);
|
||||
flow_delete_block (bb);
|
||||
bb = prev;
|
||||
}
|
||||
@ -653,8 +652,6 @@ cleanup_unconditional_jumps ()
|
||||
else
|
||||
continue;
|
||||
|
||||
/* Cleanup barriers and delete ADDR_VECs in a way as they are belonging
|
||||
to removed tablejump anyway. */
|
||||
insn = NEXT_INSN (bb->end);
|
||||
while (insn
|
||||
&& (GET_CODE (insn) != NOTE
|
||||
@ -664,12 +661,6 @@ cleanup_unconditional_jumps ()
|
||||
|
||||
if (GET_CODE (insn) == BARRIER)
|
||||
delete_barrier (insn);
|
||||
else if (GET_CODE (insn) == JUMP_INSN)
|
||||
delete_insn_chain (PREV_INSN (insn), insn);
|
||||
else if (GET_CODE (insn) == CODE_LABEL)
|
||||
;
|
||||
else if (GET_CODE (insn) != NOTE)
|
||||
abort ();
|
||||
|
||||
insn = next;
|
||||
}
|
||||
|
16
gcc/cfgrtl.c
16
gcc/cfgrtl.c
@ -963,9 +963,21 @@ force_nonfallthru_and_redirect (e, target)
|
||||
if (e->src->succ->succ_next)
|
||||
{
|
||||
/* Create the new structures. */
|
||||
|
||||
/* Position the new block correctly relative to loop notes. */
|
||||
note = last_loop_beg_note (e->src->end);
|
||||
jump_block
|
||||
= create_basic_block (NEXT_INSN (note), NULL, e->src);
|
||||
note = NEXT_INSN (note);
|
||||
|
||||
/* ... and ADDR_VECs. */
|
||||
if (note != NULL
|
||||
&& GET_CODE (note) == CODE_LABEL
|
||||
&& NEXT_INSN (note)
|
||||
&& GET_CODE (NEXT_INSN (note)) == JUMP_INSN
|
||||
&& (GET_CODE (PATTERN (NEXT_INSN (note))) == ADDR_DIFF_VEC
|
||||
|| GET_CODE (PATTERN (NEXT_INSN (note))) == ADDR_VEC))
|
||||
note = NEXT_INSN (NEXT_INSN (note));
|
||||
|
||||
jump_block = create_basic_block (note, NULL, e->src);
|
||||
jump_block->count = e->count;
|
||||
jump_block->frequency = EDGE_FREQUENCY (e);
|
||||
jump_block->loop_depth = target->loop_depth;
|
||||
|
Loading…
x
Reference in New Issue
Block a user