From: matz Date: Fri, 26 Nov 2010 16:51:39 +0000 (+0000) Subject: * tree-ssa-copy.c (fini_copy_prop): Don't DCE when we have loops. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0d63aa16f49c5afb74d2572d84163c07d48874d8;p=thirdparty%2Fgcc.git * tree-ssa-copy.c (fini_copy_prop): Don't DCE when we have loops. * passes.c (init_optimization_passes): Remove superfluous copy-prop pass. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167184 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 810590c5e139..7e996ca0f50a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2010-11-26 Michael Matz + + * tree-ssa-copy.c (fini_copy_prop): Don't DCE when we have loops. + + * passes.c (init_optimization_passes): Remove superfluous + copy-prop pass. + 2010-11-26 Richard Guenther PR lto/46648 diff --git a/gcc/passes.c b/gcc/passes.c index b5cb2aca300a..38cc570a39df 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -897,7 +897,6 @@ init_optimization_passes (void) NEXT_PASS (pass_graphite); { struct opt_pass **p = &pass_graphite.pass.sub; - NEXT_PASS (pass_copy_prop); NEXT_PASS (pass_graphite_transforms); NEXT_PASS (pass_copy_prop); NEXT_PASS (pass_dce_loop); diff --git a/gcc/tree-ssa-copy.c b/gcc/tree-ssa-copy.c index 68370336a76c..d552c3ab61ba 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); }