/* Natural loop analysis code for GNU compiler.
- Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GCC.
edge e;
edge_iterator ei;
- if (loop->header->count)
+ if (loop->latch->count || loop->header->count)
{
gcov_type count_in, count_latch, expected;
{
edge_iterator ei;
- /* Do not mark exits from the fake outermost loop. */
- if (!bb->loop_father->outer)
- continue;
-
FOR_EACH_EDGE (e, ei, bb->succs)
{
- if (loop_exit_edge_p (bb->loop_father, e))
+ if (bb->loop_father->outer
+ && loop_exit_edge_p (bb->loop_father, e))
e->flags |= EDGE_LOOP_EXIT;
else
e->flags &= ~EDGE_LOOP_EXIT;