summaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-14 10:22:43 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-14 10:22:43 +0000
commit56f280c4e1666af026e5c2c274e8b1a165691ea1 (patch)
tree9b340b8d6c331d28e231ef93373d6e4219525626 /gcc/config
parent5574dbdd51f2fab4b84bb3b5cde65239c2845624 (diff)
downloadgcc-56f280c4e1666af026e5c2c274e8b1a165691ea1.tar.gz
* params.c (params_finished): New.
(add_params): Assert !params_finished. (finish_params): New. (set_param_value_internal): Take params and params_set parameters. Assert params_finished. (set_param_value, maybe_set_param_value): Take params and params_set parameters. Update calls to set_param_value_internal. (set_default_param_value): Assert !params_finished. Don't use set_param_value_internal. (default_param_value, init_param_values): New. * params.h (struct param_info): Change value to default_value. Remove set. (set_param_value, maybe_set_param_value): Add params and params_set parameters. (PARAM_VALUE): Get parameters from global_options. (PARAM_SET_P): Remove. (finish_params, default_param_value, init_param_values): New. * common.opt (param_values): New Variable. * config/arm/arm.c (arm_option_override): Pass extra arguments to maybe_set_param_value. * config/i386/i386.c (ix86_option_override_internal): Pass extra arguments to maybe_set_param_value. * config/picochip/picochip.c (picochip_option_override): Pass extra arguments to maybe_set_param_value. * config/rs6000/rs6000.c (rs6000_option_override_internal): Pass extra arguments to maybe_set_param_value. * config/s390/s390.c (s390_option_override): Use maybe_set_param_value instead of set_param_value. Pass extra arguments to maybe_set_param_value. * config/sparc/sparc.c (sparc_option_override): Pass extra arguments to maybe_set_param_value. * config/spu/spu.c (spu_option_override): Pass extra arguments to maybe_set_param_value. * opts.c (handle_param): Take opts and opts_set parameters. Update call to set_param_value. (initial_min_crossjump_insns, initial_max_fields_for_field_sensitive, initial_loop_invariant_max_bbs_in_loop): Remove. (init_options_once): Don't set them. (init_options_struct): Initialize parameters structures. (default_options_optimization): Use default_param_value when restoring defaults. Update calls to maybe_set_param_value. (finish_options): Update calls to maybe_set_param_value. (common_handle_option): Update calls to handle_param and set_param_value. * toplev.c (DEFPARAM): Update definition for changes to param_info. (general_init): Call finish_params. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165460 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/arm/arm.c4
-rw-r--r--gcc/config/i386/i386.c16
-rw-r--r--gcc/config/picochip/picochip.c8
-rw-r--r--gcc/config/rs6000/rs6000.c16
-rw-r--r--gcc/config/s390/s390.c44
-rw-r--r--gcc/config/sparc/sparc.c8
-rw-r--r--gcc/config/spu/spu.c4
7 files changed, 74 insertions, 26 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 855f39e3858..5307948cc1d 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -1958,7 +1958,9 @@ arm_option_override (void)
but measurable, size reduction for PIC code. Therefore, we decrease
the bar for unrestricted expression hoisting to the cost of PIC address
calculation, which is 2 instructions. */
- maybe_set_param_value (PARAM_GCSE_UNRESTRICTED_COST, 2);
+ maybe_set_param_value (PARAM_GCSE_UNRESTRICTED_COST, 2,
+ global_options.x_param_values,
+ global_options_set.x_param_values);
/* Register global variables with the garbage collector. */
arm_add_gc_roots ();
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 0987b4597bf..91e38393890 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -3633,10 +3633,18 @@ ix86_option_override_internal (bool main_args_p)
flag_schedule_insns_after_reload = flag_schedule_insns = 0;
maybe_set_param_value (PARAM_SIMULTANEOUS_PREFETCHES,
- ix86_cost->simultaneous_prefetches);
- maybe_set_param_value (PARAM_L1_CACHE_LINE_SIZE, ix86_cost->prefetch_block);
- maybe_set_param_value (PARAM_L1_CACHE_SIZE, ix86_cost->l1_cache_size);
- maybe_set_param_value (PARAM_L2_CACHE_SIZE, ix86_cost->l2_cache_size);
+ ix86_cost->simultaneous_prefetches,
+ global_options.x_param_values,
+ global_options_set.x_param_values);
+ maybe_set_param_value (PARAM_L1_CACHE_LINE_SIZE, ix86_cost->prefetch_block,
+ global_options.x_param_values,
+ global_options_set.x_param_values);
+ maybe_set_param_value (PARAM_L1_CACHE_SIZE, ix86_cost->l1_cache_size,
+ global_options.x_param_values,
+ global_options_set.x_param_values);
+ maybe_set_param_value (PARAM_L2_CACHE_SIZE, ix86_cost->l2_cache_size,
+ global_options.x_param_values,
+ global_options_set.x_param_values);
/* Enable sw prefetching at -O3 for CPUS that prefetching is helpful. */
if (flag_prefetch_loop_arrays < 0
diff --git a/gcc/config/picochip/picochip.c b/gcc/config/picochip/picochip.c
index f494b957687..37771dbc6e6 100644
--- a/gcc/config/picochip/picochip.c
+++ b/gcc/config/picochip/picochip.c
@@ -354,8 +354,12 @@ picochip_option_override (void)
that could potentially increase stack size.*/
if (flag_conserve_stack)
{
- maybe_set_param_value (PARAM_LARGE_STACK_FRAME, 0);
- maybe_set_param_value (PARAM_STACK_FRAME_GROWTH, 0);
+ maybe_set_param_value (PARAM_LARGE_STACK_FRAME, 0,
+ global_options.x_param_values,
+ global_options_set.x_param_values);
+ maybe_set_param_value (PARAM_STACK_FRAME_GROWTH, 0,
+ global_options.x_param_values,
+ global_options_set.x_param_values);
}
/* Turn off the elimination of unused types. The elaborator
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index d7377a50599..f008c2dedfb 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -3159,11 +3159,19 @@ rs6000_option_override_internal (const char *default_cpu)
}
maybe_set_param_value (PARAM_SIMULTANEOUS_PREFETCHES,
- rs6000_cost->simultaneous_prefetches);
- maybe_set_param_value (PARAM_L1_CACHE_SIZE, rs6000_cost->l1_cache_size);
+ rs6000_cost->simultaneous_prefetches,
+ global_options.x_param_values,
+ global_options_set.x_param_values);
+ maybe_set_param_value (PARAM_L1_CACHE_SIZE, rs6000_cost->l1_cache_size,
+ global_options.x_param_values,
+ global_options_set.x_param_values);
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);
+ rs6000_cost->cache_line_size,
+ global_options.x_param_values,
+ global_options_set.x_param_values);
+ maybe_set_param_value (PARAM_L2_CACHE_SIZE, rs6000_cost->l2_cache_size,
+ global_options.x_param_values,
+ global_options_set.x_param_values);
/* If using typedef char *va_list, signal that __builtin_va_start (&ap, 0)
can be optimized to ap = __builtin_next_arg (0). */
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index 04fcee2071e..8aabe1175e8 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -1687,22 +1687,42 @@ s390_option_override (void)
if (s390_tune == PROCESSOR_2097_Z10
|| s390_tune == PROCESSOR_2817_Z196)
{
- maybe_set_param_value (PARAM_MAX_UNROLLED_INSNS, 100);
- maybe_set_param_value (PARAM_MAX_UNROLL_TIMES, 32);
- maybe_set_param_value (PARAM_MAX_COMPLETELY_PEELED_INSNS, 2000);
- maybe_set_param_value (PARAM_MAX_COMPLETELY_PEEL_TIMES, 64);
- }
-
- set_param_value ("max-pending-list-length", 256);
+ maybe_set_param_value (PARAM_MAX_UNROLLED_INSNS, 100,
+ global_options.x_param_values,
+ global_options_set.x_param_values);
+ maybe_set_param_value (PARAM_MAX_UNROLL_TIMES, 32,
+ global_options.x_param_values,
+ global_options_set.x_param_values);
+ maybe_set_param_value (PARAM_MAX_COMPLETELY_PEELED_INSNS, 2000,
+ global_options.x_param_values,
+ global_options_set.x_param_values);
+ maybe_set_param_value (PARAM_MAX_COMPLETELY_PEEL_TIMES, 64,
+ global_options.x_param_values,
+ global_options_set.x_param_values);
+ }
+
+ maybe_set_param_value (PARAM_MAX_PENDING_LIST_LENGTH, 256,
+ global_options.x_param_values,
+ global_options_set.x_param_values);
/* values for loop prefetching */
- set_param_value ("l1-cache-line-size", 256);
- maybe_set_param_value (PARAM_L1_CACHE_SIZE, 128);
+ maybe_set_param_value (PARAM_L1_CACHE_LINE_SIZE, 256,
+ global_options.x_param_values,
+ global_options_set.x_param_values);
+ maybe_set_param_value (PARAM_L1_CACHE_SIZE, 128,
+ global_options.x_param_values,
+ global_options_set.x_param_values);
/* s390 has more than 2 levels and the size is much larger. Since
we are always running virtualized assume that we only get a small
part of the caches above l1. */
- maybe_set_param_value (PARAM_L2_CACHE_SIZE, 1500);
- maybe_set_param_value (PARAM_PREFETCH_MIN_INSN_TO_MEM_RATIO, 2);
- maybe_set_param_value (PARAM_SIMULTANEOUS_PREFETCHES, 6);
+ maybe_set_param_value (PARAM_L2_CACHE_SIZE, 1500,
+ global_options.x_param_values,
+ global_options_set.x_param_values);
+ maybe_set_param_value (PARAM_PREFETCH_MIN_INSN_TO_MEM_RATIO, 2,
+ global_options.x_param_values,
+ global_options_set.x_param_values);
+ maybe_set_param_value (PARAM_SIMULTANEOUS_PREFETCHES, 6,
+ global_options.x_param_values,
+ global_options_set.x_param_values);
/* This cannot reside in s390_option_optimization since HAVE_prefetch
requires the arch flags to be evaluated already. Since prefetching
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 68073017845..0cd3c8191e8 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -922,13 +922,17 @@ sparc_option_override (void)
|| sparc_cpu == PROCESSOR_NIAGARA2)
? 2
: (sparc_cpu == PROCESSOR_ULTRASPARC3
- ? 8 : 3)));
+ ? 8 : 3)),
+ global_options.x_param_values,
+ global_options_set.x_param_values);
maybe_set_param_value (PARAM_L1_CACHE_LINE_SIZE,
((sparc_cpu == PROCESSOR_ULTRASPARC
|| sparc_cpu == PROCESSOR_ULTRASPARC3
|| sparc_cpu == PROCESSOR_NIAGARA
|| sparc_cpu == PROCESSOR_NIAGARA2)
- ? 64 : 32));
+ ? 64 : 32),
+ global_options.x_param_values,
+ global_options_set.x_param_values);
}
/* Miscellaneous utilities. */
diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c
index 9bc78e801b8..f9e5c82ea7a 100644
--- a/gcc/config/spu/spu.c
+++ b/gcc/config/spu/spu.c
@@ -514,7 +514,9 @@ 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)
- maybe_set_param_value (PARAM_MAX_COMPLETELY_PEEL_TIMES, 1);
+ maybe_set_param_value (PARAM_MAX_COMPLETELY_PEEL_TIMES, 1,
+ global_options.x_param_values,
+ global_options_set.x_param_values);
flag_omit_frame_pointer = 1;