public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][AArch64] Always register fma_steering pass but gate it on the target option instead
@ 2015-06-03 16:30 Kyrill Tkachov
  2015-06-04  8:27 ` Richard Earnshaw
  0 siblings, 1 reply; 2+ messages in thread
From: Kyrill Tkachov @ 2015-06-03 16:30 UTC (permalink / raw)
  To: GCC Patches; +Cc: Marcus Shawcroft, Richard Earnshaw, James Greenhalgh

[-- Attachment #1: Type: text/plain, Size: 742 bytes --]

Hi all,

This patch is part of a few prerequisites to get target attribute support in AArch64.
This registers the fma steering pass unconditionally but gates its execution instead.
This way the pass will be available if during the compilation of a file the user
specifies cortex-a57 tuning using a target attribute or pragma, or whatever.

Bootstrapped and tested on aarch64. Confirmed that the pass runs only when expected.

Ok for trunk?

Thanks,
Kyrill

2015-06-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

     * config/aarch64/aarch64.c (aarch64_override_options): Unconditionally
     register fma steering pass.
     * config/aarch64/cortex-a57-fma-steering.c (gate): Add gating on
     AARCH64_TUNE_FMA_STEERING.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: aarch64-register-fma-steering.patch --]
[-- Type: text/x-patch; name=aarch64-register-fma-steering.patch, Size: 1138 bytes --]

commit 58e5b728ae7f4cf4d00b732492b455bd6ca7feb6
Author: Kyrylo Tkachov <kyrylo.tkachov@arm.com>
Date:   Fri May 8 17:16:51 2015 +0100

    [AArch64] Always register fma_steering pass but gate it on the target option instead

diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 53aa4a8..1301e8b 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -7255,8 +7255,7 @@ aarch64_override_options (void)
 #endif
     }
 
-  if (AARCH64_TUNE_FMA_STEERING)
-    aarch64_register_fma_steering ();
+  aarch64_register_fma_steering ();
 
   aarch64_override_options_after_change ();
 }
diff --git a/gcc/config/aarch64/cortex-a57-fma-steering.c b/gcc/config/aarch64/cortex-a57-fma-steering.c
index 3d7557a..5228b57 100644
--- a/gcc/config/aarch64/cortex-a57-fma-steering.c
+++ b/gcc/config/aarch64/cortex-a57-fma-steering.c
@@ -1053,7 +1053,7 @@ public:
   /* opt_pass methods: */
   virtual bool gate (function *)
     {
-      return optimize >= 2;
+      return AARCH64_TUNE_FMA_STEERING && optimize >= 2;
     }
 
   virtual unsigned int execute (function *)

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

* Re: [PATCH][AArch64] Always register fma_steering pass but gate it on the target option instead
  2015-06-03 16:30 [PATCH][AArch64] Always register fma_steering pass but gate it on the target option instead Kyrill Tkachov
@ 2015-06-04  8:27 ` Richard Earnshaw
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Earnshaw @ 2015-06-04  8:27 UTC (permalink / raw)
  To: Kyrill Tkachov, GCC Patches; +Cc: Marcus Shawcroft, James Greenhalgh

On 03/06/15 17:03, Kyrill Tkachov wrote:
> Hi all,
> 
> This patch is part of a few prerequisites to get target attribute support in AArch64.
> This registers the fma steering pass unconditionally but gates its execution instead.
> This way the pass will be available if during the compilation of a file the user
> specifies cortex-a57 tuning using a target attribute or pragma, or whatever.
> 
> Bootstrapped and tested on aarch64. Confirmed that the pass runs only when expected.
> 
> Ok for trunk?
> 
> Thanks,
> Kyrill
> 
> 2015-06-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
> 
>      * config/aarch64/aarch64.c (aarch64_override_options): Unconditionally
>      register fma steering pass.
>      * config/aarch64/cortex-a57-fma-steering.c (gate): Add gating on
>      AARCH64_TUNE_FMA_STEERING.
> 
> 

OK.

R.

> aarch64-register-fma-steering.patch
> 
> 
> commit 58e5b728ae7f4cf4d00b732492b455bd6ca7feb6
> Author: Kyrylo Tkachov <kyrylo.tkachov@arm.com>
> Date:   Fri May 8 17:16:51 2015 +0100
> 
>     [AArch64] Always register fma_steering pass but gate it on the target option instead
> 
> diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
> index 53aa4a8..1301e8b 100644
> --- a/gcc/config/aarch64/aarch64.c
> +++ b/gcc/config/aarch64/aarch64.c
> @@ -7255,8 +7255,7 @@ aarch64_override_options (void)
>  #endif
>      }
>  
> -  if (AARCH64_TUNE_FMA_STEERING)
> -    aarch64_register_fma_steering ();
> +  aarch64_register_fma_steering ();
>  
>    aarch64_override_options_after_change ();
>  }
> diff --git a/gcc/config/aarch64/cortex-a57-fma-steering.c b/gcc/config/aarch64/cortex-a57-fma-steering.c
> index 3d7557a..5228b57 100644
> --- a/gcc/config/aarch64/cortex-a57-fma-steering.c
> +++ b/gcc/config/aarch64/cortex-a57-fma-steering.c
> @@ -1053,7 +1053,7 @@ public:
>    /* opt_pass methods: */
>    virtual bool gate (function *)
>      {
> -      return optimize >= 2;
> +      return AARCH64_TUNE_FMA_STEERING && optimize >= 2;
>      }
>  
>    virtual unsigned int execute (function *)
> 

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

end of thread, other threads:[~2015-06-04  8:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-03 16:30 [PATCH][AArch64] Always register fma_steering pass but gate it on the target option instead Kyrill Tkachov
2015-06-04  8:27 ` Richard Earnshaw

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).