From patchwork Thu Mar 16 17:22:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wilco Dijkstra X-Patchwork-Id: 739921 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 3vkZzd0Pr1z9ryr for ; Fri, 17 Mar 2017 04:22:36 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="AbyX8wcT"; 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=kah+mnA6vRfAhc0aioH/xcRZQUrttQLzKLdJcfoRhi2TKe9aWcdav F0fIt/m53h+vmlOnk5njk21e6a3fRu/7EQpsxJcMjcPVYIRurjTIRO9erlejeBSx sAz2gicBqWrZFJK7dHZFKL3uJWMfk0SICHTr/fOPjKZenzG8HZDDdA= 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=zGg37TyhpWQlAju1pg3K0+2OukM=; b=AbyX8wcTslfHOCcKbPFzdYb57RQC AYlVSqo7y9IKxEk5ExHwzEelJxhlYGu86pYRYpIwkvRnPChNwTGAMmdytHkyNDnB OfhuAu8pwjJNHsXNU1tcmcOh8vStje1cxNSql5agMONQYauPn6NdQIpjo1W4R1e/ Tw2dmABynC03ZwU= Received: (qmail 107584 invoked by alias); 16 Mar 2017 17:22:26 -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 107561 invoked by uid 89); 16 Mar 2017 17:22:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.5 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=HContent-Language:en-GB X-HELO: EUR02-HE1-obe.outbound.protection.outlook.com Received: from mail-eopbgr10062.outbound.protection.outlook.com (HELO EUR02-HE1-obe.outbound.protection.outlook.com) (40.107.1.62) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 16 Mar 2017 17:22:23 +0000 Received: from AM5PR0802MB2610.eurprd08.prod.outlook.com (10.175.46.18) by AM5PR0802MB2612.eurprd08.prod.outlook.com (10.175.46.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.961.17; Thu, 16 Mar 2017 17:22:18 +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.0961.018; Thu, 16 Mar 2017 17:22:19 +0000 From: Wilco Dijkstra To: GCC Patches , Evandro Menezes , "Andrew.pinski@cavium.com" , "jim.wilson@linaro.org" CC: nd Subject: [PATCH][AArch64] Enable AES fusion with -mcpu=generic Date: Thu, 16 Mar 2017 17:22:18 +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-ms-office365-filtering-correlation-id: 64bb62d9-fa4b-4dff-08e9-08d46c90ffe3 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254035)(48565401081); SRVR:AM5PR0802MB2612; x-microsoft-exchange-diagnostics: 1; AM5PR0802MB2612; 7:kjZkx+fyZ+w/68qcvazkaZreXJuhSpmUxYl3MFE7vvh5Pxvx8D48YbigTOHaKovOC9dULgsPx955mrSWBFw0gGmu7QUkvYsl7rWDLcWhdEG8cK9Wpem2XVxI5LraSg13xbk9pzjsgxXUCq9NGbCxJfQ589wYVbUiOlIoHZ+iqVhpbI0CzyXGYShcK/MnW3pzoSYVZOSsHeUMM9yaYvj7hIE5SUBSUMCbqoi+ACYk69uOurqUREYGy/V4uhi7g2rKVJEKge42DnWyQJLJBE2q0xycNAAyKScg2RtL57qQtNAOEh/GT2KdHz+rlVepaGAOidBX6GsP+BI/hiZ35II/uw== nodisclaimer: True x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(180628864354917); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123560025)(20161123564025)(20161123555025)(20161123558025)(20161123562025)(6072148); SRVR:AM5PR0802MB2612; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0802MB2612; x-forefront-prvs: 024847EE92 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(39450400003)(39860400002)(39410400002)(39850400002)(39840400002)(377424004)(54534003)(6506006)(9686003)(53936002)(575784001)(54356999)(4326008)(102836003)(3846002)(25786008)(77096006)(76176999)(2900100001)(8676002)(6116002)(55016002)(81166006)(2501003)(3660700001)(38730400002)(3280700002)(8936002)(99286003)(5660300001)(7696004)(2906002)(50986999)(66066001)(74316002)(2950100002)(33656002)(86362001)(305945005)(2201001)(189998001)(122556002)(6436002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0802MB2612; 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: 16 Mar 2017 17:22:18.6008 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2612 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. */