summaryrefslogtreecommitdiff
path: root/gcc/config/spu
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-11 12:28:40 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-11 12:28:40 +0000
commit686e27690af4295ea88041c1d2d7fd31ee8f1cb7 (patch)
tree10941206f59ba4ef8b1a814126f81d1e02f511d4 /gcc/config/spu
parent07b87b7fcb73a27a489c209747c61b79a088563a (diff)
downloadgcc-686e27690af4295ea88041c1d2d7fd31ee8f1cb7.tar.gz
* params.c (set_param_value_internal): New.
(set_param_value): Use set_param_value_internal. (maybe_set_param_value, set_default_param_value): New. * params.h (PARAM_VALUE, PARAM_SET_P): Make into rvalues. (maybe_set_param_value, set_default_param_value): Declare. * config/arm/arm.c (arm_option_override): Use maybe_set_param_value. * config/i386/i386.c (ix86_option_override_internal): Use maybe_set_param_value. * config/ia64/ia64.c (ia64_option_default_params, TARGET_OPTION_DEFAULT_PARAMS): New. (ia64_option_optimization): Move some code to ia64_option_default_params. * config/picochip/picochip.c (picochip_option_override): Use maybe_set_param_value. * config/rs6000/rs6000.c (rs6000_option_default_params, TARGET_OPTION_DEFAULT_PARAMS): New. (rs6000_option_override_internal): Use maybe_set_param_value. (rs6000_option_optimization): Move some code to rs6000_option_default_params. * config/s390/s390.c (s390_option_override): Use maybe_set_param_value. * config/sh/sh.c (sh_option_default_params, TARGET_OPTION_DEFAULT_PARAMS): New. (sh_option_optimization): Move some code to sh_option_default_params. * config/sparc/sparc.c (sparc_option_override): Use maybe_set_param_value. * config/spu/spu.c (spu_option_default_params, TARGET_OPTION_DEFAULT_PARAMS): New. (spu_option_optimization): Move some code to spu_option_default_params. (spu_option_override): Use maybe_set_param_value. * doc/tm.texi.in (TARGET_OPTION_DEFAULT_PARAMS): New @hook. * doc/tm.texi: Regenerate. * ggc-common.c (init_ggc_heuristics): Use set_default_param_value. * opts.c (init_options_once): Use PARAM_VALUE not direct access to compiler_params. (default_options_optimization): Use maybe_set_param_value. (finish_options): Use maybe_set_param_value. * target.def (target_option.default_params): New hook. * toplev.c (general_init): Call targetm.target_option.default_params. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165303 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/spu')
-rw-r--r--gcc/config/spu/spu.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c
index 36c48ee7f14..9bc78e801b8 100644
--- a/gcc/config/spu/spu.c
+++ b/gcc/config/spu/spu.c
@@ -151,6 +151,7 @@ char regs_ever_allocated[FIRST_PSEUDO_REGISTER];
/* Prototypes and external defs. */
static void spu_option_override (void);
static void spu_option_optimization (int, int);
+static void spu_option_default_params (void);
static void spu_init_builtins (void);
static tree spu_builtin_decl (unsigned, bool);
static bool spu_scalar_mode_supported_p (enum machine_mode mode);
@@ -482,6 +483,9 @@ static const struct attribute_spec spu_attribute_table[] =
#undef TARGET_OPTION_OPTIMIZATION
#define TARGET_OPTION_OPTIMIZATION spu_option_optimization
+#undef TARGET_OPTION_DEFAULT_PARAMS
+#define TARGET_OPTION_DEFAULT_PARAMS spu_option_default_params
+
#undef TARGET_EXCEPT_UNWIND_INFO
#define TARGET_EXCEPT_UNWIND_INFO sjlj_except_unwind_info
@@ -490,23 +494,27 @@ struct gcc_target targetm = TARGET_INITIALIZER;
static void
spu_option_optimization (int level ATTRIBUTE_UNUSED, int size ATTRIBUTE_UNUSED)
{
- /* Override some of the default param values. With so many registers
- larger values are better for these params. */
- MAX_PENDING_LIST_LENGTH = 128;
-
/* With so many registers this is better on by default. */
flag_rename_registers = 1;
}
+/* Implement TARGET_OPTION_DEFAULT_PARAMS. */
+static void
+spu_option_default_params (void)
+{
+ /* Override some of the default param values. With so many registers
+ larger values are better for these params. */
+ set_default_param_value (PARAM_MAX_PENDING_LIST_LENGTH, 128);
+}
+
/* Implement TARGET_OPTION_OVERRIDE. */
static void
spu_option_override (void)
{
/* Small loops will be unpeeled at -O3. For SPU it is more important
to keep code small by default. */
- if (!flag_unroll_loops && !flag_peel_loops
- && !PARAM_SET_P (PARAM_MAX_COMPLETELY_PEEL_TIMES))
- PARAM_VALUE (PARAM_MAX_COMPLETELY_PEEL_TIMES) = 1;
+ if (!flag_unroll_loops && !flag_peel_loops)
+ maybe_set_param_value (PARAM_MAX_COMPLETELY_PEEL_TIMES, 1);
flag_omit_frame_pointer = 1;