This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] tree-optimize.c: Move CD_DCE earlier.


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  <>

	* 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);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]