From 1994bfea41d3cea4650b1678c13a70bf88186839 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Thu, 18 Jan 2007 15:56:33 +0100 Subject: tree-vrp.c (finalize_jump_threads): Do not call cleanup_cfg by hand. * 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. From-SVN: r120900 --- gcc/passes.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'gcc/passes.c') diff --git a/gcc/passes.c b/gcc/passes.c index 9cb2c52..0ab5f48 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 -- cgit v1.1