This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Clear all EDGE_LOOP_EXIT flags in mark_loop_exit_edges
- From: Jeffrey A Law <law at redhat dot com>
- To: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 30 Mar 2005 10:40:18 -0700
- Subject: Re: [patch] Clear all EDGE_LOOP_EXIT flags in mark_loop_exit_edges
- Organization: Red Hat, Inc
- References: <20050329072927.GA11646@atrey.karlin.mff.cuni.cz>
- Reply-to: law at redhat dot com
On Tue, 2005-03-29 at 09:29 +0200, Zdenek Dvorak wrote:
> Hello,
>
> as an optimization, mark_loop_exit_edges skips blocks that are outside
> any loops, since there may be no loop exits from them. However, this
> means that if an edge is marked EDGE_LOOP_EXIT and then the loop is
> removed (or just the edge is split and the edge ceases to be the loop
> exit), the edge is marked EDGE_LOOP_EXIT forever. This may block
> if_convert from working with such an edge.
>
> I have noted this when working on disabling the old loop optimizer;
> the problem is masked otherwise, since the old loop removes the
> cfg and "clears" all flags as a side effect.
>
> Bootstrapped & regtested on i686.
>
> Zdenek
>
> * cfgloopanal.c (mark_loop_exit_edges): Clean EDGE_LOOP_EXIT
> flag for edges outside any loops.
Approved. Please install if you haven't already done so.
Thanks,
Jeff