From 4ebb982c4f3234ec17f87244e9e827288fdeb24d Mon Sep 17 00:00:00 2001 From: dnovillo Date: Wed, 11 May 2005 02:24:44 +0000 Subject: * tree-optimize.c (init_tree_optimization_passes): Re-organize optimization passes to do an initial batch of scalar cleanups. testsuite/ChangeLog * gcc.dg/pr18501.c: XFAIL. * gcc.dg/tree-ssa/loop-4.c: Fix expected pattern. * gcc.dg/tree-ssa/pr20913.c: Change to link-time test. * gcc.dg/tree-ssa/ssa-ccp-2.c: Change to a .optimized scan. * gcc.dg/tree-ssa/ssa-ccp-7.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-9.c: Likewise. * gcc.dg/tree-ssa/ssa-dom-ccp-1.c: Likewise. * gcc.dg/tree-ssa/ssa-pre-7.c: Change to a .fre scan. * gcc.dg/tree-ssa/ssa-pre-8.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99558 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree-optimize.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'gcc/tree-optimize.c') diff --git a/gcc/tree-optimize.c b/gcc/tree-optimize.c index 6b1d35554f4..6e07a2b504f 100644 --- a/gcc/tree-optimize.c +++ b/gcc/tree-optimize.c @@ -364,12 +364,17 @@ init_tree_optimization_passes (void) NEXT_PASS (pass_may_alias); NEXT_PASS (pass_rename_ssa_copies); NEXT_PASS (pass_early_warn_uninitialized); - NEXT_PASS (pass_dce); - NEXT_PASS (pass_dominator); - NEXT_PASS (pass_copy_prop); + + /* Initial scalar cleanups. */ + NEXT_PASS (pass_ccp); + NEXT_PASS (pass_fre); NEXT_PASS (pass_dce); NEXT_PASS (pass_forwprop); NEXT_PASS (pass_vrp); + NEXT_PASS (pass_copy_prop); + NEXT_PASS (pass_dce); + NEXT_PASS (pass_dominator); + NEXT_PASS (pass_merge_phi); NEXT_PASS (pass_phiopt); NEXT_PASS (pass_may_alias); @@ -403,6 +408,7 @@ init_tree_optimization_passes (void) NEXT_PASS (pass_loop); NEXT_PASS (pass_dominator); NEXT_PASS (pass_copy_prop); + NEXT_PASS (pass_dce); /* FIXME: If DCE is not run before checking for uninitialized uses, we may get false warnings (e.g., testsuite/gcc.dg/uninit-5.c). However, this also causes us to misdiagnose cases that should be -- cgit v1.2.1