aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2016-02-17 14:15:24 +0100
committerLinaro Code Review <review@review.linaro.org>2016-03-14 13:52:33 +0000
commita4f0ce806910685558e1f30b0856536c4ac06e77 (patch)
tree50d04bb43aa0890a0886f8c46ff6601ad0608a5d
parent42dc2c15dc21c20a56cc08f06a8587541a0c1a73 (diff)
gcc/
Backport from trunk r233266. 2016-02-10 Wilco Dijkstra <wdijkstr@arm.com> * config/arm/arm.c (arm_cortex_a53_tune): Enable AES fusion. (arm_cortex_a57_tune): Likewise. (aarch_macro_fusion_pair_p): Add support for AES fusion. * config/arm/arm-protos.h (fuse_ops): Add FUSE_AES_AESMC. Change-Id: I7e1499693e973ecfebe4998efb042bb561a23618
-rw-r--r--gcc/config/arm/arm-protos.h5
-rw-r--r--gcc/config/arm/arm.c8
2 files changed, 9 insertions, 4 deletions
diff --git a/gcc/config/arm/arm-protos.h b/gcc/config/arm/arm-protos.h
index 3ca9f02b6d2..45f9d9bc2e3 100644
--- a/gcc/config/arm/arm-protos.h
+++ b/gcc/config/arm/arm-protos.h
@@ -299,8 +299,9 @@ struct tune_params
enum fuse_ops
{
FUSE_NOTHING = 0,
- FUSE_MOVW_MOVT = 1 << 0
- } fusible_ops: 1;
+ FUSE_MOVW_MOVT = 1 << 0,
+ FUSE_AES_AESMC = 1 << 1
+ } fusible_ops: 2;
/* Depth of scheduling queue to check for L2 autoprefetcher. */
enum {SCHED_AUTOPREF_OFF, SCHED_AUTOPREF_RANK, SCHED_AUTOPREF_FULL}
sched_autopref: 2;
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 58f2f113d01..dbb0a82bff1 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -1995,7 +1995,7 @@ const struct tune_params arm_cortex_a53_tune =
tune_params::DISPARAGE_FLAGS_NEITHER,
tune_params::PREF_NEON_64_FALSE,
tune_params::PREF_NEON_STRINGOPS_TRUE,
- FUSE_OPS (tune_params::FUSE_MOVW_MOVT),
+ FUSE_OPS (tune_params::FUSE_MOVW_MOVT | tune_params::FUSE_AES_AESMC),
tune_params::SCHED_AUTOPREF_OFF
};
@@ -2018,7 +2018,7 @@ const struct tune_params arm_cortex_a57_tune =
tune_params::DISPARAGE_FLAGS_ALL,
tune_params::PREF_NEON_64_FALSE,
tune_params::PREF_NEON_STRINGOPS_TRUE,
- FUSE_OPS (tune_params::FUSE_MOVW_MOVT),
+ FUSE_OPS (tune_params::FUSE_MOVW_MOVT | tune_params::FUSE_AES_AESMC),
tune_params::SCHED_AUTOPREF_FULL
};
@@ -29362,6 +29362,10 @@ aarch_macro_fusion_pair_p (rtx_insn* prev, rtx_insn* curr)
if (!arm_macro_fusion_p ())
return false;
+ if (current_tune->fusible_ops & tune_params::FUSE_AES_AESMC
+ && aarch_crypto_can_dual_issue (prev, curr))
+ return true;
+
if (current_tune->fusible_ops & tune_params::FUSE_MOVW_MOVT)
{
/* We are trying to fuse