diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-22 12:15:56 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-22 12:15:56 +0000 |
commit | 778cbf2b11c0ea00c589fb1504009c3401f6dd52 (patch) | |
tree | 8d4fae775644247a59913ff0ac0e900b30768e6c /gcc | |
parent | 823efdcffe36f0e1c74a7a67a10833f21d59ff30 (diff) | |
download | gcc-778cbf2b11c0ea00c589fb1504009c3401f6dd52.tar.gz |
2010-09-22 Richard Guenther <rguenther@suse.de>
* tree-ssanames.c (release_dead_ssa_names): Do not remove
callee edges here.
* passes.c (init_optimization_passes): Remove early CFG cleanup.
* tree-optimize.c (execute_cleanup_cfg_pre_ipa): Remove.
(pass_cleanup_cfg): Likewise.
(execute_fixup_cfg): Cleanup.
* tree-pass.h (pass_cleanup_cfg): Remove.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164522 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/passes.c | 1 | ||||
-rw-r--r-- | gcc/tree-optimize.c | 40 | ||||
-rw-r--r-- | gcc/tree-pass.h | 2 | ||||
-rw-r--r-- | gcc/tree-ssanames.c | 12 |
5 files changed, 19 insertions, 46 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b4111eb5c17..d36393e10b3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2010-09-22 Richard Guenther <rguenther@suse.de> + + * tree-ssanames.c (release_dead_ssa_names): Do not remove + callee edges here. + * passes.c (init_optimization_passes): Remove early CFG cleanup. + * tree-optimize.c (execute_cleanup_cfg_pre_ipa): Remove. + (pass_cleanup_cfg): Likewise. + (execute_fixup_cfg): Cleanup. + * tree-pass.h (pass_cleanup_cfg): Remove. + 2010-09-22 Martin Jambor <mjambor@suse.cz> * gimple-fold.c (fold_gimple_call): New parameter inplace, do not fold diff --git a/gcc/passes.c b/gcc/passes.c index 47d6471c192..c14ed28906e 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -758,7 +758,6 @@ init_optimization_passes (void) struct opt_pass **p = &pass_early_local_passes.pass.sub; NEXT_PASS (pass_fixup_cfg); NEXT_PASS (pass_tree_profile); - NEXT_PASS (pass_cleanup_cfg); NEXT_PASS (pass_init_datastructures); NEXT_PASS (pass_expand_omp); diff --git a/gcc/tree-optimize.c b/gcc/tree-optimize.c index ce18d6f1feb..94877414015 100644 --- a/gcc/tree-optimize.c +++ b/gcc/tree-optimize.c @@ -149,37 +149,6 @@ struct gimple_opt_pass pass_all_early_optimizations = } }; -/* Pass: cleanup the CFG just before expanding trees to RTL. - This is just a round of label cleanups and case node grouping - because after the tree optimizers have run such cleanups may - be necessary. */ - -static unsigned int -execute_cleanup_cfg_pre_ipa (void) -{ - cleanup_tree_cfg (); - return 0; -} - -struct gimple_opt_pass pass_cleanup_cfg = -{ - { - GIMPLE_PASS, - "cleanup_cfg", /* name */ - NULL, /* gate */ - execute_cleanup_cfg_pre_ipa, /* execute */ - NULL, /* sub */ - NULL, /* next */ - 0, /* static_pass_number */ - TV_NONE, /* tv_id */ - PROP_cfg, /* properties_required */ - 0, /* properties_provided */ - 0, /* properties_destroyed */ - 0, /* todo_flags_start */ - TODO_dump_func /* todo_flags_finish */ - } -}; - /* Pass: cleanup the CFG just before expanding trees to RTL. This is just a round of label cleanups and case node grouping @@ -260,7 +229,7 @@ execute_free_datastructures (void) return 0; } -/* Pass: fixup_cfg. IPA passes, compilation of earlier functions or inlining +/* IPA passes, compilation of earlier functions or inlining might have changed some properties, such as marked functions nothrow, pure, const or noreturn. Remove redundant edges and basic blocks, and create new ones if necessary. @@ -306,7 +275,6 @@ execute_fixup_cfg (void) if (gimple_in_ssa_p (cfun)) { todo |= TODO_update_ssa | TODO_cleanup_cfg; - mark_symbols_for_renaming (stmt); update_stmt (stmt); } } @@ -316,11 +284,11 @@ execute_fixup_cfg (void) todo |= TODO_cleanup_cfg; } - maybe_clean_eh_stmt (stmt); + if (maybe_clean_eh_stmt (stmt) + && gimple_purge_dead_eh_edges (bb)) + todo |= TODO_cleanup_cfg; } - if (gimple_purge_dead_eh_edges (bb)) - todo |= TODO_cleanup_cfg; FOR_EACH_EDGE (e, ei, bb->succs) e->count = (e->count * count_scale + REG_BR_PROB_BASE / 2) / REG_BR_PROB_BASE; diff --git a/gcc/tree-pass.h b/gcc/tree-pass.h index 0dd6dd19a63..a16301cde02 100644 --- a/gcc/tree-pass.h +++ b/gcc/tree-pass.h @@ -355,10 +355,8 @@ extern struct gimple_opt_pass pass_lower_resx; extern struct gimple_opt_pass pass_build_cfg; extern struct gimple_opt_pass pass_tree_profile; extern struct gimple_opt_pass pass_early_tree_profile; -extern struct gimple_opt_pass pass_cleanup_cfg; extern struct gimple_opt_pass pass_referenced_vars; extern struct gimple_opt_pass pass_cleanup_eh; -extern struct gimple_opt_pass pass_fixup_cfg; extern struct gimple_opt_pass pass_sra; extern struct gimple_opt_pass pass_sra_early; extern struct gimple_opt_pass pass_early_ipa_sra; diff --git a/gcc/tree-ssanames.c b/gcc/tree-ssanames.c index 0d63fe9fe63..c005aba4977 100644 --- a/gcc/tree-ssanames.c +++ b/gcc/tree-ssanames.c @@ -338,8 +338,8 @@ release_dead_ssa_names (void) int n = 0; referenced_var_iterator rvi; - /* Current defs point to various dead SSA names that in turn points to dead - statements so bunch of dead memory is held from releasing. */ + /* Current defs point to various dead SSA names that in turn point to + eventually dead variables so a bunch of memory is held live. */ FOR_EACH_REFERENCED_VAR (t, rvi) set_current_def (t, NULL); /* Now release the freelist. */ @@ -356,12 +356,10 @@ release_dead_ssa_names (void) } FREE_SSANAMES (cfun) = NULL; - /* Cgraph edges has been invalidated and point to dead statement. We need to - remove them now and will rebuild it before next IPA pass. */ - cgraph_node_remove_callees (cgraph_node (current_function_decl)); - + statistics_counter_event (cfun, "SSA names released", n); if (dump_file) - fprintf (dump_file, "Released %i names, %.2f%%\n", n, n * 100.0 / num_ssa_names); + fprintf (dump_file, "Released %i names, %.2f%%\n", + n, n * 100.0 / num_ssa_names); return 0; } |