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]
Other format: [Raw text]

Obvious CSE speedup


Hi,
something I noticed while looking across profiles.
Bootstrapped/regtested x86_64-linux.

Honza

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 160664)
+++ ChangeLog	(working copy)
@@ -1,3 +1,8 @@
+2010-06-12  Jan Hubicka  <jh@suse.cz>
+
+	* cse.c (cse_extended_basic_block): Move optimize_bb_for_speed_p
+	at correct place.
+
 2010-06-12  Bernd Schmidt  <bernds@codesourcery.com>
 
 	* config/arm/arm.c (thumb2_reorg): Fix errors in previous change.
Index: cse.c
===================================================================
--- cse.c	(revision 160664)
+++ cse.c	(working copy)
@@ -6315,9 +6315,9 @@ cse_extended_basic_block (struct cse_bas
 	    }
 	}
 
+      optimize_this_for_speed_p = optimize_bb_for_speed_p (bb);
       FOR_BB_INSNS (bb, insn)
 	{
-	  optimize_this_for_speed_p = optimize_bb_for_speed_p (bb);
 	  /* If we have processed 1,000 insns, flush the hash table to
 	     avoid extreme quadratic behavior.  We must not include NOTEs
 	     in the count since there may be more of them when generating


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