From patchwork Thu Apr 20 15:53:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Wilco Dijkstra X-Patchwork-Id: 752862 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3w83Lp0NHrz9s4s for ; Fri, 21 Apr 2017 01:53:36 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="CT/31o9F"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:references:in-reply-to :content-type:content-transfer-encoding:mime-version; q=dns; s= default; b=ZTuKbK/G0aClOPL4cUZ56VoFc+8K5DNLT1GZ8ckpp5D5DQrTqCadK EbTzlHhBuZz1IlJFN5+MjDcLM3vWPmFNAbeneVitlssT66x1BPZQrUYbZ1FKs9my hceL4z8iqMyB42wR1Bdf/MkbhuqV1qQwHEWgJf1NfEE5GWtdZlyvSM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:references:in-reply-to :content-type:content-transfer-encoding:mime-version; s=default; bh=WICr0tYxZ2HG9fAPx1gw0Vvxbks=; b=CT/31o9FpY++vesxgd+emdCYY6/d Afumlm67kg7VB4TlHK1HM18I74epyIkw9+xtmdQUUMpVhR6OTT1RyViIw1JAQjyz cKG2lTelvwlci24jSlEZEHse3DP8A6ZNwQ9AtMSchGiy7dk6KOCePRFm5GzeWgO3 ppJWe31fR9VWBW0= Received: (qmail 56059 invoked by alias); 20 Apr 2017 15:53:25 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 56031 invoked by uid 89); 20 Apr 2017 15:53:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy=fusion X-HELO: EUR01-HE1-obe.outbound.protection.outlook.com Received: from mail-he1eur01on0055.outbound.protection.outlook.com (HELO EUR01-HE1-obe.outbound.protection.outlook.com) (104.47.0.55) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 20 Apr 2017 15:53:22 +0000 Received: from AM5PR0802MB2610.eurprd08.prod.outlook.com (10.175.46.18) by DB6PR08MB2663.eurprd08.prod.outlook.com (10.175.234.159) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1047.13; Thu, 20 Apr 2017 15:53:20 +0000 Received: from AM5PR0802MB2610.eurprd08.prod.outlook.com ([10.175.46.18]) by AM5PR0802MB2610.eurprd08.prod.outlook.com ([10.175.46.18]) with mapi id 15.01.1047.013; Thu, 20 Apr 2017 15:53:20 +0000 From: Wilco Dijkstra To: GCC Patches , James Greenhalgh CC: nd , Evandro Menezes , "Andrew.pinski@cavium.com" , "jim.wilson@linaro.org" Subject: Re: [PATCH][AArch64] Enable AES fusion with -mcpu=generic Date: Thu, 20 Apr 2017 15:53:20 +0000 Message-ID: References: , In-Reply-To: authentication-results: arm.com; dkim=none (message not signed) header.d=none; arm.com; dmarc=none action=none header.from=arm.com; x-microsoft-exchange-diagnostics: 1; DB6PR08MB2663; 7:473Ez6jouGB8niDkSpL0tzbqGapLdmpRsIe5XEP8+TSbU/+BWKEVBhGZy/7oVz4WxjskjfbKQjS5WDS9x8LH3cxMZX3nm1pdROTU1rt6M3tUILV2tItJ+pYKBINwQilfJzEcRCoDx1WLOaWJ/6LPO8q/Hd82W5lkBhErii9RovImP63GQx3hnw7JE2kGe1lbnr1BqOdLm4JyTc1t+KVhfS80uwDchWmwCae0BvYshGDkw3zXjqUqXBNYDeM8bG7JbkpuUmEW9voNNK4fRGmGUtx3xk9VSPqqbF1XzMOJID7exsJs5ZFY/w41VmZs+94wgQoUIu7fgRQ+3+aaUC+DDw== x-ms-office365-filtering-correlation-id: 6786e32a-97d5-4f7a-9354-08d488055e30 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(48565401081)(201703131423075)(201703031133081); SRVR:DB6PR08MB2663; nodisclaimer: True x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(180628864354917); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(10201501046)(6055026)(6041248)(20161123564025)(20161123562025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(20161123555025)(6072148); SRVR:DB6PR08MB2663; BCL:0; PCL:0; RULEID:; SRVR:DB6PR08MB2663; x-forefront-prvs: 02830F0362 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(39860400002)(39840400002)(39450400003)(39850400002)(39410400002)(39400400002)(377424004)(305945005)(77096006)(5660300001)(575784001)(9686003)(74316002)(6506006)(2906002)(3280700002)(50986999)(33656002)(66066001)(55016002)(53936002)(3660700001)(7736002)(54906002)(76176999)(99286003)(54356999)(86362001)(189998001)(2900100001)(122556002)(6636002)(25786009)(81166006)(2950100002)(7696004)(229853002)(8676002)(53546009)(38730400002)(3846002)(6246003)(6116002)(102836003)(4326008)(8936002)(41533002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR08MB2663; H:AM5PR0802MB2610.eurprd08.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Apr 2017 15:53:20.0896 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR08MB2663 ping From: Wilco Dijkstra Sent: 16 March 2017 17:22 To: GCC Patches; Evandro Menezes; Andrew.pinski@cavium.com; jim.wilson@linaro.org Cc: nd Subject: [PATCH][AArch64] Enable AES fusion with -mcpu=generic   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? Bootstrapped on AArch64, no regressions. ChangeLog: 2017-03-16  Wilco Dijkstra          * 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.  */