On Wed, Dec 21, 2011 at 9:13 PM, Uros Bizjak <[email protected]> wrote:
> As shown by pr50038.c testcase, recent redundant extension insns
> improvements also benefit 32bit targets...
I have committed this additional patch that moves option processing to
the right place.
2011-12-22 Uros Bizjak <[email protected]>
* common/config/i386/i386-common.c (ix86_option_optimization_table):
Move OPT_free processing from ...
* config/i386/i386.c (ix86_option_override_internal): ... here.
Bootstrapped and regression tested on x86_64-pc-linux-gnu {,-m32}, committed.
Uros.
Index: common/config/i386/i386-common.c
===================================================================
--- common/config/i386/i386-common.c (revision 182615)
+++ common/config/i386/i386-common.c (working copy)
@@ -599,6 +599,8 @@ ix86_handle_option (struct gcc_options *opts,
static const struct default_options ix86_option_optimization_table[] =
{
+ /* Enable redundant extension instructions removal at -O2 and higher. */
+ { OPT_LEVELS_2_PLUS, OPT_free, NULL, 1 },
/* Turn off -fschedule-insns by default. It tends to make the
problem with not enough registers even worse. */
{ OPT_LEVELS_ALL, OPT_fschedule_insns, NULL, 0 },
Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c (revision 182615)
+++ config/i386/i386.c (working copy)
@@ -3445,10 +3445,6 @@ ix86_option_override_internal (bool main_args_p)
#define USE_X86_64_FRAME_POINTER 0
#endif
- /* Enable redundant extension instructions removal at -O2 and higher. */
- if (optimize >= 2 && !global_options_set.x_flag_ree)
- flag_ree = 1;
-
/* Set the default values for switches whose default depends on TARGET_64BIT
in case they weren't overwritten by command line options. */
if (TARGET_64BIT)