summaryrefslogtreecommitdiff
path: root/gcc/config/frv
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2010-09-16 13:04:29 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2010-09-16 13:04:29 +0100
commitfac0f7224d4fbb441496c8ea17c5b413b8cbe83c (patch)
tree2d5286583d5ebde7118db3f77239f739154c9d7b /gcc/config/frv
parentc5387660230bce1ec6e40d47e243ff04059e4d77 (diff)
downloadgcc-fac0f7224d4fbb441496c8ea17c5b413b8cbe83c.tar.gz
target.def (target_option.optimization): New hook.
* target.def (target_option.optimization): New hook. * doc/tm.texi.in (OPTIMIZATION_OPTIONS): Change to TARGET_OPTION_OPTIMIZATION hook. * doc/tm.texi: Regenerate. * hooks.c (hook_void_int_int): New. * hooks.h (hook_void_int_int): Declare. * opts.c: Don't include tm_p.h. (decode_options): Use targetm.target_option.optimization instead of OPTIMIZATION_OPTIONS. * system.h (OPTIMIZATION_OPTIONS): Poison. * config/arm/arm-protos.h (arm_optimization_options): Remove. * config/arm/arm.c (TARGET_OPTION_OPTIMIZATION): Define. (arm_optimization_options): Rename to arm_option_optimization. Make static. * config/arm/arm.h (OPTIMIZATION_OPTIONS): Remove. * config/cris/cris.c (TARGET_OPTION_OPTIMIZATION): Define. (cris_option_optimization): New. * config/cris/cris.h (OPTIMIZATION_OPTIONS): Remove. * config/crx/crx.c (TARGET_OPTION_OPTIMIZATION): Define. (crx_option_optimization): New. * config/crx/crx.h (OPTIMIZATION_OPTIONS): Remove. * config/frv/frv-protos.h (frv_optimization_options): Remove. * config/frv/frv.c (TARGET_OPTION_OPTIMIZATION): Define. (frv_optimization_options): Rename to frv_option_optimization. Make static. * config/frv/frv.h (OPTIMIZATION_OPTIONS): Remove. * config/h8300/h8300.c (h8300_option_optimization): New. (TARGET_OPTION_OPTIMIZATION): Define. * config/h8300/h8300.h (OPTIMIZATION_OPTIONS): Remove. * config/i386/i386-protos.h (optimization_options): Remove. * config/i386/i386.c (optimization_options): Rename to ix86_option_optimization. Make static. (TARGET_OPTION_OPTIMIZATION): Define. * config/i386/i386.h (OPTIMIZATION_OPTIONS): Remove. * config/ia64/ia64-protos.h (ia64_optimization_options): Remove. * config/ia64/ia64.c (TARGET_OPTION_OPTIMIZATION): Define. (ia64_optimization_options): Rename to ia64_option_optimization. Make static. Call SUBTARGET_OPTIMIZATION_OPTIONS. * config/ia64/ia64.h (OPTIMIZATION_OPTIONS): Remove. Remove commented-out definition. * config/ia64/vms.h (SUBTARGET_OPTIMIZATION_OPTIONS): Define instead of OPTIMIZATION_OPTIONS. * config/m32r/m32r.c (TARGET_OPTION_OPTIMIZATION): Define. (m32r_option_optimization): New. * config/m32r/m32r.h (OPTIMIZATION_OPTIONS): Remove. * config/m68hc11/m68hc11-protos.h (m68hc11_optimization_options): Remove. * config/mcore/mcore.c (TARGET_OPTION_OPTIMIZATION): Define. (mcore_option_optimization): New. * config/mcore/mcore.h (OPTIMIZATION_OPTIONS): Remove. * config/mep/mep-protos.h (mep_optimization_options): Remove. * config/mep/mep.c (TARGET_OPTION_OPTIMIZATION): Define. (mep_optimization_options): Rename to mep_option_optimization. Make static. Take unused level and size parameters. * config/mep/mep.h (OPTIMIZATION_OPTIONS): Remove. * config/mmix/mmix.c (TARGET_OPTION_OPTIMIZATION): Define. (mmix_option_optimization): New. * config/mmix/mmix.h (OPTIMIZATION_OPTIONS): Remove. * config/pdp11/pdp11.c (TARGET_OPTION_OPTIMIZATION): Define. (pdp11_option_optimization): New. * config/pdp11/pdp11.h (OPTIMIZATION_OPTIONS): Remove. * config/rs6000/rs6000-protos.h (optimization_options): Remove. * config/rs6000/rs6000.c (TARGET_OPTION_OPTIMIZATION): Define. (optimization_options): Rename to rs6000_option_optimization. Make static. * config/rs6000/rs6000.h (OPTIMIZATION_OPTIONS): Remove. * config/rx/rx-protos.h (rx_set_optimization_options): Remove. * config/rx/rx.c (rx_set_optimization_options): Rename to rx_option_optimization. Make static. Take unused level and size parameters. (TARGET_OPTION_OPTIMIZATION): Define. * config/rx/rx.h (OPTIMIZATION_OPTIONS): Remove. * config/s390/s390-protos.h (optimization_options): Remove. * config/s390/s390.c (optimization_options): Rename to s390_option_optimization. Make static. Don't mark size parameter unused. (TARGET_OPTION_OPTIMIZATION): Define. * config/s390/s390.h (OPTIMIZATION_OPTIONS): Remove. * config/sh/sh-protos.h (sh_optimization_options): Remove. * config/sh/sh.c (TARGET_OPTION_OPTIMIZATION): Define. (sh_optimization_options): Rename to sh_option_optimization. Make static. Don't mark parameters unused. * config/sh/sh.h (OPTIMIZATION_OPTIONS): Remove. * config/spu/spu-protos.h (spu_optimization_options): Remove. * config/spu/spu.c (TARGET_OPTION_OPTIMIZATION): Define. (spu_optimization_options): Rename to spu_option_optimization. Make static. * config/spu/spu.h (OPTIMIZATION_OPTIONS): Remove. * config/v850/v850.c (TARGET_OPTION_OPTIMIZATION): Define. (v850_option_optimization): New. * config/v850/v850.h (OPTIMIZATION_OPTIONS): Remove. * config/xtensa/xtensa.c (TARGET_OPTION_OPTIMIZATION): Define. (xtensa_option_optimization): New. * config/xtensa/xtensa.h (OPTIMIZATION_OPTIONS): Remove. From-SVN: r164335
Diffstat (limited to 'gcc/config/frv')
-rw-r--r--gcc/config/frv/frv-protos.h1
-rw-r--r--gcc/config/frv/frv.c28
-rw-r--r--gcc/config/frv/frv.h21
3 files changed, 7 insertions, 43 deletions
diff --git a/gcc/config/frv/frv-protos.h b/gcc/config/frv/frv-protos.h
index f2081faa05a..68c2a576a63 100644
--- a/gcc/config/frv/frv-protos.h
+++ b/gcc/config/frv/frv-protos.h
@@ -38,7 +38,6 @@ extern frv_cpu_t frv_cpu_type; /* value of -mcpu= */
/* Define functions defined in frv.c */
extern void frv_expand_prologue (void);
extern void frv_expand_epilogue (bool);
-extern void frv_optimization_options (int, int);
extern void frv_conditional_register_usage (void);
extern frv_stack_t *frv_stack_info (void);
extern void frv_debug_stack (frv_stack_t *);
diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c
index 295610d3322..0730e32d9a4 100644
--- a/gcc/config/frv/frv.c
+++ b/gcc/config/frv/frv.c
@@ -265,6 +265,7 @@ frv_cpu_t frv_cpu_type = CPU_TYPE; /* value of -mcpu= */
static bool frv_handle_option (size_t, const char *, int);
static void frv_option_override (void);
+static void frv_option_optimization (int, int);
static bool frv_legitimate_address_p (enum machine_mode, rtx, bool);
static int frv_default_flags_for_cpu (void);
static int frv_string_begins_with (const_tree, const char *);
@@ -431,6 +432,8 @@ static bool frv_class_likely_spilled_p (reg_class_t);
#define TARGET_HANDLE_OPTION frv_handle_option
#undef TARGET_OPTION_OVERRIDE
#define TARGET_OPTION_OVERRIDE frv_option_override
+#undef TARGET_OPTION_OPTIMIZATION
+#define TARGET_OPTION_OPTIMIZATION frv_option_optimization
#undef TARGET_INIT_BUILTINS
#define TARGET_INIT_BUILTINS frv_init_builtins
#undef TARGET_EXPAND_BUILTIN
@@ -850,29 +853,12 @@ frv_option_override (void)
}
-/* Some machines may desire to change what optimizations are performed for
- various optimization levels. This macro, if defined, is executed once just
- after the optimization level is determined and before the remainder of the
- command options have been parsed. Values set in this macro are used as the
- default values for the other command line options.
+/* Implement TARGET_OPTION_OPTIMIZATION.
- LEVEL is the optimization level specified; 2 if `-O2' is specified, 1 if
- `-O' is specified, and 0 if neither is specified.
-
- SIZE is nonzero if `-Os' is specified, 0 otherwise.
-
- You should not use this macro to change options that are not
- machine-specific. These should uniformly selected by the same optimization
- level on all supported machines. Use this macro to enable machine-specific
- optimizations.
-
- *Do not examine `write_symbols' in this macro!* The debugging options are
- *not supposed to alter the generated code. */
-
-/* On the FRV, possibly disable VLIW packing which is done by the 2nd
+ On the FRV, possibly disable VLIW packing which is done by the 2nd
scheduling pass at the current time. */
-void
-frv_optimization_options (int level, int size ATTRIBUTE_UNUSED)
+static void
+frv_option_optimization (int level, int size ATTRIBUTE_UNUSED)
{
if (level >= 2)
{
diff --git a/gcc/config/frv/frv.h b/gcc/config/frv/frv.h
index 22200dca83c..463f6ad1ecc 100644
--- a/gcc/config/frv/frv.h
+++ b/gcc/config/frv/frv.h
@@ -328,27 +328,6 @@
#endif */
#define TARGET_VERSION fprintf (stderr, _(" (frv)"))
-/* Some machines may desire to change what optimizations are performed for
- various optimization levels. This macro, if defined, is executed once just
- after the optimization level is determined and before the remainder of the
- command options have been parsed. Values set in this macro are used as the
- default values for the other command line options.
-
- LEVEL is the optimization level specified; 2 if `-O2' is specified, 1 if
- `-O' is specified, and 0 if neither is specified.
-
- SIZE is nonzero if `-Os' is specified, 0 otherwise.
-
- You should not use this macro to change options that are not
- machine-specific. These should uniformly selected by the same optimization
- level on all supported machines. Use this macro to enable machine-specific
- optimizations.
-
- *Do not examine `write_symbols' in this macro!* The debugging options are
- *not supposed to alter the generated code. */
-#define OPTIMIZATION_OPTIONS(LEVEL,SIZE) frv_optimization_options (LEVEL, SIZE)
-
-
/* Define this macro if debugging can be performed even without a frame
pointer. If this macro is defined, GCC will turn on the
`-fomit-frame-pointer' option whenever `-O' is specified. */