aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-dce.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2014-06-18 11:45:17 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2014-06-18 11:45:17 +0000
commit30866dc930e37752a9010a8b27663ccfbf76260c (patch)
tree3015c25206b2e29ed9f184938da40ddc8e57fbec /gcc/tree-ssa-dce.c
parent560c75e960fafc380191bf162a8e428a35e5fb67 (diff)
downloadgcc-30866dc930e37752a9010a8b27663ccfbf76260c.zip
gcc-30866dc930e37752a9010a8b27663ccfbf76260c.tar.gz
gcc-30866dc930e37752a9010a8b27663ccfbf76260c.tar.bz2
tree-pass.h (make_pass_dce_loop): Remove.
2014-06-18 Richard Biener <rguenther@suse.de> * tree-pass.h (make_pass_dce_loop): Remove. * passes.def: Replace pass_dce_loop with pass_dce. * tree-ssa-dce.c (perform_tree_ssa_dce): If something changed free niter estimates and reset the scev cache. (tree_ssa_dce_loop, pass_data_dce_loop, pass_dce_loop, make_pass_dce_loop): Remove. * tree-ssa-copy.c: Include tree-ssa-loop-niter.h. (fini_copy_prop): Return whether something changed. Always let substitute_and_fold perform DCE and free niter estimates and reset the scev cache if so. (execute_copy_prop): If sth changed schedule cleanup-cfg. (pass_data_copy_prop): Do not unconditionally schedule cleanup-cfg or update-ssa. * gcc.dg/vect/vect.exp: Remove dump-tree-dceloop-* processing. * gcc.dg/vect/dump-tree-dceloop-pr26359.c: Rename to ... * gcc.dg/vect/pr26359.c: ... this and adjust appropriately. From-SVN: r211781
Diffstat (limited to 'gcc/tree-ssa-dce.c')
-rw-r--r--gcc/tree-ssa-dce.c58
1 files changed, 6 insertions, 52 deletions
diff --git a/gcc/tree-ssa-dce.c b/gcc/tree-ssa-dce.c
index 4969b11..171d216 100644
--- a/gcc/tree-ssa-dce.c
+++ b/gcc/tree-ssa-dce.c
@@ -1479,7 +1479,12 @@ perform_tree_ssa_dce (bool aggressive)
tree_dce_done (aggressive);
if (something_changed)
- return TODO_update_ssa | TODO_cleanup_cfg;
+ {
+ free_numbers_of_iterations_estimates ();
+ if (scev_initialized_p)
+ scev_reset ();
+ return TODO_update_ssa | TODO_cleanup_cfg;
+ }
return 0;
}
@@ -1491,19 +1496,6 @@ tree_ssa_dce (void)
}
static unsigned int
-tree_ssa_dce_loop (void)
-{
- unsigned int todo;
- todo = perform_tree_ssa_dce (/*aggressive=*/false);
- if (todo)
- {
- free_numbers_of_iterations_estimates ();
- scev_reset ();
- }
- return todo;
-}
-
-static unsigned int
tree_ssa_cd_dce (void)
{
return perform_tree_ssa_dce (/*aggressive=*/optimize >= 2);
@@ -1549,44 +1541,6 @@ make_pass_dce (gcc::context *ctxt)
namespace {
-const pass_data pass_data_dce_loop =
-{
- GIMPLE_PASS, /* type */
- "dceloop", /* name */
- OPTGROUP_NONE, /* optinfo_flags */
- true, /* has_execute */
- TV_TREE_DCE, /* tv_id */
- ( PROP_cfg | PROP_ssa ), /* properties_required */
- 0, /* properties_provided */
- 0, /* properties_destroyed */
- 0, /* todo_flags_start */
- 0, /* todo_flags_finish */
-};
-
-class pass_dce_loop : public gimple_opt_pass
-{
-public:
- pass_dce_loop (gcc::context *ctxt)
- : gimple_opt_pass (pass_data_dce_loop, ctxt)
- {}
-
- /* opt_pass methods: */
- opt_pass * clone () { return new pass_dce_loop (m_ctxt); }
- virtual bool gate (function *) { return flag_tree_dce != 0; }
- virtual unsigned int execute (function *) { return tree_ssa_dce_loop (); }
-
-}; // class pass_dce_loop
-
-} // anon namespace
-
-gimple_opt_pass *
-make_pass_dce_loop (gcc::context *ctxt)
-{
- return new pass_dce_loop (ctxt);
-}
-
-namespace {
-
const pass_data pass_data_cd_dce =
{
GIMPLE_PASS, /* type */