The attached patch tunes the costs of conditional execution and branches
for Cortex-A15 to be the same as that for Cortex-A5.
This gives an average improvement of over 6% on a popular embedded
benchmark.
Note that the tuning parameter structure added for Cortex-A15 is only tuned
for branch costs, and otherwise takes the generic values. Tuning for other
optimisations (notably preload insertion) is still to be done.
Thanks,
Matt
gcc/ChangeLog:
2012-01-06 Matthew Gretton-Dann <matthew.gretton-d...@arm.com>
* config/arm/arm-cores.def (cortex-a15): Use cortex_a15_tune for
tuning parameters.
* config/arm/arm.c (arm_cortex_a15_tune): New static variable.
--
Matthew Gretton-Dann
Principal Engineer, PD Software, ARM Ltd.
diff --git a/gcc/config/arm/arm-cores.def b/gcc/config/arm/arm-cores.def
index 80609e0..b0bd172 100644
--- a/gcc/config/arm/arm-cores.def
+++ b/gcc/config/arm/arm-cores.def
@@ -129,7 +129,7 @@ ARM_CORE("cortex-a5", cortexa5, 7A,
FL_LDSCHED, cortex_a5)
ARM_CORE("cortex-a7", cortexa7, 7A,
FL_LDSCHED | FL_THUMB_DIV | FL_ARM_DIV, cortex)
ARM_CORE("cortex-a8", cortexa8, 7A,
FL_LDSCHED, cortex)
ARM_CORE("cortex-a9", cortexa9, 7A,
FL_LDSCHED, cortex_a9)
-ARM_CORE("cortex-a15", cortexa15, 7A,
FL_LDSCHED | FL_THUMB_DIV | FL_ARM_DIV, cortex)
+ARM_CORE("cortex-a15", cortexa15, 7A,
FL_LDSCHED | FL_THUMB_DIV | FL_ARM_DIV, cortex_a15)
ARM_CORE("cortex-r4", cortexr4, 7R,
FL_LDSCHED, cortex)
ARM_CORE("cortex-r4f", cortexr4f, 7R,
FL_LDSCHED, cortex)
ARM_CORE("cortex-r5", cortexr5, 7R,
FL_LDSCHED | FL_ARM_DIV, cortex)
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 0bded8d..6f1eb13 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -961,6 +961,17 @@ const struct tune_params arm_cortex_a9_tune =
arm_default_branch_cost
};
+const struct tune_params arm_cortex_a15_tune =
+{
+ arm_9e_rtx_costs,
+ NULL,
+ 1, /* Constant limit. */
+ 1, /* Max cond insns. */
+ ARM_PREFETCH_NOT_BENEFICIAL, /* TODO: Calculate correct
values. */
+ false, /* Prefer constant pool. */
+ arm_cortex_a5_branch_cost
+};
+
const struct tune_params arm_fa726te_tune =
{
arm_9e_rtx_costs,