This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: alternate jump.c patch
> Neither of these patches fixes gcc.c-torture/execute/920501-7.c
> on Alpha.
I see, in your testcase the abnormal edge is equivalent to fallthru
edge and try_optimize_cfg is still overactive on killing these.
Together with one of previous patches, this one should solve the problem.
I can't test if testcase works now on alpha but it looks better.
Tue Jul 17 20:48:31 CEST 2001 Jan Hubicka <jh@suse.cz>
* flow.c (try_optimize_cfg): Avoid collapsing of complex fallthru
edges.
Index: flow.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/flow.c,v
retrieving revision 1.429
diff -c -3 -p -r1.429 flow.c
*** flow.c 2001/07/17 04:55:23 1.429
--- flow.c 2001/07/17 18:48:22
*************** try_optimize_cfg (mode)
*** 3688,3693 ****
--- 3691,3697 ----
&& forwarder_block_p (b)
&& n_basic_blocks > 1
&& (b->pred->flags & EDGE_FALLTHRU)
+ && !(b->pred->flags & EDGE_COMPLEX)
&& (b->succ->flags & EDGE_FALLTHRU))
{
if (rtl_dump_file)
*************** try_optimize_cfg (mode)
*** 3706,3711 ****
--- 3710,3716 ----
if (!(mode & CLEANUP_PRE_SIBCALL)
&& b->pred->pred_next == NULL
&& (b->pred->flags & EDGE_FALLTHRU)
+ && !(b->pred->flags & EDGE_COMPLEX)
&& GET_CODE (b->head) == CODE_LABEL
/* If previous block does end with condjump jumping to next BB,
we can't delete the label. */
*************** try_optimize_cfg (mode)
*** 3725,3730 ****
--- 3730,3736 ----
&& s->succ_next == NULL
&& (s->flags & EDGE_EH) == 0
&& (c = s->dest) != EXIT_BLOCK_PTR
+ && !(s->flags & EDGE_COMPLEX)
&& c->pred->pred_next == NULL
/* If the jump insn has side effects,
we can't kill the edge. */