Patchwork Obvious CSE speedup

login
register
mail settings
Submitter Jan Hubicka
Date June 13, 2010, 12:18 a.m.
Message ID <20100613001838.GB18240@kam.mff.cuni.cz>
Download mbox | patch
Permalink /patch/55408/
State New
Headers show

Comments

Jan Hubicka - June 13, 2010, 12:18 a.m.
Hi,
something I noticed while looking across profiles.
Bootstrapped/regtested x86_64-linux.

Honza

Patch

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