/* Natural loop discovery code for GNU compiler.
- Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008
+ Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2010
Free Software Foundation, Inc.
This file is part of GCC.
/* If we have an abnormal predecessor, do not consider the
loop (not worth the problems). */
- FOR_EACH_EDGE (e, ei, header->preds)
- if (e->flags & EDGE_ABNORMAL)
- break;
- if (e)
+ if (bb_has_abnormal_pred (header))
continue;
FOR_EACH_EDGE (e, ei, header->preds)
for (i = 0; i < loop->num_nodes; i++)
bbs[i]->loop_father = outer;
+ free (bbs);
delete_loop (loop);
}
if (loops_state_satisfies_p (LOOPS_HAVE_PREHEADERS)
&& EDGE_COUNT (loop->header->preds) != 2)
{
- error ("loop %d's header does not have exactly 2 entries", i);
+ error ("loop %d%'s header does not have exactly 2 entries", i);
err = 1;
}
if (loops_state_satisfies_p (LOOPS_HAVE_SIMPLE_LATCHES))
{
if (!single_succ_p (loop->latch))
{
- error ("loop %d's latch does not have exactly 1 successor", i);
+ error ("loop %d%'s latch does not have exactly 1 successor", i);
err = 1;
}
if (single_succ (loop->latch) != loop->header)
{
- error ("loop %d's latch does not have header as successor", i);
+ error ("loop %d%'s latch does not have header as successor", i);
err = 1;
}
if (loop->latch->loop_father != loop)
{
- error ("loop %d's latch does not belong directly to it", i);
+ error ("loop %d%'s latch does not belong directly to it", i);
err = 1;
}
}
if (loop->header->loop_father != loop)
{
- error ("loop %d's header does not belong directly to it", i);
+ error ("loop %d%'s header does not belong directly to it", i);
err = 1;
}
if (loops_state_satisfies_p (LOOPS_HAVE_MARKED_IRREDUCIBLE_REGIONS)
&& (loop_latch_edge (loop)->flags & EDGE_IRREDUCIBLE_LOOP))
{
- error ("loop %d's latch is marked as part of irreducible region", i);
+ error ("loop %d%'s latch is marked as part of irreducible region", i);
err = 1;
}
}
exit = get_exit_descriptions (e);
if (!exit)
{
- error ("Exit %d->%d not recorded",
+ error ("exit %d->%d not recorded",
e->src->index, e->dest->index);
err = 1;
}
if (eloops != 0)
{
- error ("Wrong list of exited loops for edge %d->%d",
+ error ("wrong list of exited loops for edge %d->%d",
e->src->index, e->dest->index);
err = 1;
}
if (n_exits != htab_elements (current_loops->exits))
{
- error ("Too many loop exits recorded");
+ error ("too many loop exits recorded");
err = 1;
}