From f7882debb8223bd221deed9693c4ea07b7a36808 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Fri, 26 Nov 2010 16:51:39 +0000 Subject: tree-ssa-copy.c (fini_copy_prop): Don't DCE when we have loops. * tree-ssa-copy.c (fini_copy_prop): Don't DCE when we have loops. * passes.c (init_optimization_passes): Remove superfluous copy-prop pass. From-SVN: r167184 --- gcc/tree-ssa-copy.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gcc/tree-ssa-copy.c') diff --git a/gcc/tree-ssa-copy.c b/gcc/tree-ssa-copy.c index 6837033..d552c3a 100644 --- a/gcc/tree-ssa-copy.c +++ b/gcc/tree-ssa-copy.c @@ -775,7 +775,9 @@ fini_copy_prop (void) duplicate_ssa_name_ptr_info (copy_of[i].value, SSA_NAME_PTR_INFO (var)); } - substitute_and_fold (get_value, NULL, true); + /* Don't do DCE if we have loops. That's the simplest way to not + destroy the scev cache. */ + substitute_and_fold (get_value, NULL, !current_loops); free (copy_of); } -- cgit v1.1