Commit a32b99ad by Joseph Myers Committed by Joseph Myers

rx.c (rx_option_optimization): Change to rx_override_options_after_change.

	* config/rx/rx.c (rx_option_optimization): Change to
	rx_override_options_after_change.  Don't change
	flag_lto_compression_level.  Don't check for changes to whether
	FPU instructions can be used.  Check and set only
	flag_finite_math_only, not other fast-math flags.
	(rx_option_override): Call rx_override_options_after_change.
	(TARGET_OPTION_OPTIMIZATION): Remove.
	(TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.

From-SVN: r165508
parent 55bd9c35
2010-10-15 Joseph Myers <joseph@codesourcery.com> 2010-10-15 Joseph Myers <joseph@codesourcery.com>
* config/rx/rx.c (rx_option_optimization): Change to
rx_override_options_after_change. Don't change
flag_lto_compression_level. Don't check for changes to whether
FPU instructions can be used. Check and set only
flag_finite_math_only, not other fast-math flags.
(rx_option_override): Call rx_override_options_after_change.
(TARGET_OPTION_OPTIMIZATION): Remove.
(TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
2010-10-15 Joseph Myers <joseph@codesourcery.com>
* config/rs6000/rs6000.c (rs6000_option_optimization): Don't * config/rs6000/rs6000.c (rs6000_option_optimization): Don't
disable section anchors for lang_hooks.name[4] != 'O'. disable section anchors for lang_hooks.name[4] != 'O'.
...@@ -2191,29 +2191,21 @@ rx_handle_option (size_t code, const char * arg ATTRIBUTE_UNUSED, int value) ...@@ -2191,29 +2191,21 @@ rx_handle_option (size_t code, const char * arg ATTRIBUTE_UNUSED, int value)
return true; return true;
} }
/* Implement TARGET_OPTION_OPTIMIZATION. */ /* Implement TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE. */
static void static void
rx_option_optimization (int level ATTRIBUTE_UNUSED, int size ATTRIBUTE_UNUSED) rx_override_options_after_change (void)
{ {
static bool first_time = TRUE; static bool first_time = TRUE;
static bool saved_allow_rx_fpu = TRUE;
if (first_time) if (first_time)
{ {
/* If this is the first time through and the user has not disabled /* If this is the first time through and the user has not disabled
the use of RX FPU hardware then enable unsafe math optimizations, the use of RX FPU hardware then enable -ffinite-math-only,
since the FPU instructions themselves are unsafe. */ since the FPU instructions do not support NaNs and infinities. */
if (TARGET_USE_FPU) if (TARGET_USE_FPU)
set_fast_math_flags (true); flag_finite_math_only = 1;
/* FIXME: For some unknown reason LTO compression is not working,
at least on my local system. So set the default compression
level to none, for now. */
if (flag_lto_compression_level == -1)
flag_lto_compression_level = 0;
saved_allow_rx_fpu = ALLOW_RX_FPU_INSNS;
first_time = FALSE; first_time = FALSE;
} }
else else
...@@ -2221,11 +2213,8 @@ rx_option_optimization (int level ATTRIBUTE_UNUSED, int size ATTRIBUTE_UNUSED) ...@@ -2221,11 +2213,8 @@ rx_option_optimization (int level ATTRIBUTE_UNUSED, int size ATTRIBUTE_UNUSED)
/* Alert the user if they are changing the optimization options /* Alert the user if they are changing the optimization options
to use IEEE compliant floating point arithmetic with RX FPU insns. */ to use IEEE compliant floating point arithmetic with RX FPU insns. */
if (TARGET_USE_FPU if (TARGET_USE_FPU
&& ! fast_math_flags_set_p ()) && !flag_finite_math_only)
warning (0, "RX FPU instructions are not IEEE compliant"); warning (0, "RX FPU instructions do not support NaNs and infinities");
if (saved_allow_rx_fpu != ALLOW_RX_FPU_INSNS)
error ("Changing the FPU insns/math optimizations pairing is not supported");
} }
} }
...@@ -2235,6 +2224,8 @@ rx_option_override (void) ...@@ -2235,6 +2224,8 @@ rx_option_override (void)
/* This target defaults to strict volatile bitfields. */ /* This target defaults to strict volatile bitfields. */
if (flag_strict_volatile_bitfields < 0) if (flag_strict_volatile_bitfields < 0)
flag_strict_volatile_bitfields = 1; flag_strict_volatile_bitfields = 1;
rx_override_options_after_change ();
} }
...@@ -2834,8 +2825,8 @@ rx_memory_move_cost (enum machine_mode mode, enum reg_class regclass, bool in) ...@@ -2834,8 +2825,8 @@ rx_memory_move_cost (enum machine_mode mode, enum reg_class regclass, bool in)
#undef TARGET_OPTION_OVERRIDE #undef TARGET_OPTION_OVERRIDE
#define TARGET_OPTION_OVERRIDE rx_option_override #define TARGET_OPTION_OVERRIDE rx_option_override
#undef TARGET_OPTION_OPTIMIZATION #undef TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE
#define TARGET_OPTION_OPTIMIZATION rx_option_optimization #define TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE rx_override_options_after_change
#undef TARGET_EXCEPT_UNWIND_INFO #undef TARGET_EXCEPT_UNWIND_INFO
#define TARGET_EXCEPT_UNWIND_INFO sjlj_except_unwind_info #define TARGET_EXCEPT_UNWIND_INFO sjlj_except_unwind_info
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment