flow.c (try_optimize_cfg): Delete whole chain of trivially dead basic blocks.
authorJan Hubicka <jh@suse.cz>
Thu, 12 Jul 2001 16:01:33 +0000 (18:01 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Thu, 12 Jul 2001 16:01:33 +0000 (16:01 +0000)
* flow.c (try_optimize_cfg): Delete whole chain of trivially dead
basic blocks.
(verify_flow_info): Make diagnostics prettier.

From-SVN: r43967

gcc/ChangeLog
gcc/flow.c

index cc1c003a4a3d01139491e0dd4587b00f7300c80e..468064a61ae9124d7adf0bf137b2a7bf1c549fc1 100644 (file)
@@ -1,3 +1,9 @@
+Thu Jul 12 17:57:16 CEST 2001  Jan Hubicka  <jh@suse.cz>
+
+       * 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  <jh@suse.cz>
 
        * flow.c (find_basic_blocks_1): Do not emit NOP after call.
index 51fe12ce1563d5ad2dbc469451e8e400c319a0d9..92f63099ff2d3b8dc86db01c36e22ba0d50a497c 100644 (file)
@@ -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)