From patchwork Wed Apr 5 12:38:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wilco Dijkstra X-Patchwork-Id: 747255 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 3vylkZ6Wd9z9s89 for ; Wed, 5 Apr 2017 22:38:26 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="BtTnv6la"; 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:content-type :content-transfer-encoding:mime-version; q=dns; s=default; b=tbd 58JJcJHI7aqrzdGjgMmAeb5VSpavtn3VzgCVssbDXJY7sa4Q4uxlMyVOCw4lHWME fJ7SBOzcWMmdI7aMqCYi9C07CZbFsKR3FisA6V6a+9/CmnDDZnpy6Qu9ttI5s9Jh pb5NuW3TcLVppohEdn+ugD3/CyjS+Tqi0Q6KLgPA= 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:content-type :content-transfer-encoding:mime-version; s=default; bh=quczB5X3A v/hoW5F3SmaV9jLJE4=; b=BtTnv6lagz0FqesEREhVwvApWkmm0GZIMnuuAUoMV 9mFtBQsQOt/e7jFyecwjp1W93DFtqeyY3Ui28lOztitNdURLy1hNUtHcQRW/0yRx wjNpCKnKFobBto/SNcWXBEF9/fNdH96b22Led+ouAlIUBfC/CoxQ8wrl9VGJNmkC MY= Received: (qmail 35526 invoked by alias); 5 Apr 2017 12:38:09 -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 33755 invoked by uid 89); 5 Apr 2017 12:38:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.6 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=Hx-languages-length:1222, adversely, streaming X-HELO: EUR01-DB5-obe.outbound.protection.outlook.com Received: from mail-db5eur01on0045.outbound.protection.outlook.com (HELO EUR01-DB5-obe.outbound.protection.outlook.com) (104.47.2.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 05 Apr 2017 12:38:05 +0000 Received: from AM5PR0802MB2610.eurprd08.prod.outlook.com (10.175.46.18) by HE1PR08MB2668.eurprd08.prod.outlook.com (10.170.248.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.10; Wed, 5 Apr 2017 12:38:03 +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.1019.014; Wed, 5 Apr 2017 12:38:03 +0000 From: Wilco Dijkstra To: GCC Patches CC: nd , James Greenhalgh , "Andrew.pinski@cavium.com" , Evandro Menezes , "jim.wilson@linaro.org" Subject: [PATCH][AArch64] Enable AUTOPREFETCHER_WEAK with -mcpu=generic Date: Wed, 5 Apr 2017 12:38:03 +0000 Message-ID: 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; HE1PR08MB2668; 7:FE27CYnl/CkCcqOItU3GcTFL0Vf/ORWOZJ0j8SnR35NTs1ouH1QT4DXGLVR/VTnhsGfnwGkzwH7tAccz6gvIzbSNP/8S4ISLvHOcr467ISZzerRUzrD4FTtxqi3ZuW4HtkGahCmAxZMw7ysWT0fLgV/JXx4w85BL2Vp7Iq1wQ5jmxPIv+nPEejbbuc87eYOu0ElVDmKH0RgPdDyV5DTYUy4uOJrUxjxbjHUAXLJQTXCLTpRKZ6e/q61pjjSgrwOspAnwSQ3ggJeA/7oPBCaJeiDJV93pNlzeCdnylsV5W4uflljqI5/ZbchZw9v03eYJORiyVn+q/vta6uHjkZp9bA== x-ms-office365-filtering-correlation-id: 280a9a0c-e7cb-4a92-d6d2-08d47c209a21 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(48565401081)(201703131423075)(201703031133081); SRVR:HE1PR08MB2668; 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)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(6055026)(6041248)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(20161123564025)(20161123555025)(20161123562025)(6072148); SRVR:HE1PR08MB2668; BCL:0; PCL:0; RULEID:; SRVR:HE1PR08MB2668; x-forefront-prvs: 0268246AE7 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(39850400002)(39860400002)(39840400002)(39400400002)(39450400003)(39410400002)(54534003)(377424004)(110136004)(81166006)(66066001)(77096006)(2900100001)(38730400002)(8676002)(9686003)(6306002)(6436002)(54906002)(99286003)(966004)(8936002)(55016002)(3280700002)(7696004)(6506006)(53936002)(102836003)(74316002)(50986999)(54356999)(6116002)(25786009)(305945005)(189998001)(33656002)(122556002)(3846002)(4326008)(3660700001)(7736002)(86362001)(6916009)(41533002); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR08MB2668; 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: 05 Apr 2017 12:38:03.1498 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR08MB2668 Many supported cores use the AUTOPREFETCHER_WEAK setting which tries to order loads and stores to improve streaming performance. Since significant gains were reported in http://patchwork.ozlabs.org/patch/534469/ it seems like a good idea to enable this setting too for -mcpu=generic. Since the weak model only keeps the order if it doesn't make the schedule worse, it should not impact performance adversely on cores that don't show a gain. Any objections? ChangeLog: 2017-04-05 Wilco Dijkstra * gcc/config/aarch64/aarch64.c (generic_tunings): Update prefetch model. diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 8b729b1b1f87316e940d7fc657f235a935ffa93e..b249ce2b310707c7ded2827d505ce2ddfcfbf976 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -547,7 +547,7 @@ static const struct tune_params generic_tunings = 2, /* min_div_recip_mul_df. */ 0, /* max_case_values. */ 0, /* cache_line_size. */ - tune_params::AUTOPREFETCHER_OFF, /* autoprefetcher_model. */ + tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */ (AARCH64_EXTRA_TUNE_NONE) /* tune_flags. */ };