From: Jan Hubicka Date: Thu, 12 Jul 2001 16:01:33 +0000 (+0200) Subject: flow.c (try_optimize_cfg): Delete whole chain of trivially dead basic blocks. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6691db8e6b45f1c8bf6032663e60495fa02de9b2;p=gcc.git flow.c (try_optimize_cfg): Delete whole chain of trivially dead basic blocks. * flow.c (try_optimize_cfg): Delete whole chain of trivially dead basic blocks. (verify_flow_info): Make diagnostics prettier. From-SVN: r43967 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cc1c003a4a3..468064a61ae 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +Thu Jul 12 17:57:16 CEST 2001 Jan Hubicka + + * flow.c (try_optimize_cfg): Delete whole chain of trivially dead + basic blocks. + (verify_flow_info): Make diagnostics prettier. + Thu Jul 12 16:48:54 CEST 2001 Jan Hubicka * flow.c (find_basic_blocks_1): Do not emit NOP after call. diff --git a/gcc/flow.c b/gcc/flow.c index 51fe12ce156..92f63099ff2 100644 --- a/gcc/flow.c +++ b/gcc/flow.c @@ -3653,10 +3653,10 @@ try_optimize_cfg (mode) edge s; int changed_here = 0; - /* Delete trivially dead basic block. */ - if (b->pred == NULL) + /* Delete trivially dead basic blocks. */ + while (b->pred == NULL) { - c = BASIC_BLOCK (i - 1); + c = BASIC_BLOCK (b->index - 1); if (rtl_dump_file) fprintf (rtl_dump_file, "Deleting block %i.\n", b->index); flow_delete_block (b); @@ -7923,23 +7923,20 @@ verify_flow_info () && (e->src->index + 1 != e->dest->index || !can_fallthru (e->src, e->dest))) { - fprintf (stderr, - "verify_flow_info: Incorrect fallthru edge %i->%i\n", - e->src->index, e->dest->index); - fflush (stderr); + error ("verify_flow_info: Incorrect fallthru edge %i->%i", + e->src->index, e->dest->index); err = 1; } if (e->src != bb) { - fprintf (stderr, - "verify_flow_info: Basic block %d succ edge is corrupted\n", - bb->index); + error ("verify_flow_info: Basic block %d succ edge is corrupted", + bb->index); fprintf (stderr, "Predecessor: "); dump_edge_info (stderr, e, 0); fprintf (stderr, "\nSuccessor: "); dump_edge_info (stderr, e, 1); - fflush (stderr); + fprintf (stderr, "\n"); err = 1; } if (e->dest != EXIT_BLOCK_PTR)