This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] tree-cfg.c: Speed up cleanup_tree_cfg().


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]