Re: [PATCH][AArch64] Use aarch64_fusion_enabled_p to check for insn fusion capabilities

2016-05-31 Thread James Greenhalgh
On Fri, May 27, 2016 at 06:10:42PM -0500, Evandro Menezes wrote:
> On 05/27/16 11:59, Kyrill Tkachov wrote:
> >Hi all,
> >
> >This patch is a small cleanup that uses the newly introduced
> >aarch64_fusion_enabled_p predicate
> >to check for what fusion opportunities are enabled for the current
> >target.
> >
> >Tested on aarch64-none-elf.
> >
> >Ok for trunk?
> >
> >Thanks,
> >Kyrill
> >
> >2016-05-27  Kyrylo Tkachov  
> >
> >* config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Use
> >aarch64_fusion_enabled_p to check for fusion capabilities.
> 
> LGTM

And me.

OK.

Thanks,
James



Re: [PATCH][AArch64] Use aarch64_fusion_enabled_p to check for insn fusion capabilities

2016-05-27 Thread Evandro Menezes

On 05/27/16 11:59, Kyrill Tkachov wrote:

Hi all,

This patch is a small cleanup that uses the newly introduced 
aarch64_fusion_enabled_p predicate
to check for what fusion opportunities are enabled for the current 
target.


Tested on aarch64-none-elf.

Ok for trunk?

Thanks,
Kyrill

2016-05-27  Kyrylo Tkachov  

* config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Use
aarch64_fusion_enabled_p to check for fusion capabilities.


LGTM

--
Evandro Menezes



[PATCH][AArch64] Use aarch64_fusion_enabled_p to check for insn fusion capabilities

2016-05-27 Thread Kyrill Tkachov

Hi all,

This patch is a small cleanup that uses the newly introduced 
aarch64_fusion_enabled_p predicate
to check for what fusion opportunities are enabled for the current target.

Tested on aarch64-none-elf.

Ok for trunk?

Thanks,
Kyrill

2016-05-27  Kyrylo Tkachov  

* config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Use
aarch64_fusion_enabled_p to check for fusion capabilities.
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 49cd50b61cf4ba8074a44ae4029316a8af2f793b..8f850c653167d108f899ae9ec5d65938a288aa17 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -13070,8 +13070,7 @@ aarch_macro_fusion_pair_p (rtx_insn *prev, rtx_insn *curr)
   if (!aarch64_macro_fusion_p ())
 return false;
 
-  if (simple_sets_p
-  && (aarch64_tune_params.fusible_ops & AARCH64_FUSE_MOV_MOVK))
+  if (simple_sets_p && aarch64_fusion_enabled_p (AARCH64_FUSE_MOV_MOVK))
 {
   /* We are trying to match:
  prev (mov)  == (set (reg r0) (const_int imm16))
@@ -13095,8 +13094,7 @@ aarch_macro_fusion_pair_p (rtx_insn *prev, rtx_insn *curr)
 }
 }
 
-  if (simple_sets_p
-  && (aarch64_tune_params.fusible_ops & AARCH64_FUSE_ADRP_ADD))
+  if (simple_sets_p && aarch64_fusion_enabled_p (AARCH64_FUSE_ADRP_ADD))
 {
 
   /*  We're trying to match:
@@ -13121,8 +13119,7 @@ aarch_macro_fusion_pair_p (rtx_insn *prev, rtx_insn *curr)
 }
 }
 
-  if (simple_sets_p
-  && (aarch64_tune_params.fusible_ops & AARCH64_FUSE_MOVK_MOVK))
+  if (simple_sets_p && aarch64_fusion_enabled_p (AARCH64_FUSE_MOVK_MOVK))
 {
 
   /* We're trying to match:
@@ -13150,8 +13147,7 @@ aarch_macro_fusion_pair_p (rtx_insn *prev, rtx_insn *curr)
 return true;
 
 }
-  if (simple_sets_p
-  && (aarch64_tune_params.fusible_ops & AARCH64_FUSE_ADRP_LDR))
+  if (simple_sets_p && aarch64_fusion_enabled_p (AARCH64_FUSE_ADRP_LDR))
 {
   /* We're trying to match:
   prev (adrp) == (set (reg r0)
@@ -13182,11 +13178,11 @@ aarch_macro_fusion_pair_p (rtx_insn *prev, rtx_insn *curr)
 }
 }
 
-  if ((aarch64_tune_params.fusible_ops & AARCH64_FUSE_AES_AESMC)
+  if (aarch64_fusion_enabled_p (AARCH64_FUSE_AES_AESMC)
&& aarch_crypto_can_dual_issue (prev, curr))
 return true;
 
-  if ((aarch64_tune_params.fusible_ops & AARCH64_FUSE_CMP_BRANCH)
+  if (aarch64_fusion_enabled_p (AARCH64_FUSE_CMP_BRANCH)
   && any_condjump_p (curr))
 {
   enum attr_type prev_type = get_attr_type (prev);