This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][GCC][AArch64] Dot Product commandline options [Patch (4/8)]
- From: James Greenhalgh <james dot greenhalgh at arm dot com>
- To: Tamar Christina <tamar dot christina at arm dot com>
- Cc: <gcc-patches at gcc dot gnu dot org>, <nd at arm dot com>, <Richard dot Earnshaw at arm dot com>, <Marcus dot Shawcroft at arm dot com>
- Date: Mon, 4 Sep 2017 11:47:03 +0100
- Subject: Re: [PATCH][GCC][AArch64] Dot Product commandline options [Patch (4/8)]
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=pass (sender IP is 217.140.96.140) smtp.mailfrom=arm.com; gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=bestguesspass action=none header.from=arm.com;
- Nodisclaimer: True
- References: <20170901132057.GA32053@arm.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On Fri, Sep 01, 2017 at 02:20:59PM +0100, Tamar Christina wrote:
> Hi All,
>
> This patch adds support for the +dotprod extension to AArch64.
> Dot Product requires Adv.SIMD to work and so enables this option
> by default when enabled.
>
> It is available from ARMv8.2-a and onwards and is enabled by
> default on Cortex-A55 and Cortex-A75.
>
> Regtested and bootstrapped on aarch64-none-elf and no issues.
>
> Ok for trunk?
Just a couple of rewordings needed, and then OK.
> gcc/
> 2017-09-01 Tamar Christina <tamar.christina@arm.com>
>
> * config/aarch64/aarch64.h (AARCH64_FL_DOTPROD): New.
> (AARCH64_ISA_DOTPROD, TARGET_DOTPROD): New.
> * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Add TARGET_DOTPROD.
> * config/aarch64/aarch64-option-extensions.def (dotprod): New.
> * config/aarch64/aarch64-cores.def (cortex-a55, cortex-a75): Enable TARGET_DOTPROD.
> (cortex-a75.cortex-a55): Likewise.
> * doc/invoke.texi (aarch64-feature-modifiers): Document dotprod.
>
> --
> --- a/gcc/config/aarch64/aarch64.h
> +++ b/gcc/config/aarch64/aarch64.h
> @@ -151,7 +151,8 @@ extern unsigned aarch64_architecture_version;
> #define AARCH64_FL_F16 (1 << 9) /* Has ARMv8.2-A FP16 extensions. */
> /* ARMv8.3-A architecture extensions. */
> #define AARCH64_FL_V8_3 (1 << 10) /* Has ARMv8.3-A features. */
> -#define AARCH64_FL_RCPC (1 << 11) /* Has support for RCpc model. */
> +#define AARCH64_FL_RCPC (1 << 11) /* Has support for RCpc model. */
> +#define AARCH64_FL_DOTPROD (1 << 12) /* Has dot product. */
Are these correctly formatted with the line above? "Has dot product" is not
very decsriptive.
> /* ARMv8.3-A features. */
> #define TARGET_ARMV8_3 (AARCH64_ISA_V8_3)
>
> diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
> index 4cb5836a9da22681d192c3750fc8e5a50024ac10..61fbc087f4974c0eb833c2daa131a2f7269d1b84 100644
> --- a/gcc/doc/invoke.texi
> +++ b/gcc/doc/invoke.texi
> @@ -14271,6 +14271,9 @@ Enable FP16 extension. This also enables floating-point instructions.
> Enable the RcPc extension. This does not change code generation from GCC,
> but is passed on to the assembler, enabling inline asm statements to use
> instructions from the RcPc extension.
> +@item dotprod
> +Enable the Dot Product extension. This also enables Advanced SIMD instructions
> +and allows auto vectorization of dot products to the Dot Product instructions.
I'd drop the text from "and allows" onwards, it isn't very useful for
figuring out exactly what idioms will be supported, and we don't use that
text on other extensions.
Thanks,
James