This is the mail archive of the gcc-patches@gcc.gnu.org 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]

Fix breakage introduced by Feb 18 patch


This patch

Sun Feb 18 15:45:17 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* toplev.c (rest_of_compilation): Don't have CSE skip blocks or
	follow jumps after first run.
	If -fexpensive-optimizations rerun CSE after GCSE and iterate until
	it doesn't change any jumps.

caused performance regressions on i686-linux.  These show up when running
SPEC95.  The fix is rather obvious (bootstrapped on i686-linux up to some
kind of libstdc++-v3 problem).

Diego, do you think we could arrange to publish the nightly SPEC results on
gcc.gnu.org instead of only internally?  Maybe if we do that, people will
actually look at them on some kind of regular basis.


Bernd

	Fix a problem introduced by Kenner's Feb 18 change.
	* toplev.c (rest_of_compilation): Disable flag_cse_follow_jumps and
	flag_cse_skip_blocks only temporarily, not for ever.

Index: toplev.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/toplev.c,v
retrieving revision 1.429
diff -u -p -r1.429 toplev.c
--- toplev.c	2001/02/28 17:49:36	1.429
+++ toplev.c	2001/03/01 17:49:39
@@ -3002,7 +3002,6 @@ rest_of_compilation (decl)
       /* If we are not running more CSE passes, then we are no longer
 	 expecting CSE to be run.  But always rerun it in a cheap mode.  */
       cse_not_expected = !flag_rerun_cse_after_loop && !flag_gcse;
-      flag_cse_skip_blocks = flag_cse_follow_jumps = 0;

       if (tem || optimize > 1)
 	{
@@ -3101,6 +3100,7 @@ rest_of_compilation (decl)

   if (optimize > 0 && flag_gcse)
     {
+      int save_csb, save_cfj;
       int tem2 = 0;

       timevar_push (TV_GCSE);
@@ -3110,6 +3110,10 @@ rest_of_compilation (decl)
       cleanup_cfg (insns);
       tem = gcse_main (insns, rtl_dump_file);

+      save_csb = flag_cse_skip_blocks;
+      save_cfj = flag_cse_follow_jumps;
+      flag_cse_skip_blocks = flag_cse_follow_jumps = 0;
+
       /* If -fexpensive-optimizations, re-run CSE to clean up things done
 	 by gcse.  */
       if (flag_expensive_optimizations)
@@ -3144,7 +3148,9 @@ rest_of_compilation (decl)
       timevar_pop (TV_GCSE);

       ggc_collect ();
-    }
+      flag_cse_skip_blocks = save_csb;
+      flag_cse_follow_jumps = save_cfj;
+     }

   /* Move constant computations out of loops.  */



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