summaryrefslogtreecommitdiff
path: root/gcc/common
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-23 10:41:42 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-23 10:41:42 +0000
commit6a2fc14eb132a2a4e1ac2849dd34152ec494ce9e (patch)
tree7b93802244815ada4c0d9017f18aa9c00fd3c497 /gcc/common
parent0f0c40109c936ceeb2c55635a170aeedc1a3bc8d (diff)
downloadgcc-6a2fc14eb132a2a4e1ac2849dd34152ec494ce9e.tar.gz
* params.c: Include common/common-target.h. Don't include tm.h.
(lang_independent_params): Move from toplev.c. (global_init_params): New. * params.h (global_init_params): Declare. * target.def (default_params): Move to common-target.def. * toplev.c (lang_independent_options): Remove. (lang_independent_params): Move to params.c. (general_init): Use global_init_params. * common/common-target.def (option_default_params): Move from target.def. * common/config/ia64/ia64-common.c: Include params.h. (ia64_option_default_params, TARGET_OPTION_DEFAULT_PARAMS): Move from ia64.c. * common/config/rs6000/rs6000-common.c: Include params.h. (rs6000_option_default_params, TARGET_OPTION_DEFAULT_PARAMS): Move from rs6000.c. * common/config/sh/sh-common.c: Include params.h. (sh_option_default_params, TARGET_OPTION_DEFAULT_PARAMS): Move from sh.c. * common/config/spu/spu-common.c: Include params.h. (spu_option_default_params, TARGET_OPTION_DEFAULT_PARAMS): Move from spu.c. * config/ia64/ia64.c (ia64_option_default_params, TARGET_OPTION_DEFAULT_PARAMS): Move to ia64-common.c. * config/rs6000/rs6000.c (rs6000_option_default_params, TARGET_OPTION_DEFAULT_PARAMS): Move to rs6000-common.c. * config/sh/sh.c (sh_option_default_params, TARGET_OPTION_DEFAULT_PARAMS): Move to sh-common.c. * config/spu/spu.c (spu_option_default_params, TARGET_OPTION_DEFAULT_PARAMS): Move to spu-common.c. * Makefile.in (OBJS): Remove params.o. (OBJS-libcommon-target): Add params.o. (params.o, $(common_out_object_file)): Update dependencies. * doc/tm.texi: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175330 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/common')
-rw-r--r--gcc/common/common-target.def7
-rw-r--r--gcc/common/config/ia64/ia64-common.c18
-rw-r--r--gcc/common/config/rs6000/rs6000-common.c13
-rw-r--r--gcc/common/config/sh/sh-common.c10
-rw-r--r--gcc/common/config/spu/spu-common.c13
5 files changed, 61 insertions, 0 deletions
diff --git a/gcc/common/common-target.def b/gcc/common/common-target.def
index ab89758221a..d8ede82e5b6 100644
--- a/gcc/common/common-target.def
+++ b/gcc/common/common-target.def
@@ -50,6 +50,13 @@ DEFHOOKPOD
"",
const struct default_options *, empty_optimization_table)
+DEFHOOK
+(option_default_params,
+"Set target-dependent default values for @option{--param} settings, using\
+ calls to @code{set_default_param_value}.",
+ void, (void),
+ hook_void_void)
+
/* The initial value of target_flags. */
DEFHOOKPOD
(default_target_flags,
diff --git a/gcc/common/config/ia64/ia64-common.c b/gcc/common/config/ia64/ia64-common.c
index 8c86ff49e68..11682532704 100644
--- a/gcc/common/config/ia64/ia64-common.c
+++ b/gcc/common/config/ia64/ia64-common.c
@@ -29,6 +29,7 @@ along with GCC; see the file COPYING3. If not see
#include "common/common-target-def.h"
#include "opts.h"
#include "flags.h"
+#include "params.h"
/* Implement overriding of the optimization options. */
static const struct default_options ia64_option_optimization_table[] =
@@ -83,8 +84,25 @@ ia64_except_unwind_info (struct gcc_options *opts)
return UI_TARGET;
}
+/* Implement TARGET_OPTION_DEFAULT_PARAMS. */
+
+static void
+ia64_option_default_params (void)
+{
+ /* Let the scheduler form additional regions. */
+ set_default_param_value (PARAM_MAX_SCHED_EXTEND_REGIONS_ITERS, 2);
+
+ /* Set the default values for cache-related parameters. */
+ set_default_param_value (PARAM_SIMULTANEOUS_PREFETCHES, 6);
+ set_default_param_value (PARAM_L1_CACHE_LINE_SIZE, 32);
+
+ set_default_param_value (PARAM_SCHED_MEM_TRUE_DEP_COST, 4);
+}
+
#undef TARGET_OPTION_OPTIMIZATION_TABLE
#define TARGET_OPTION_OPTIMIZATION_TABLE ia64_option_optimization_table
+#undef TARGET_OPTION_DEFAULT_PARAMS
+#define TARGET_OPTION_DEFAULT_PARAMS ia64_option_default_params
#undef TARGET_EXCEPT_UNWIND_INFO
#define TARGET_EXCEPT_UNWIND_INFO ia64_except_unwind_info
diff --git a/gcc/common/config/rs6000/rs6000-common.c b/gcc/common/config/rs6000/rs6000-common.c
index 0482c07d7a9..683240f27ba 100644
--- a/gcc/common/config/rs6000/rs6000-common.c
+++ b/gcc/common/config/rs6000/rs6000-common.c
@@ -28,6 +28,7 @@
#include "common/common-target-def.h"
#include "opts.h"
#include "flags.h"
+#include "params.h"
/* Implement TARGET_OPTION_OPTIMIZATION_TABLE. */
static const struct default_options rs6000_option_optimization_table[] =
@@ -51,6 +52,15 @@ rs6000_option_init_struct (struct gcc_options *opts)
opts->x_flag_section_anchors = 1;
}
+/* 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);
+}
+
/* If not otherwise specified by a target, make 'long double' equivalent to
'double'. */
@@ -316,6 +326,9 @@ rs6000_handle_option (struct gcc_options *opts, struct gcc_options *opts_set,
#undef TARGET_OPTION_INIT_STRUCT
#define TARGET_OPTION_INIT_STRUCT rs6000_option_init_struct
+#undef TARGET_OPTION_DEFAULT_PARAMS
+#define TARGET_OPTION_DEFAULT_PARAMS rs6000_option_default_params
+
#undef TARGET_OPTION_OPTIMIZATION_TABLE
#define TARGET_OPTION_OPTIMIZATION_TABLE rs6000_option_optimization_table
diff --git a/gcc/common/config/sh/sh-common.c b/gcc/common/config/sh/sh-common.c
index 8677fd49174..5a0c062e709 100644
--- a/gcc/common/config/sh/sh-common.c
+++ b/gcc/common/config/sh/sh-common.c
@@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see
#include "common/common-target-def.h"
#include "opts.h"
#include "flags.h"
+#include "params.h"
/* Set default optimization options. */
static const struct default_options sh_option_optimization_table[] =
@@ -196,10 +197,19 @@ sh_option_init_struct (struct gcc_options *opts)
opts->x_flag_finite_math_only = 2;
}
+/* Implement TARGET_OPTION_DEFAULT_PARAMS. */
+static void
+sh_option_default_params (void)
+{
+ set_default_param_value (PARAM_SIMULTANEOUS_PREFETCHES, 2);
+}
+
#undef TARGET_OPTION_OPTIMIZATION_TABLE
#define TARGET_OPTION_OPTIMIZATION_TABLE sh_option_optimization_table
#undef TARGET_OPTION_INIT_STRUCT
#define TARGET_OPTION_INIT_STRUCT sh_option_init_struct
+#undef TARGET_OPTION_DEFAULT_PARAMS
+#define TARGET_OPTION_DEFAULT_PARAMS sh_option_default_params
#undef TARGET_DEFAULT_TARGET_FLAGS
#define TARGET_DEFAULT_TARGET_FLAGS TARGET_DEFAULT
#undef TARGET_HANDLE_OPTION
diff --git a/gcc/common/config/spu/spu-common.c b/gcc/common/config/spu/spu-common.c
index d4a9f3c7cd9..421de7e847e 100644
--- a/gcc/common/config/spu/spu-common.c
+++ b/gcc/common/config/spu/spu-common.c
@@ -24,6 +24,7 @@
#include "common/common-target-def.h"
#include "opts.h"
#include "flags.h"
+#include "params.h"
static void
spu_option_init_struct (struct gcc_options *opts)
@@ -32,12 +33,24 @@ spu_option_init_struct (struct gcc_options *opts)
opts->x_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);
+}
+
#undef TARGET_DEFAULT_TARGET_FLAGS
#define TARGET_DEFAULT_TARGET_FLAGS (TARGET_DEFAULT)
#undef TARGET_OPTION_INIT_STRUCT
#define TARGET_OPTION_INIT_STRUCT spu_option_init_struct
+#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