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]

PATCH: Optimize ix86_reorg


Hi,

ix86_reorg may call optimize_function_for_speed_p twice. This patch
removes the second call.  OK for trunk?

Thanks.


H.J.
---
2009-05-14  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386.c (ix86_reorg): Call optimize_function_for_speed_p
	only once.

--- i386.c	2009-05-15 02:40:04.000000000 -0700
+++ i386.c	2009-05-15 09:33:01.000000000 -0700
@@ -27359,12 +27359,13 @@ ix86_pad_returns (void)
 static void
 ix86_reorg (void)
 {
-  if (TARGET_PAD_RETURNS && optimize
-      && optimize_function_for_speed_p (cfun))
-    ix86_pad_returns ();
-  if (TARGET_FOUR_JUMP_LIMIT && optimize
-      && optimize_function_for_speed_p (cfun))
-    ix86_avoid_jump_misspredicts ();
+  if (optimize && optimize_function_for_speed_p (cfun))
+    {
+      if (TARGET_PAD_RETURNS)
+	ix86_pad_returns ();
+      if (TARGET_FOUR_JUMP_LIMIT)
+	ix86_avoid_jump_misspredicts ();
+    }
 }
 
 /* Return nonzero when QImode register that must be represented via REX prefix


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