summaryrefslogtreecommitdiff
path: root/gcc/passes.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-18 14:56:33 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-18 14:56:33 +0000
commit6fa78c7b5c8339560e02cf1270e974214ca75496 (patch)
tree370ef0af6f0c9483e8a124a460b11617ada2ca1b /gcc/passes.c
parent64d0b9960a866b1de5520d3e55fce12bcfbd6bf6 (diff)
downloadgcc-6fa78c7b5c8339560e02cf1270e974214ca75496.tar.gz
* tree-vrp.c (finalize_jump_threads): Do not call cleanup_cfg by hand.
* tree-tailcall (add_virtual_phis): Likewise. (optimize_tail_call): Return TODOs. (execute_tail_calls): Return TODOs. * tree-ssa-ccp (execute_fold_all_builtins): Do cleanup_cfg via TODO. * tree-cfgcleanup.c (cleanup_tree_cfg_loop): Return if something changed. * tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_value): Cleanup cfg using TODO. * tree-flow.h (cleanup_tree_cfg_loop): Update prototype. * passes.c (execute_function_todo): When cleanup did something, remove unused locals. * tree-cfg.c (pass_build_cfg): Add cleanup_cfg TODO. (make_edges): Don't cleanup_cfg. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120900 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/passes.c')
-rw-r--r--gcc/passes.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/passes.c b/gcc/passes.c
index 9cb2c5284e4..0ab5f4815e4 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -818,14 +818,19 @@ execute_function_todo (void *data)
if (!flags)
return;
- /* Always cleanup the CFG before trying to update SSA . */
+ /* Always cleanup the CFG before trying to update SSA. */
if (flags & TODO_cleanup_cfg)
{
+ bool cleanup;
+
if (current_loops)
- cleanup_tree_cfg_loop ();
+ cleanup = cleanup_tree_cfg_loop ();
else
- cleanup_tree_cfg ();
+ cleanup = cleanup_tree_cfg ();
+ if (cleanup && (cfun->curr_properties & PROP_ssa))
+ flags |= TODO_remove_unused_locals;
+
/* When cleanup_tree_cfg merges consecutive blocks, it may
perform some simplistic propagation when removing single
valued PHI nodes. This propagation may, in turn, cause the