diff options
author | Joseph Myers <joseph@codesourcery.com> | 2010-10-11 13:28:40 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2010-10-11 13:28:40 +0100 |
commit | 128dc8e23075f70721ff1cbe3294021e7dd82834 (patch) | |
tree | 10941206f59ba4ef8b1a814126f81d1e02f511d4 /gcc/config/rs6000 | |
parent | 4907769827b246d80145601c6fa5caf84f04f941 (diff) | |
download | gcc-128dc8e23075f70721ff1cbe3294021e7dd82834.tar.gz |
params.c (set_param_value_internal): New.
* 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.
From-SVN: r165303
Diffstat (limited to 'gcc/config/rs6000')
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 91b26124c5c..cd1c8cc2194 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -1137,6 +1137,7 @@ static rtx altivec_expand_vec_ext_builtin (tree, rtx); static int get_element_number (tree, tree); static void rs6000_option_override (void); static void rs6000_option_optimization (int, int); +static void rs6000_option_default_params (void); static bool rs6000_handle_option (size_t, const char *, int); static void rs6000_parse_tls_size_option (void); static void rs6000_parse_yes_no_option (const char *, const char *, int *); @@ -1604,6 +1605,9 @@ static const struct attribute_spec rs6000_attribute_table[] = #undef TARGET_OPTION_OPTIMIZATION #define TARGET_OPTION_OPTIMIZATION rs6000_option_optimization +#undef TARGET_OPTION_DEFAULT_PARAMS +#define TARGET_OPTION_DEFAULT_PARAMS rs6000_option_default_params + #undef TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION #define TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION \ rs6000_builtin_vectorized_function @@ -3154,15 +3158,12 @@ rs6000_option_override_internal (const char *default_cpu) gcc_unreachable (); } - if (!PARAM_SET_P (PARAM_SIMULTANEOUS_PREFETCHES)) - set_param_value ("simultaneous-prefetches", - rs6000_cost->simultaneous_prefetches); - if (!PARAM_SET_P (PARAM_L1_CACHE_SIZE)) - set_param_value ("l1-cache-size", rs6000_cost->l1_cache_size); - if (!PARAM_SET_P (PARAM_L1_CACHE_LINE_SIZE)) - set_param_value ("l1-cache-line-size", rs6000_cost->cache_line_size); - if (!PARAM_SET_P (PARAM_L2_CACHE_SIZE)) - set_param_value ("l2-cache-size", rs6000_cost->l2_cache_size); + maybe_set_param_value (PARAM_SIMULTANEOUS_PREFETCHES, + rs6000_cost->simultaneous_prefetches); + maybe_set_param_value (PARAM_L1_CACHE_SIZE, rs6000_cost->l1_cache_size); + maybe_set_param_value (PARAM_L1_CACHE_LINE_SIZE, + rs6000_cost->cache_line_size); + maybe_set_param_value (PARAM_L2_CACHE_SIZE, rs6000_cost->l2_cache_size); /* If using typedef char *va_list, signal that __builtin_va_start (&ap, 0) can be optimized to ap = __builtin_next_arg (0). */ @@ -3681,9 +3682,6 @@ rs6000_option_optimization (int level ATTRIBUTE_UNUSED, avoid calling them when that's the only reason we would. */ flag_errno_math = 0; - /* Double growth factor to counter reduced min jump length. */ - set_param_value ("max-grow-copy-bb-insns", 16); - /* Enable section anchors by default. Skip section anchors for Objective C and Objective C++ until front-ends fixed. */ @@ -3691,6 +3689,15 @@ rs6000_option_optimization (int level ATTRIBUTE_UNUSED, flag_section_anchors = 2; } +/* Implement TARGET_OPTION_DEFAULT_PARAMS. */ + +static void +rs6000_option_default_params (void) +{ + /* Double growth factor to counter reduced min jump length. */ + set_default_param_value (PARAM_MAX_GROW_COPY_BB_INSNS, 16); +} + static enum fpu_type_t rs6000_parse_fpu_option (const char *option) { |