This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Make cfg cleanup more loop-friendly
- From: Diego Novillo <dnovillo at google dot com>
- To: Zdenek Dvorak <rakdver at kam dot mff dot cuni dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 31 Jul 2007 08:20:57 -0400
- Subject: Re: [patch] Make cfg cleanup more loop-friendly
- References: <20070725234217.GA30636@kam.mff.cuni.cz>
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.