This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][AArch64] Enable AES fusion with -mcpu=generic
- From: Andrew Pinski <apinski at cavium dot com>
- To: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Evandro Menezes <e dot menezes at samsung dot com>, "Andrew dot pinski at cavium dot com" <Andrew dot pinski at cavium dot com>, "jim dot wilson at linaro dot org" <jim dot wilson at linaro dot org>, nd <nd at arm dot com>
- Date: Thu, 16 Mar 2017 11:01:46 -0700
- Subject: Re: [PATCH][AArch64] Enable AES fusion with -mcpu=generic
- Authentication-results: sourceware.org; auth=none
- Authentication-results: gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=none action=none header.from=cavium.com;
- References: <VI1PR0802MB262138504A5473B8286763C783210@VI1PR0802MB2621.eurprd08.prod.outlook.com> <AM5PR0802MB2610174A4992D4C2809BB5C283260@AM5PR0802MB2610.eurprd08.prod.outlook.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On Thu, Mar 16, 2017 at 10:22 AM, Wilco Dijkstra <Wilco.Dijkstra@arm.com> wrote:
> Many supported cores implement fusion of AES instructions. When fusion
> happens it can give a significant performance gain. If not, scheduling
> fusion candidates next to each other has almost no effect on performance.
> Due to the high benefit/low cost it makes sense to enable AES fusion with
> -mcpu=generic so that cores that support it always benefit. Any objections?
I am ok with this due to our new cores support this and there was no
performance lost for ThunderX1.
Thanks,
Andrew
>
> Bootstrapped on AArch64, no regressions.
>
> ChangeLog:
> 2017-03-16 Wilco Dijkstra <wdijkstr@arm.com>
>
> * gcc/config/aarch64/aarch64.c (generic_tunings): Add AES fusion.
>
> --
> diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
> index 728ce7029f1e2b5161d9f317d10e564dd5a5f472..c8cf7169a5d387de336920b50c83761dc0c96f3a 100644
> --- a/gcc/config/aarch64/aarch64.c
> +++ b/gcc/config/aarch64/aarch64.c
> @@ -536,7 +536,7 @@ static const struct tune_params generic_tunings =
> &generic_approx_modes,
> 4, /* memmov_cost */
> 2, /* issue_rate */
> - AARCH64_FUSE_NOTHING, /* fusible_ops */
> + (AARCH64_FUSE_AES_AESMC), /* fusible_ops */
> 8, /* function_align. */
> 8, /* jump_align. */
> 4, /* loop_align. */