This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] tree-optimize.c: Move CD_DCE earlier.
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Cc: dnovillo at redhat dot com
- Date: Fri, 13 May 2005 20:46:50 -0400 (EDT)
- Subject: [patch] tree-optimize.c: Move CD_DCE earlier.
Hi,
Attached is a patch to move CD_DCE earlier.
Running DCE and CD_DCE in a row doesn't make sense. The patch
replaces the last DCE with CD_DCE.
This patch seems to bring a small speed up of 0.4% or so. Compilation
of cc1-i files takes 237.544 seconds without this patch. With this
pach, it takes 236.510 seconds.
Tested on i686-pc-linux-gnu. OK to apply?
Kazu Hirata
2005-05-14 Kazu Hirata <kazu@cs.umass.edu>
* tree-optimize.c (init_tree_optimization_passes): Move
pass_cd_dce in place of the last pass_dce.
Index: tree-optimize.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-optimize.c,v
retrieving revision 2.92
diff -u -d -p -r2.92 tree-optimize.c
--- tree-optimize.c 13 May 2005 13:56:57 -0000 2.92
+++ tree-optimize.c 13 May 2005 14:49:57 -0000
@@ -388,7 +388,7 @@ init_tree_optimization_passes (void)
NEXT_PASS (pass_loop);
NEXT_PASS (pass_dominator);
NEXT_PASS (pass_copy_prop);
- NEXT_PASS (pass_dce);
+ NEXT_PASS (pass_cd_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
@@ -399,7 +399,6 @@ init_tree_optimization_passes (void)
variable. Using a representation like Gated Single Assignment
may help. */
NEXT_PASS (pass_late_warn_uninitialized);
- NEXT_PASS (pass_cd_dce);
NEXT_PASS (pass_dse);
NEXT_PASS (pass_forwprop);
NEXT_PASS (pass_phiopt);