+2010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
+
+ * doc/tm.texi (TARGET_OPTION_OVERRIDE): Document.
+ (OVERRIDE_OPTIONS): Add note of obsolescence.
+ Replace references with references to TARGET_OPTION_OVERRIDE.
+ (Except for C_COMMON_OVERRIDE_OPTIONS, which remains similar to
+ the macro).
+ * targhooks.c (default_target_option_override): New function.
+ * targhooks.h (default_target_option_override): Declare.
+ * target.h (struct gcc_target): Add override member to
+ target_option emmber.
+ * toplev.c (process_options): Replace OVERRIDE_OPTIONS use with
+ targetm.target_option.override call.
+ * target-def.h (TARGET_OPTION_OVERRIDE): Define.
+ (TARGET_OPTION_HOOKS): Add TARGET_OPTION_OVERRIDE.
+
2010-06-29 Jan Hubicka <jh@suse.cz>
* tree-inline.c: Replace incomming by incomin and clonning by cloning.
If you need to do something whenever the optimization level is
changed via the optimize attribute or pragma, see
@code{TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE}
+
+This macros is obsolete, new ports should use the target hook
+@code{TARGET_OPTION_OVERRIDE} instead.
@end defmac
@deftypefn {Target Hook} void TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE (void)
-This target function is similar to the macro @code{OVERRIDE_OPTIONS}
+This target function is similar to the hook @code{TARGET_OPTION_OVERRIDE}
but is called when the optimize level is changed via an attribute or
pragma or when it is reset at the end of the code affected by the
attribute or pragma. It is not called at the beginning of compilation
-when @code{OVERRIDE_OPTIONS} is called so if you want to perform these
-actions then, you should have @code{OVERRIDE_OPTIONS} call
+when @code{TARGET_OPTION_OVERRIDE} is called so if you want to perform these
+actions then, you should have @code{TARGET_OPTION_OVERRIDE} call
@code{TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE}.
@end deftypefn
Unless it's necessary to inspect the @var{label} parameter, it is better
to set the variable @var{align_jumps} in the target's
-@code{OVERRIDE_OPTIONS}. Otherwise, you should try to honor the user's
+@code{TARGET_OPTION_OVERRIDE}. Otherwise, you should try to honor the user's
selection in @var{align_jumps} in a @code{JUMP_ALIGN} implementation.
@end defmac
Unless it's necessary to inspect the @var{label} parameter, it is better
to set the variable @code{align_loops} in the target's
-@code{OVERRIDE_OPTIONS}. Otherwise, you should try to honor the user's
+@code{TARGET_OPTION_OVERRIDE}. Otherwise, you should try to honor the user's
selection in @code{align_loops} in a @code{LOOP_ALIGN} implementation.
@end defmac
Unless it's necessary to inspect the @var{label} parameter, it is better
to set the variable @code{align_labels} in the target's
-@code{OVERRIDE_OPTIONS}. Otherwise, you should try to honor the user's
+@code{TARGET_OPTION_OVERRIDE}. Otherwise, you should try to honor the user's
selection in @code{align_labels} in a @code{LABEL_ALIGN} implementation.
@end defmac
is to generate minimal debug info for a traceback in the absence of
@option{-g} unless explicitly overridden with @option{-g0}. This
behavior is controlled by @code{OPTIMIZATION_OPTIONS} and
-@code{OVERRIDE_OPTIONS}.
+@code{TARGET_OPTION_OVERRIDE}.
@end defmac
@node Floating Point
@code{TARGET_VALID_OPTION_ATTRIBUTE_P} hook.
@end deftypefn
+@deftypefn {Target Hook} void TARGET_OPTION_OVERRIDE (void)
+Sometimes certain combinations of command options do not make sense on
+a particular target machine. You can override the hook
+@code{TARGET_OPTION_OVERRIDE} to take account of this. This hooks is called
+once just after all the command options have been parsed.
+
+Don't use this hook to turn on various extra optimizations for
+@option{-O}. That is what @code{OPTIMIZATION_OPTIONS} is for.
+
+If you need to do something whenever the optimization level is
+changed via the optimize attribute or pragma, see
+@code{TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE}
+@end deftypefn
+
@deftypefn {Target Hook} bool TARGET_CAN_INLINE_P (tree @var{caller}, tree @var{callee})
This target hook returns @code{false} if the @var{caller} function
cannot inline @var{callee}, based on target specific information. By