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] Make cfg cleanup more loop-friendly


On 7/25/07 7:42 PM, Zdenek Dvorak wrote:

> 	* tree-ssa-threadupdate.c (thread_through_all_blocks): Record that
> 	the loop structures may need fixing.
> 	* tree-cfgcleanup.c (cleanup_tree_cfg_noloop, repair_loop_structures):
> 	New functions.
> 	(cleanup_tree_cfg_loop): Removed.
> 	(cleanup_tree_cfg): If loops need fixing, call repair_loop_structures.
> 	* tree-predcom.c (tree_predictive_commoning): Return TODO_cleanup_cfg
> 	instead of running cleanup_tree_cfg_loop.
> 	* cfgloop.h (LOOPS_NEED_FIXUP): New constant.
> 	* tree-flow.h (cleanup_tree_cfg_loop): Declaration removed.
> 	(tree_predictive_commoning): Declaration changed.
> 	* passes.c (execute_function_todo): Do not use cleanup_tree_cfg_loop.
> 

> +   if (retval)
> +     current_loops->state |= LOOPS_NEED_FIXUP;

Minor cleanup nit, could you hide this state manipulation behind an API?
 Not for this patch, but maybe for some future cleanup.  Instead of
allowing direct access to the loop fields, we could have something like
'mark_loops_for_fixup (current_loops)'.


The rest is OK.


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