aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryroux <yroux@138bc75d-0d04-0410-961f-82ee72b054a4>2015-04-02 06:55:26 +0000
committeryroux <yroux@138bc75d-0d04-0410-961f-82ee72b054a4>2015-04-02 06:55:26 +0000
commitc7c4a9a09d96673aff00a430d56d6478c76ad7b6 (patch)
treefd4f45bf3efdf937a27f1a3fbdcd431f3815a4fd
parentfe4b0d79c3cda64c53a7c3ced23f8b2a28243fbd (diff)
2015-04.02 Yvan Roux <yvan.roux@linaro.org>
Backport from trunk r218526. 2014-12-09 Wilco Dijkstra <wilco.dijkstra@arm.com> * gcc/config/aarch64/aarch64-protos.h (tune-params): Add reasociation tuning parameters. * gcc/config/aarch64/aarch64.c (TARGET_SCHED_REASSOCIATION_WIDTH): Define. (aarch64_reassociation_width): New function. (generic_tunings): Add reassociation tuning parameters. (cortexa53_tunings): Likewise. (cortexa57_tunings): Likewise. (thunderx_tunings): Likewise. git-svn-id: svn://gcc.gnu.org/svn/gcc/branches/linaro/gcc-4_9-branch@221823 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog.linaro15
-rw-r--r--gcc/config/aarch64/aarch64-protos.h3
-rw-r--r--gcc/config/aarch64/aarch64.c36
3 files changed, 50 insertions, 4 deletions
diff --git a/gcc/ChangeLog.linaro b/gcc/ChangeLog.linaro
index 12305330072..e2cd62b716c 100644
--- a/gcc/ChangeLog.linaro
+++ b/gcc/ChangeLog.linaro
@@ -1,5 +1,20 @@
2015-04.02 Yvan Roux <yvan.roux@linaro.org>
+ Backport from trunk r218526.
+ 2014-12-09 Wilco Dijkstra <wilco.dijkstra@arm.com>
+
+ * gcc/config/aarch64/aarch64-protos.h (tune-params): Add reasociation
+ tuning parameters.
+ * gcc/config/aarch64/aarch64.c (TARGET_SCHED_REASSOCIATION_WIDTH):
+ Define.
+ (aarch64_reassociation_width): New function.
+ (generic_tunings): Add reassociation tuning parameters.
+ (cortexa53_tunings): Likewise.
+ (cortexa57_tunings): Likewise.
+ (thunderx_tunings): Likewise.
+
+2015-04.02 Yvan Roux <yvan.roux@linaro.org>
+
Backport from trunk r218866.
2014-12-18 Wilco Dijkstra <wilco.dijkstra@arm.com>
diff --git a/gcc/config/aarch64/aarch64-protos.h b/gcc/config/aarch64/aarch64-protos.h
index d5c89d62119..0444bc4bcde 100644
--- a/gcc/config/aarch64/aarch64-protos.h
+++ b/gcc/config/aarch64/aarch64-protos.h
@@ -171,6 +171,9 @@ struct tune_params
const int memmov_cost;
const int issue_rate;
const unsigned int fuseable_ops;
+ const int int_reassoc_width;
+ const int fp_reassoc_width;
+ const int vec_reassoc_width;
};
HOST_WIDE_INT aarch64_initial_elimination_offset (unsigned, unsigned);
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index a81425a812d..ae2f1aabfc2 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -311,7 +311,10 @@ static const struct tune_params generic_tunings =
&generic_vector_cost,
NAMED_PARAM (memmov_cost, 4),
NAMED_PARAM (issue_rate, 2),
- NAMED_PARAM (fuseable_ops, AARCH64_FUSE_NOTHING)
+ NAMED_PARAM (fuseable_ops, AARCH64_FUSE_NOTHING),
+ 2, /* int_reassoc_width. */
+ 4, /* fp_reassoc_width. */
+ 1 /* vec_reassoc_width. */
};
static const struct tune_params cortexa53_tunings =
@@ -323,7 +326,10 @@ static const struct tune_params cortexa53_tunings =
NAMED_PARAM (memmov_cost, 4),
NAMED_PARAM (issue_rate, 2),
NAMED_PARAM (fuseable_ops, (AARCH64_FUSE_MOV_MOVK | AARCH64_FUSE_ADRP_ADD
- | AARCH64_FUSE_MOVK_MOVK | AARCH64_FUSE_ADRP_LDR))
+ | AARCH64_FUSE_MOVK_MOVK | AARCH64_FUSE_ADRP_LDR)),
+ 2, /* int_reassoc_width. */
+ 4, /* fp_reassoc_width. */
+ 1 /* vec_reassoc_width. */
};
static const struct tune_params cortexa57_tunings =
@@ -334,7 +340,10 @@ static const struct tune_params cortexa57_tunings =
&cortexa57_vector_cost,
NAMED_PARAM (memmov_cost, 4),
NAMED_PARAM (issue_rate, 3),
- NAMED_PARAM (fuseable_ops, (AARCH64_FUSE_MOV_MOVK | AARCH64_FUSE_ADRP_ADD | AARCH64_FUSE_MOVK_MOVK))
+ NAMED_PARAM (fuseable_ops, (AARCH64_FUSE_MOV_MOVK | AARCH64_FUSE_ADRP_ADD | AARCH64_FUSE_MOVK_MOVK)),
+ 2, /* int_reassoc_width. */
+ 4, /* fp_reassoc_width. */
+ 1 /* vec_reassoc_width. */
};
static const struct tune_params thunderx_tunings =
@@ -345,7 +354,10 @@ static const struct tune_params thunderx_tunings =
&generic_vector_cost,
NAMED_PARAM (memmov_cost, 6),
NAMED_PARAM (issue_rate, 2),
- NAMED_PARAM (fuseable_ops, AARCH64_FUSE_CMP_BRANCH)
+ NAMED_PARAM (fuseable_ops, AARCH64_FUSE_CMP_BRANCH),
+ 2, /* int_reassoc_width. */
+ 4, /* fp_reassoc_width. */
+ 1 /* vec_reassoc_width. */
};
/* A processor implementing AArch64. */
@@ -442,6 +454,19 @@ aarch64_min_divisions_for_recip_mul (enum machine_mode mode ATTRIBUTE_UNUSED)
return 2;
}
+static int
+aarch64_reassociation_width (unsigned opc ATTRIBUTE_UNUSED,
+ enum machine_mode mode)
+{
+ if (VECTOR_MODE_P (mode))
+ return aarch64_tune_params->vec_reassoc_width;
+ if (INTEGRAL_MODE_P (mode))
+ return aarch64_tune_params->int_reassoc_width;
+ if (FLOAT_MODE_P (mode))
+ return aarch64_tune_params->fp_reassoc_width;
+ return 1;
+}
+
/* Provide a mapping from gcc register numbers to dwarf register numbers. */
unsigned
aarch64_dbx_register_number (unsigned regno)
@@ -10384,6 +10409,9 @@ aarch_macro_fusion_pair_p (rtx prev, rtx curr)
#undef TARGET_PREFERRED_RELOAD_CLASS
#define TARGET_PREFERRED_RELOAD_CLASS aarch64_preferred_reload_class
+#undef TARGET_SCHED_REASSOCIATION_WIDTH
+#define TARGET_SCHED_REASSOCIATION_WIDTH aarch64_reassociation_width
+
#undef TARGET_SECONDARY_RELOAD
#define TARGET_SECONDARY_RELOAD aarch64_secondary_reload