From patchwork Thu Apr 20 15:39:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Wilco Dijkstra X-Patchwork-Id: 752849 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 3w832b1BM8z9s4s for ; Fri, 21 Apr 2017 01:39:34 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="Ixo26GnO"; 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=HgoD0xByVuaTk7QBUTavWywngTXVTscSzCxFRB5rB3bwcGjjKAw0x Goke1/0HPG5Xwwh/XudHeg5w3e3xajmLNsvQkXlU7ZZax25apZsFm/KRBDRQuWLs gESyLKw8LAZWqnUk6UriFZuYZXajtIPypc/No2DXZZIWxJG4V06Mw4= 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=wwHRkWgXz3hX3HH4Q1WShdqNwoo=; b=Ixo26GnO1iJW9+x1EbPPuX1H00tO BAseHVjOcmy/rEUQHuXT4CHgVQXbeYs78Ufl2z8HHGmlWIedWkjiWqmknD78d9os 6S/FHjYZ5J/lXRxF34BQmc+uvBsF3IO4AEQDsIK/eSr2/d86C6Sl6FDUpch3Py1u jRlJp6Zo3sUE5r0= Received: (qmail 44639 invoked by alias); 20 Apr 2017 15:39: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 44590 invoked by uid 89); 20 Apr 2017 15:39:24 -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=uniform X-HELO: EUR01-VE1-obe.outbound.protection.outlook.com Received: from mail-ve1eur01on0074.outbound.protection.outlook.com (HELO EUR01-VE1-obe.outbound.protection.outlook.com) (104.47.1.74) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 20 Apr 2017 15:39:23 +0000 Received: from AM5PR0802MB2610.eurprd08.prod.outlook.com (10.175.46.18) by AM4PR0802MB2337.eurprd08.prod.outlook.com (10.172.218.22) 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:39:21 +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:39:21 +0000 From: Wilco Dijkstra To: GCC Patches , Kyrylo Tkachov CC: nd Subject: Re: [PATCH][ARM] Update max_cond_insns settings Date: Thu, 20 Apr 2017 15:39:21 +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; AM4PR0802MB2337; 7:QDr8B+QuY+/msW8Csvz63Pbg0fjF3EhHbbhxhjNGAD+FmnWlGRyeelw9i4JPo954SClVFZUpYsSMHHXT4oWA96KMIZXVrtVgny6kQ02klZPBnDHZzBY9v11Fd6kySUVTbuW4P0WO3dpp7YXUYBq/acQyIjfrQZ3sMYwTbYbiYaCUmedXd8fE8dj7NYlvGgDaDbW/z2Yd1yqWTZhEL6ArQ0rq4va96Ey6lZsB/iWs5oHy2viFnjj6KgMAO/vu92277Emd+qiSCtWp3xnQm4eEq6B3yDiUgX/6TyXPEOEuyDlbM0ujbOwW12A847ul1esuo2yAROtHLqsjVv0hmDOkyg== x-ms-office365-filtering-correlation-id: 1462a66d-7c70-4e39-c0bd-08d488036a71 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(48565401081)(201703131423075)(201703031133081)(201702281549075); SRVR:AM4PR0802MB2337; 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)(93006095)(93001095)(3002001)(10201501046)(6055026)(6041248)(20161123562025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(20161123564025)(20161123555025)(6072148); SRVR:AM4PR0802MB2337; BCL:0; PCL:0; RULEID:; SRVR:AM4PR0802MB2337; x-forefront-prvs: 02830F0362 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(39410400002)(39850400002)(39450400003)(39400400002)(39860400002)(39840400002)(377424004)(3660700001)(33656002)(8936002)(3846002)(102836003)(6116002)(38730400002)(7696004)(3280700002)(50986999)(229853002)(5660300001)(66066001)(189998001)(9686003)(6636002)(4326008)(8676002)(74316002)(25786009)(81166006)(6246003)(99286003)(15650500001)(55016002)(305945005)(86362001)(2906002)(2900100001)(2950100002)(54356999)(7736002)(53546009)(122556002)(76176999)(53936002)(77096006)(6506006); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR0802MB2337; 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:39:21.7341 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR0802MB2337 ping From: Wilco Dijkstra Sent: 12 April 2017 14:02 To: GCC Patches Cc: nd; Kyrylo Tkachov Subject: [PATCH][ARM] Update max_cond_insns settings   The existing setting of max_cond_insns for most cores is non-optimal. Thumb-2 IT has a maximum limit of 4, so 5 means emitting 2 IT sequences. Also such long sequences of conditional instructions can increase the number of executed instructions significantly, so using 5 for max_cond_insns is non-optimal. Previous benchmarking showed that setting max_cond_insn to 2 was the best value for Cortex-A15 and Cortex-A57.  All ARMv8-A cores use 2 - apart from Cortex-A35 and Cortex-A53.  Given that using 5 is worse, set it to 2.  This also has the advantage of producing more uniform code. Bootstrap and regress OK on arm-none-linux-gnueabihf. OK for stage 1? ChangeLog: 2017-04-12  Wilco Dijkstra          * gcc/config/arm/arm.c (arm_cortex_a53_tune): Set max_cond_insns to 2.         (arm_cortex_a35_tune): Likewise. diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 29e8d1d07d918fbb2a627a653510dfc8587ee01a..1a6d552aa322114795acbb3667c6ea36963bf193 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -1967,7 +1967,7 @@ const struct tune_params arm_cortex_a35_tune =    arm_default_branch_cost,    &arm_default_vec_cost,    1,                                           /* Constant limit.  */ -  5,                                           /* Max cond insns.  */ +  2,                                           /* Max cond insns.  */    8,                                           /* Memset max inline.  */    1,                                           /* Issue rate.  */    ARM_PREFETCH_NOT_BENEFICIAL, @@ -1990,7 +1990,7 @@ const struct tune_params arm_cortex_a53_tune =    arm_default_branch_cost,    &arm_default_vec_cost,    1,                                           /* Constant limit.  */ -  5,                                           /* Max cond insns.  */ +  2,                                           /* Max cond insns.  */    8,                                           /* Memset max inline.  */    2,                                           /* Issue rate.  */    ARM_PREFETCH_NOT_BENEFICIAL,