From patchwork Fri Nov 9 14:13:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Wilco Dijkstra X-Patchwork-Id: 995559 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-489519-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="I7Xm4ZMV"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.b="RtYprM28"; dkim-atps=neutral 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 42s2FG2N1yz9sCm for ; Sat, 10 Nov 2018 01:13:36 +1100 (AEDT) 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=FUeIMCtnJh+FbXBImAPv349QDpL/L3ydwoK+Drbo7bymcgYpkd+Td ad/9v98hdtvqLTIOkRjkbr7Hqngd8k4OayUAnaFV6Ub7o1hcaMNC2Jv5AZ2raGHC DMexb8TvAbN9yve55ma/IQaI0NnE+1dpsbkM/+fmc1PB9BrdcvCNg0= 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=rEhdi4KNKaP6MULmHtajdh2WqZ4=; b=I7Xm4ZMV9Agw4ZPPNJ0Kfpponsdo UpE2PQyj3n7L9kjHa2AhxD0swd6MHxVqzSzQdmOOnebHAr9I8B0Hr/A/QCS72N9D g86FOgW38WupvgQtZ2GNmN83DZ7W154zRmpBPcsp8Qe6/lBioBFpbG1XJNhP9ro4 ofkejpXjZ6dHQF0= Received: (qmail 24053 invoked by alias); 9 Nov 2018 14:13:29 -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 24040 invoked by uid 89); 9 Nov 2018 14:13:29 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=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= X-HELO: EUR02-AM5-obe.outbound.protection.outlook.com Received: from mail-eopbgr00067.outbound.protection.outlook.com (HELO EUR02-AM5-obe.outbound.protection.outlook.com) (40.107.0.67) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 09 Nov 2018 14:13:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7WTEfYdUfBwP3EUMNjip4Z0WFce73/nUR3TZalLuX74=; b=RtYprM28nFPbWdaTEYbDIbym3Ge5V/4Qzg1XPK7YCYx+vXYTvnu4687BF1G5YWqPywbO2yQz2L/7V1s9aa+qmEmk91swD75IuSzr2JFhq4AlYmO50Ga1gzEkDmHyj49ROE2/lS68KznJnchhW6scg+bDQverNuqQ/hBIAGaayqA= Received: from DB5PR08MB1030.eurprd08.prod.outlook.com (10.166.14.15) by DB5PR08MB0919.eurprd08.prod.outlook.com (10.166.13.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.29; Fri, 9 Nov 2018 14:13:24 +0000 Received: from DB5PR08MB1030.eurprd08.prod.outlook.com ([fe80::f5c9:8ef6:9b28:8caa]) by DB5PR08MB1030.eurprd08.prod.outlook.com ([fe80::f5c9:8ef6:9b28:8caa%2]) with mapi id 15.20.1294.034; Fri, 9 Nov 2018 14:13:24 +0000 From: Wilco Dijkstra To: GCC Patches CC: nd , Kyrylo Tkachov Subject: [PATCH][ARM] Update max_cond_insns settings Date: Fri, 9 Nov 2018 14:13:24 +0000 Message-ID: References: In-Reply-To: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Wilco.Dijkstra@arm.com; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) MIME-Version: 1.0 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,