This is the mail archive of the
mailing list for the GCC project.
Re: [patch] Remove flow_loop_scan
On Tue, 2005-02-22 at 16:52 -0700, Jeffrey A Law wrote:
> On Tue, 2005-02-22 at 21:33 +0100, Zdenek Dvorak wrote:
> > Hello,
> > > So what would be the procedure to get loop exit edges marked without
> > > having to run the entire loop optimizer?
> > >
> > > The code to prevent the jump threader from creating irreducible regions
> > > needs this information so that it can determine if it is safe to thread
> > > through a block with an incoming back edge.
> > ifcvt.c:mark_loop_exit_edges could be exported (and free_dominance_info
> > call removed from it).
> OK. I'll take a looksie before approving your patch to verify it's
> going to meet our needs.
Yea, it looks like mark_loop_exit_edges will do exactly what I need. In
fact, it addresses one of the problems we had with the old code -- the
old code didn't bother to clear EDGE_LOOP_EXIT, so over time we end up
with a variety of edges marked as EDGE_LOOP_EXIT which really aren't
loop exit edges anymore.
I would suggest we move mark_loop_exit_edges into somewhere more
appropriate than ifcvt.c.
I would also suggest we move the calls to flow_loops_find,
flow_loops_free, and free_dominance_info out of mark_loop_exit_edges.
Consider the patch pre-approved with those changes.