public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][ARM] Enable fusion of AES instructions
@ 2015-11-20 10:40 Wilco Dijkstra
  2015-11-25 12:40 ` Yvan Roux
  0 siblings, 1 reply; 6+ messages in thread
From: Wilco Dijkstra @ 2015-11-20 10:40 UTC (permalink / raw)
  To: gcc-patches

Enable instruction fusion of AES instructions on ARM for Cortex-A53 and
Cortex-A57. 

OK for commit?

ChangeLog:
2015-11-20  Wilco Dijkstra  <wdijkstr@arm.com>

	* gcc/config/arm/arm.c (arm_cortex_a53_tune): Add AES fusion.
	(arm_cortex_a57_tune): Likewise.
	(aarch_macro_fusion_pair_p): Add support for AES fusion.
	* gcc/config/arm/arm-protos.h (fuse_ops): Add FUSE_AES_AESMC.

---
 gcc/config/arm/arm-protos.h | 5 +++--
 gcc/config/arm/arm.c        | 9 +++++++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/gcc/config/arm/arm-protos.h b/gcc/config/arm/arm-protos.h
index f9b1276..4801bb8 100644
--- a/gcc/config/arm/arm-protos.h
+++ b/gcc/config/arm/arm-protos.h
@@ -302,8 +302,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 02f5dc3..7077199 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -1969,7 +1969,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
 };
 
@@ -1992,7 +1992,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
 };
 
@@ -29668,6 +29668,11 @@ aarch_macro_fusion_pair_p (rtx_insn* prev,
rtx_insn* curr)
 	       && REGNO (SET_DEST (curr_set)) == REGNO (SET_DEST
(prev_set)))
 	     return true;
     }
+
+  if (current_tune->fusible_ops & tune_params::FUSE_AES_AESMC
+      && aarch_crypto_can_dual_issue (prev, curr))
+    return true;
+
   return false;
 }
 
-- 
1.9.1



^ permalink raw reply	[flat|nested] 6+ messages in thread
* RE: [PATCH][ARM] Enable fusion of AES instructions
@ 2015-12-15 10:59 Wilco Dijkstra
  2016-01-26 17:41 ` Wilco Dijkstra
  2016-02-04 10:57 ` Ramana Radhakrishnan
  0 siblings, 2 replies; 6+ messages in thread
From: Wilco Dijkstra @ 2015-12-15 10:59 UTC (permalink / raw)
  To: James Greenhalgh; +Cc: gcc-patches, nd

ping

> -----Original Message-----
> From: Wilco Dijkstra [mailto:Wilco.Dijkstra@arm.com]
> Sent: 19 November 2015 18:12
> To: gcc-patches@gcc.gnu.org
> Subject: [PATCH][ARM] Enable fusion of AES instructions
> 
> Enable instruction fusion of AES instructions on ARM for Cortex-A53 and Cortex-A57.
> 
> OK for commit?
> 
> ChangeLog:
> 2015-11-20  Wilco Dijkstra  <wdijkstr@arm.com>
> 
> 	* gcc/config/arm/arm.c (arm_cortex_a53_tune): Add AES fusion.
> 	(arm_cortex_a57_tune): Likewise.
> 	(aarch_macro_fusion_pair_p): Add support for AES fusion.
> 	* gcc/config/arm/arm-protos.h (fuse_ops): Add FUSE_AES_AESMC.
> 
> ---
>  gcc/config/arm/arm-protos.h | 5 +++--
>  gcc/config/arm/arm.c        | 9 +++++++--
>  2 files changed, 10 insertions(+), 4 deletions(-)
> 
> diff --git a/gcc/config/arm/arm-protos.h b/gcc/config/arm/arm-protos.h
> index f9b1276..4801bb8 100644
> --- a/gcc/config/arm/arm-protos.h
> +++ b/gcc/config/arm/arm-protos.h
> @@ -302,8 +302,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 02f5dc3..7077199 100644
> --- a/gcc/config/arm/arm.c
> +++ b/gcc/config/arm/arm.c
> @@ -1969,7 +1969,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
>  };
> 
> @@ -1992,7 +1992,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
>  };
> 
> @@ -29668,6 +29668,11 @@ aarch_macro_fusion_pair_p (rtx_insn* prev, rtx_insn* curr)
>  	       && REGNO (SET_DEST (curr_set)) == REGNO (SET_DEST (prev_set)))
>  	     return true;
>      }
> +
> +  if (current_tune->fusible_ops & tune_params::FUSE_AES_AESMC
> +      && aarch_crypto_can_dual_issue (prev, curr))
> +    return true;
> +
>    return false;
>  }
> 
> --
> 1.9.1

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-02-04 10:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-20 10:40 [PATCH][ARM] Enable fusion of AES instructions Wilco Dijkstra
2015-11-25 12:40 ` Yvan Roux
2015-11-25 14:12   ` Wilco Dijkstra
2015-12-15 10:59 Wilco Dijkstra
2016-01-26 17:41 ` Wilco Dijkstra
2016-02-04 10:57 ` Ramana Radhakrishnan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).