diff options
author | Richard Biener <rguenther@suse.de> | 2014-06-18 11:45:17 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2014-06-18 11:45:17 +0000 |
commit | 30866dc930e37752a9010a8b27663ccfbf76260c (patch) | |
tree | 3015c25206b2e29ed9f184938da40ddc8e57fbec /gcc/tree-ssa-copy.c | |
parent | 560c75e960fafc380191bf162a8e428a35e5fb67 (diff) | |
download | gcc-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-copy.c')
-rw-r--r-- | gcc/tree-ssa-copy.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/gcc/tree-ssa-copy.c b/gcc/tree-ssa-copy.c index e0ed63f..1d404d2 100644 --- a/gcc/tree-ssa-copy.c +++ b/gcc/tree-ssa-copy.c @@ -45,6 +45,8 @@ along with GCC; see the file COPYING3. If not see #include "cfgloop.h" #include "tree-scalar-evolution.h" #include "tree-ssa-dom.h" +#include "tree-ssa-loop-niter.h" + /* This file implements the copy propagation pass and provides a handful of interfaces for performing const/copy propagation and @@ -542,7 +544,7 @@ get_value (tree name) /* Deallocate memory used in copy propagation and do final substitution. */ -static void +static bool fini_copy_prop (void) { unsigned i; @@ -594,10 +596,17 @@ fini_copy_prop (void) } } - /* Don't do DCE if SCEV is initialized. It would destroy the scev cache. */ - substitute_and_fold (get_value, NULL, !scev_initialized_p ()); + bool changed = substitute_and_fold (get_value, NULL, true); + if (changed) + { + free_numbers_of_iterations_estimates (); + if (scev_initialized_p ()) + scev_reset (); + } free (copy_of); + + return changed; } @@ -639,7 +648,8 @@ execute_copy_prop (void) { init_copy_prop (); ssa_propagate (copy_prop_visit_stmt, copy_prop_visit_phi_node); - fini_copy_prop (); + if (fini_copy_prop ()) + return TODO_cleanup_cfg; return 0; } @@ -656,7 +666,7 @@ const pass_data pass_data_copy_prop = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - ( TODO_cleanup_cfg | TODO_update_ssa ), /* todo_flags_finish */ + 0, /* todo_flags_finish */ }; class pass_copy_prop : public gimple_opt_pass |