Message ID | AM5PR0802MB2610099277743B6FD1E05137839A0@AM5PR0802MB2610.eurprd08.prod.outlook.com |
---|---|
State | New |
Headers | show
Return-Path: <gcc-patches-return-444429-incoming=patchwork.ozlabs.org@gcc.gnu.org> 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 3tf2NQ5LkPz9t0v for <incoming@patchwork.ozlabs.org>; Thu, 15 Dec 2016 03:39:34 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="xjxt2o5g"; 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=k0oyk6Y1gENRYmcjDP6sj1KU3FtC0K50P+82pywKd4lm+h5t4yjmg +qDQ9IfXfhzsX+UdEuNSYDoQlYVv9hqYqXOqqJD8r9PbG994q1Jm6B3oDEZFTEBW Yp9w993yYS+LwcxF5BRXM12NpOAmCVSddk8/kbV87kDBuoeKD58O6A= 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=yV1MyBT/DY6+rmvlBH1f1hRTTfM=; b=xjxt2o5gKVVfRDsQe1jgcHgd+6xH PGMBBvVYny1Ce9AV7FKXBAthlqsnbjfAWXbBEJFnqJWBAWjTpS3LEL4qz7aS1iEJ sw6Ilgq5RZFHxhaW9VCApN9SKy/x1rTRXX3pxyMNpTmGUFHl6OB5S18SaCEhPDzn OMVx4U8uJU56vdI= Received: (qmail 21038 invoked by alias); 14 Dec 2016 16:39:21 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: <gcc-patches.gcc.gnu.org> List-Unsubscribe: <mailto:gcc-patches-unsubscribe-incoming=patchwork.ozlabs.org@gcc.gnu.org> List-Archive: <http://gcc.gnu.org/ml/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-help@gcc.gnu.org> Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 21028 invoked by uid 89); 14 Dec 2016 16:39:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1246, HAccept-Language:en-GB, Sent X-HELO: EUR03-AM5-obe.outbound.protection.outlook.com Received: from mail-eopbgr30057.outbound.protection.outlook.com (HELO EUR03-AM5-obe.outbound.protection.outlook.com) (40.107.3.57) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 14 Dec 2016 16:39:11 +0000 Received: from AM5PR0802MB2610.eurprd08.prod.outlook.com (10.175.46.18) by HE1PR0802MB2346.eurprd08.prod.outlook.com (10.172.129.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.771.8; Wed, 14 Dec 2016 16:39:08 +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.0771.014; Wed, 14 Dec 2016 16:39:08 +0000 From: Wilco Dijkstra <Wilco.Dijkstra@arm.com> To: GCC Patches <gcc-patches@gcc.gnu.org>, Kyrylo Tkachov <Kyrylo.Tkachov@arm.com> CC: nd <nd@arm.com> Subject: Re: [PATCH][ARM] Improve Thumb allocation order Date: Wed, 14 Dec 2016 16:39:08 +0000 Message-ID: <AM5PR0802MB2610099277743B6FD1E05137839A0@AM5PR0802MB2610.eurprd08.prod.outlook.com> References: <AM5PR0802MB26107976253CFD7B3C44C562838C0@AM5PR0802MB2610.eurprd08.prod.outlook.com>, <VI1PR0802MB26210D2519AE496230E4FCDA83820@VI1PR0802MB2621.eurprd08.prod.outlook.com> In-Reply-To: <VI1PR0802MB26210D2519AE496230E4FCDA83820@VI1PR0802MB2621.eurprd08.prod.outlook.com> authentication-results: spf=none (sender IP is ) smtp.mailfrom=Wilco.Dijkstra@arm.com; x-ms-office365-filtering-correlation-id: ab1aae0d-44d7-4c7e-857e-08d4243fb9b3 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:HE1PR0802MB2346; x-microsoft-exchange-diagnostics: 1; HE1PR0802MB2346; 7:Ltu1TNVukyQOu9ybn+3OuvtCl5f6S3w72MTjY4ltvWhVYPl0VgEZR8vDXi8SEuZHJLvyk5Sovr3S5edEC2DDS+MxL/FZ0xTUvCXrA/0Diy5xq4UZ4X6hE1l5oZsd6QqaMzaeHIugKMevysDZw/W72vR4N2b7rD7rA9nKw0BY9ZIrg/RSxiY6aLEnO7896SOhabBzbP5u/Y1bzRUckSe2bbUlCrH86MRpJFpSQEQqgVesMeUSztZiVTaSRb2hA7hJccRg+XDMfxX7tpuQ4EowPZKSi1ujM31R+0m3aW3K+C0YO2FBleu4KwjE8qqbdzscvr1lg1YR5pUftScKwsphF9LV2rWQBA78tXa740dSQrSkOSpWJh7S+RveYWFoWbP0RnjJQbgh7mJX8+/WoqTgDDJms2jUGLgLqbHFTNuW0MpveswMAhOz554AdzcBBGBGWDrKOE6bI4nDT5hWfnyc8g== nodisclaimer: True x-microsoft-antispam-prvs: <HE1PR0802MB2346E6969744663125580CE9839A0@HE1PR0802MB2346.eurprd08.prod.outlook.com> x-exchange-antispam-report-test: UriScan:(180628864354917); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026)(6041248)(20161123555025)(20161123560025)(20161123562025)(20161123564025)(6072148); SRVR:HE1PR0802MB2346; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0802MB2346; x-forefront-prvs: 01565FED4C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(7916002)(39850400002)(39410400002)(39860400002)(39450400003)(39840400002)(199003)(377424004)(54534003)(189002)(4326007)(50986999)(122556002)(6506006)(86362001)(102836003)(7696004)(9686002)(8936002)(6116002)(92566002)(8676002)(189998001)(81156014)(7736002)(3846002)(450100001)(68736007)(5660300001)(38730400001)(2950100002)(229853002)(6636002)(77096006)(97736004)(6436002)(3280700002)(3660700001)(66066001)(4001150100001)(33656002)(101416001)(5001770100001)(3900700001)(305945005)(76576001)(81166006)(2900100001)(2906002)(54356999)(106116001)(105586002)(74316002)(106356001)(76176999); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0802MB2346; H:AM5PR0802MB2610.eurprd08.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Dec 2016 16:39:08.1811 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0802MB2346 |
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 43c78f6148a5306fb0079ee2eba12f3763652bcc..29dcefd23762ba861b458b8860eb4b4856a9cb02 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -26455,7 +26455,7 @@ arm_mangle_type (const_tree type) static const int thumb_core_reg_alloc_order[] = { 3, 2, 1, 0, 4, 5, 6, 7, - 14, 12, 8, 9, 10, 11 + 12, 14, 8, 9, 10, 11 }; /* Adjust register allocation order when compiling for Thumb. */
ping From: Wilco Dijkstra Sent: 30 November 2016 17:32 To: GCC Patches Cc: nd Subject: [PATCH][ARM] Improve Thumb allocation order Thumb uses a special register allocation order to increase the use of low registers. Oddly enough, LR appears before R12, which means that LR must be saved and restored even if R12 is available. Swapping R12 and LR means this simple example now uses R12 as a temporary (just like ARM): int f(long long a, long long b) { if (a < b) return 1; return a + b; } cmp r0, r2 sbcs ip, r1, r3 ite ge addge r0, r0, r2 movlt r0, #1 bx lr Bootstrap OK. CSibe benchmarks unchanged. ChangeLog: 2016-11-30 Wilco Dijkstra <wdijkstr@arm.com> * gcc/config/arm/arm.c (thumb_core_reg_alloc_order): Swap R12 and R14. --