This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: Optimize ix86_reorg
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: ubizjak at gmail dot com
- Date: Fri, 15 May 2009 09:47:30 -0700
- Subject: PATCH: Optimize ix86_reorg
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
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