This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] tree-cfg.c: Speed up cleanup_tree_cfg().
- From: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- To: Jeffrey A Law <law at redhat dot com>
- Cc: Kazu Hirata <kazu at cs dot umass dot edu>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 1 Oct 2004 23:14:52 +0200
- Subject: Re: [patch] tree-cfg.c: Speed up cleanup_tree_cfg().
- References: <1096661478.2825.2715.camel@localhost.localdomain>
Hello,
> > Attached is a patch to speed up cleanup_tree_cfg().
> >
> > Consider the loop in cleanup_tree_cfg().
> >
> > while (something_changed)
> > {
> > something_changed = cleanup_control_flow ();
> > something_changed |= delete_unreachable_blocks ();
> > something_changed |= thread_jumps ();
> > retval |= something_changed;
> > }
> >
> > Kazu Hirata
> >
> > 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
> >
> > * tree-cfg.c (cleanup_tree_cfg): Pull a call to
> > cleanup_control_flow() out of the while loop.
> Seems reasonable to me.
in fact I think whole loop can be removed, since thread_jumps
cannot create new unreachable blocks the way it is written
now (it removes the blocks directly in the case they become
unreachable).
Zdenek