+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.
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);
&& (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)