From patchwork Tue Dec 3 13:45:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wilco Dijkstra X-Patchwork-Id: 1203709 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-515055-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="f586sWiU"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.b="tV3CYXcX"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.b="tV3CYXcX"; 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 47S3Cr64WQz9sRC for ; Wed, 4 Dec 2019 00:45:59 +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:content-type :content-transfer-encoding:mime-version; q=dns; s=default; b=MoC PmRhVaDzTRnAGBTDUXtRKwtWbkDh2U+ovvnT9KX2r1Vx5dWACHazLW9DtxgAoLB2 sz7qNO8VAJ+ML0XJzR8uzAVgi9AG3LlPxrWAmTKSVNfX75CODXFm9R8vPGZ7MOmo hr1EuzqNPNtjXVUaqGGGnd0adqPeyQ5qFp2xH/PY= 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=siIlTMwq9 aSDS43Y8tR76l9owns=; b=f586sWiUrguATkFZx9B/SqFHyqvAVmFDuEXUpC2do G2kEb0kdhWYKRcJQ6QXoZARXLYwroQ8De87Wfr+iHToOERlj3YxRVlDbasoGEqrv IueAMMjsbH6cUb1sT7VFp5Dic5wUQGr5l/DjOmmQ41Wq2BTLMdKSHNmzl1N0gY6M e8= Received: (qmail 43141 invoked by alias); 3 Dec 2019 13:45:51 -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 43123 invoked by uid 89); 3 Dec 2019 13:45:49 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 spammy=0.4, 04 X-HELO: EUR04-HE1-obe.outbound.protection.outlook.com Received: from mail-eopbgr70053.outbound.protection.outlook.com (HELO EUR04-HE1-obe.outbound.protection.outlook.com) (40.107.7.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 03 Dec 2019 13:45:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FShMi5OWkWILdDCNzFhnFPO760L5nXmVae3Jo74h6T8=; b=tV3CYXcXbVP8ttR7xLtqV8TJvcaJzk/nYSpc0f4+EcT8VmZMFhquAFmUQniGegnXFRIW1LZ3OxHxBok9bBwXRD1whmlxLQ+gaFSKtaYo7kTFX50B2gqQDe/fMrSR7StSvKOFZluBrZK5sc6CvAzPRTAatyQzxOLa/j84IpA7RvQ= Received: from VI1PR0802CA0010.eurprd08.prod.outlook.com (2603:10a6:800:aa::20) by DB6PR0802MB2214.eurprd08.prod.outlook.com (2603:10a6:4:82::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.20; Tue, 3 Dec 2019 13:45:44 +0000 Received: from DB5EUR03FT029.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::201) by VI1PR0802CA0010.outlook.office365.com (2603:10a6:800:aa::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.20 via Frontend Transport; Tue, 3 Dec 2019 13:45:43 +0000 Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; gcc.gnu.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; gcc.gnu.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT029.mail.protection.outlook.com (10.152.20.131) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.18 via Frontend Transport; Tue, 3 Dec 2019 13:45:43 +0000 Received: ("Tessian outbound d55de055a19b:v37"); Tue, 03 Dec 2019 13:45:43 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 07782371307385d3 X-CR-MTA-TID: 64aa7808 Received: from 42b90f6350c9.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id AD9FE91B-A14E-4369-8CBA-12BC46FCAFC8.1; Tue, 03 Dec 2019 13:45:37 +0000 Received: from EUR03-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 42b90f6350c9.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 03 Dec 2019 13:45:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aYYGiLLRZFjbwAhWWNyI8+nIed1qAHjSpwfgbKe0sVD61O74mztxQE22DfGM83tqw2R5KQ7l6DbtrdR4p6s5T9nLsQRDcNaWbCG9+F0jVd+KCLKrYYi6qzaQtAI8oaF6bfuRdQgJQl1Hc9df+R4JRaoWYoYt6iZcYKTnJfHGRz1rFT8NNLyfgFbG0JgTMKsQyUsprWLYQfdnYmIb8/yuPmWMc788CzlBRrliM0PRGgh09oQmRBJGDKANwodfmGfAlmmiVHVoeOk8YK7m1xZslF7dZ+zjIpxM9Kl8d9/zAU9l51/ReBDqDCEKX7P8aLXWjvmagTII/T3cgvWJZvApjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FShMi5OWkWILdDCNzFhnFPO760L5nXmVae3Jo74h6T8=; b=awwvEl3TQmy3r+8Ih/mr+fp43IrPMDtLFhl5YCk6IkXJFgrBJ2VMR7vNY4AgXGU9a6/MIiP+b0gLOHic6k+dJTMYYD5FwOA2BouIHgqeIuBdEpq2X4gepVFqALCyN8muuiuMCyAUe0fE7HYYXlLp9aEkWMTNyoICeEb1fL3ZU655rlohei8wuF1pjPb/nDRbn149uvWH+cvCim/dyKQsycJmTv/JpvVIgdTsfeBy6NNdBHEUGKbHjvocf9nZ89yeUWdcxvInIGAXj7gJcUZWS+IWN5/eJZznC3zn5mhEQUCbLGGh3x8wBL5QB5fSecTkpV+Bg6Bmj0iPwsfuTeI+hw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FShMi5OWkWILdDCNzFhnFPO760L5nXmVae3Jo74h6T8=; b=tV3CYXcXbVP8ttR7xLtqV8TJvcaJzk/nYSpc0f4+EcT8VmZMFhquAFmUQniGegnXFRIW1LZ3OxHxBok9bBwXRD1whmlxLQ+gaFSKtaYo7kTFX50B2gqQDe/fMrSR7StSvKOFZluBrZK5sc6CvAzPRTAatyQzxOLa/j84IpA7RvQ= Received: from VI1PR0801MB2127.eurprd08.prod.outlook.com (10.168.62.22) by VI1PR0801MB1680.eurprd08.prod.outlook.com (10.168.67.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.18; Tue, 3 Dec 2019 13:45:36 +0000 Received: from VI1PR0801MB2127.eurprd08.prod.outlook.com ([fe80::2077:6fd9:244d:8d16]) by VI1PR0801MB2127.eurprd08.prod.outlook.com ([fe80::2077:6fd9:244d:8d16%6]) with mapi id 15.20.2495.014; Tue, 3 Dec 2019 13:45:36 +0000 From: Wilco Dijkstra To: GCC Patches , Kyrylo Tkachov CC: Richard Earnshaw , Richard Sandiford Subject: [PATCH v2 2/2][ARM] Improve max_cond_insns setting for Cortex cores Date: Tue, 3 Dec 2019 13:45:36 +0000 Message-ID: Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Wilco.Dijkstra@arm.com; x-ms-exchange-transport-forked: True x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:751;OLM:751; X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(376002)(39860400002)(136003)(396003)(346002)(366004)(54534003)(189003)(199004)(186003)(86362001)(478600001)(6116002)(7736002)(966005)(3846002)(6636002)(4326008)(2906002)(81156014)(102836004)(14444005)(256004)(99286004)(6506007)(8676002)(26005)(8936002)(81166006)(7696005)(33656002)(76116006)(66476007)(66556008)(64756008)(9686003)(6306002)(316002)(66946007)(5660300002)(55016002)(74316002)(71190400001)(6436002)(71200400001)(110136005)(25786009)(52536014)(305945005)(14454004)(54906003)(66446008); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0801MB1680; H:VI1PR0801MB2127.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: q/THw1xi+cs0XncEE0g7tzf6LeQ1IuUy3Y0vArV/lUWiIT9OAVFzIr/zETnxifr3PZtatPS0yoyoGYoWaSnEsy2dsBxgJwh93UknRnD90j7hAXT3e8WYEt46A7UhRLmJjm+I84yuqRSkLwQPCzAGo31SDYKntmSQH8IGeAJ9mvrM0en9dFc7vlQEoZ3FmXikEEed+zEIGrnFFeG1zmjEbMm4hFkLsPOqEnL9lcq8NCP4URPq7JeIdi2VZ15dVlbP3QDS1EbgfOt3s3KsdLI+UirhRmBYRei8Vsgl2zbk/l+ePBo3fZ0y7zeGofkARKYI3ZfwQyM7jCZtOGt0Cez6BL/SvKdAFCglOqiUV2im99RylxcjrgAYlYDik4RBm4jrAwTkQ70ptYGcDb9L8seab/i2Y5yMxgwXC7BxcsjK6rw+m2UnR95dzUi1qLuzPOsF9gMqOSRtjQtodipFLJ6lG99RDF/4x7hjVUCFG80DtjQRgWjS15BPWFFjeOgFvYKH/DUHijDpbnm69TpXFNHyxsIuYK4qEqYu9n28fvXk4wc= MIME-Version: 1.0 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Wilco.Dijkstra@arm.com; X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT029.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: af52cbd1-2a95-4595-0c67-08d777f71377 Hi, Part 2, split off from https://gcc.gnu.org/ml/gcc-patches/2019-11/msg00399.html To enable cores to use the correct max_cond_insns setting, use the core-specific tuning when a CPU/tune is selected unless -mrestrict-it is explicitly set. On Cortex-A57 this gives 1.1% performance gain on SPECINT2006 as well as a 0.4% codesize reduction. Bootstrapped on armhf. OK for commit? ChangeLog: 2019-12-03 Wilco Dijkstra * config/arm/arm.c (arm_option_override_internal): Use max_cond_insns from CPU tuning unless -mrestrict-it is used. diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index daebe76352d62ad94556762b4e3bc3d0532ad411..5ed9046988996e56f754c5588e4d25d5ecdd6b03 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -3041,6 +3041,11 @@ arm_option_override_internal (struct gcc_options *opts, if (!TARGET_THUMB2_P (opts->x_target_flags) || !arm_arch_notm) opts->x_arm_restrict_it = 0; + /* Use the IT size from CPU specific tuning unless -mrestrict-it is used. */ + if (!opts_set->x_arm_restrict_it + && (opts_set->x_arm_cpu_string || opts_set->x_arm_tune_string)) + opts->x_arm_restrict_it = 0; + /* Enable -munaligned-access by default for - all ARMv6 architecture-based processors when compiling for a 32-bit ISA i.e. Thumb2 and ARM state only.