Message ID | 20250131171232.1018281-33-aleksandar.rakic@htecgroup.com |
---|---|
State | New |
Headers |
Return-Path: <gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 483983858C66 for <patchwork@sourceware.org>; Fri, 31 Jan 2025 17:36:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 483983858C66 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=htecgroup.com header.i=@htecgroup.com header.a=rsa-sha256 header.s=selector1 header.b=UCcsrq8A X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR03-VI1-obe.outbound.protection.outlook.com (mail-vi1eur03on2070f.outbound.protection.outlook.com [IPv6:2a01:111:f403:260c::70f]) by sourceware.org (Postfix) with ESMTPS id DFA183858405 for <gcc-patches@gcc.gnu.org>; Fri, 31 Jan 2025 17:14:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DFA183858405 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=htecgroup.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=htecgroup.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DFA183858405 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:260c::70f ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1738343649; cv=pass; b=sKlLlM7kap99rUoOsxCe1sKEP8kY/zPzVDtCmH4Oq+k2PBFRedhGS7TnuqzpXTOw2W5LE+RdYa7IjOjgfo6qVDZ9FQFW4ijpfRcHoz6cDkLbLDeAZeemgjdI7/TG0CC7aRKli/X3jnTA/XDD36ubcNvDFhOdogkZCQfQap7zj44= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1738343649; c=relaxed/simple; bh=F2MjqMjGdCBm8t/gKSi7E4OmY5/lkOJ6J+fGRYjAR4k=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=SRjrS+6peGNKgs8smBkNOMrZdcPFl/QeocTfn5boSSQxjMnW2tO3EOhTFG240Y/c4raWj5xT8kKLkE+0cVOWY1NANQ9UmQ0BcVsMtZDoGeBHocZCy5sNyaBib6pBNOFzKw1A7coom2LfLECvPs7ShXEZMe+qrE5C34pJiwi/z7Q= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DFA183858405 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=IG+XA5UlkB1yIzB41HKHucT2hC4K/sjoYt8JiNZnxi/TXG5XLXiayK/VbSYuv5xkJ6F64pm8DlUgaa/0Qa7Xsq7L+7XLhqKg2RPv42xwbOF6y3xswLjWunp7fGK600S9kdbrks5KIOhIoK1ulrG/aOsEMhpT3CxGqHDhYRXtXwiWg9TZpF3TkL1qo034S+b4q+/CZtuLv5WCG6FH8Z/5ES1+Fe2rGOVMcqjj0VfrH6wdY9dnfJs34XeFbQLOqlJNErsNfpj0ZGoQyJcKuq9oskfk9GF9hKa6YYROdOxG1EnEk+z1uWFGpLedw46Ko8Ul1pHMyiZGkx83zZHvT6YxJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=JMqMnm2cazdNfkeVFQfR/tpY4B64Xvuke9LtjwXI8ZM=; b=gIVPpnAbuImYECYIehdAumbx/aQVHHH7TCLcGsfklHf1GaRDVdLAPE6UEmQq9+THi5x96m/lVbrrjkmrwL8P2gT5dhJVELuX8/jVGSJTxJrGO7YZeoN7U93hSuylSFf30K6A6u55kiSRbA1R0RXn9NHxaE2OUugrVUhWYRizsY41Nd3ZlYMiVuc7w9TOte8AUanE0zKluOOiir35nMATSz6nZox+ykV3yT/Muh64zZW8u1zjuuQ7NQpEWd2rI/WGTOGmChYvlT7SHSeE9+j3/n3Xp/kTFTNv1Rh+PLNzerVL5hbXJADbx86H3q0pUISx7ff334hUuQJOj4FbiOhV1w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=htecgroup.com; dmarc=pass action=none header.from=htecgroup.com; dkim=pass header.d=htecgroup.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=htecgroup.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JMqMnm2cazdNfkeVFQfR/tpY4B64Xvuke9LtjwXI8ZM=; b=UCcsrq8AZuxRJfwGVN89hYwnkqBWqgnwgWdjzk1eAscl1DFf/4PlwWrOO4dtW3SiNmI2q8NycBA4rsQXbsIC0CzreqwYpOfFXKkZcJjcjc+RiYjyfeB3j/6G9/tKX9SqZzW7dBFCRU9JE1uNCDKXTIba1QLrCOroUED1GxGy5UWR4xmQEImy8SAHkxVD/K1DcES/Ibp+dp0J5tV7GeKJxrAU5BA2pipXbBG87sIx9zms/j+Afbk5RhGzW8Lavfl7LEqDV67mmafD0CabWSe077rRw/krHS2CmfqFF1ovVHer8LumtyywKqHU4j5TEWc5nS1JqS41C5V/ucEyr31eyg== Received: from PA4PR09MB4864.eurprd09.prod.outlook.com (2603:10a6:102:ed::17) by AS2PR09MB6367.eurprd09.prod.outlook.com (2603:10a6:20b:59d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8398.21; Fri, 31 Jan 2025 17:14:05 +0000 Received: from PA4PR09MB4864.eurprd09.prod.outlook.com ([fe80::a02b:9d5c:eca5:e024]) by PA4PR09MB4864.eurprd09.prod.outlook.com ([fe80::a02b:9d5c:eca5:e024%6]) with mapi id 15.20.8398.020; Fri, 31 Jan 2025 17:14:05 +0000 From: Aleksandar Rakic <aleksandar.rakic@htecgroup.com> To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org> CC: Djordje Todorovic <Djordje.Todorovic@htecgroup.com>, "cfu@mips.com" <cfu@mips.com>, Robert Suchanek <robert.suchanek@imgtec.com>, Faraz Shahbazker <fshahbazker@wavecomp.com>, Aleksandar Rakic <aleksandar.rakic@htecgroup.com> Subject: [PATCH 31/61] Improve aligned straight line memcpy Thread-Topic: [PATCH 31/61] Improve aligned straight line memcpy Thread-Index: AQHbdAN2hEGncGs7/UOiXzzdSzytdA== Date: Fri, 31 Jan 2025 17:13:35 +0000 Message-ID: <20250131171232.1018281-33-aleksandar.rakic@htecgroup.com> References: <20250131171232.1018281-1-aleksandar.rakic@htecgroup.com> In-Reply-To: <20250131171232.1018281-1-aleksandar.rakic@htecgroup.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=htecgroup.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PA4PR09MB4864:EE_|AS2PR09MB6367:EE_ x-ms-office365-filtering-correlation-id: ebcacfb5-cf5e-4b60-1188-08dd421aaad5 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|376014|366016|1800799024|38070700018; x-microsoft-antispam-message-info: =?iso-8859-1?q?d0IlcTstEI/fnApPYD4GrmvBV7?= =?iso-8859-1?q?jAQqmFq9Q8LOsjRoSw+aQ3ZlCOVKfJ65kAsKuu5l5k65/N0bRkaZ7JncwK7n?= =?iso-8859-1?q?YV6uK71eQ6Be/DirC3cZlw0krjocobYd6QDImVKaEB9i8z2EqPOp0uDypDaE?= =?iso-8859-1?q?4CvyJXsiAB7Dutu0DM3EMIy9s00oUbK92/r18bc156BwxZOuX00m69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tjkxH2GauhetLJSTCYEQ4+wBEsZrAMkIIqWa9WptdpgiGudY9SBoQtw7Z?= =?iso-8859-1?q?zrRQYLUlmx575PHU9lZrZPJCq6JXb+QYB0LtZ6yvnd69hItZS78QPF874p0S?= =?iso-8859-1?q?10TG8x706cmCLul4LTri+keseb440gf2rDJvmzPWiplL6KrT00ReG4t0IgnK?= =?iso-8859-1?q?4sPXcD3+gD6meEIq0thQvxuo73mZHVWMJIrr2R2l7Yevrs5DkLRdhalyIePP?= =?iso-8859-1?q?BhLjqgvfQIII9TXCtjyVOySgUqZH+qbVeQdtBtDYNN0XRdsg8n0oOO4AoNhy?= =?iso-8859-1?q?lejHASWCNsnlubOzxIes7DByzE/1U5fiRA/Vh4ORV0k5g+WWKk60Nmhe08sK?= =?iso-8859-1?q?nU9bME7aXtMK/SNL6SzjNKwBSStnjfmKds3WrBxjYNT8XzIN3z9wEHEk+XVr?= =?iso-8859-1?q?7wdunX?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PA4PR09MB4864.eurprd09.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(366016)(1800799024)(38070700018); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?tkVsDf8uhalGipZ9VXG5Zk7?= =?iso-8859-1?q?bf09pG9kDy6p4nlsVBcz2B8cQdSDhUUuMEauhiQvU6+RlreQtMIgR1DfSxpX?= =?iso-8859-1?q?AidRUBjh9EWgaD6HMOSOtKz46OC5BDyCWRckmkiWbbvSdXV3MlffIuFy4sVU?= =?iso-8859-1?q?QhyTNB5RncsenMkmbmPkdWSsYmIw/sWtwezo6528KV0ixACTlUMTRxEEGJkr?= =?iso-8859-1?q?IP5c6HkgBbwKSahj8d3bloB26k6v/l020kU+Is1ka+aL7uzY2sMp0YM8NQqg?= =?iso-8859-1?q?xCutLOoCpzjfPn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ASXzN46owDKWLBjdfk0PQnK?= =?iso-8859-1?q?A0n0OaeL05pr5zsEDv52LcpHNu5g4WVHksS3+FTn04dzZRzeyjpqfo0D0F4v?= =?iso-8859-1?q?dK+nRMKqZgYp7KoILIETNyeKI4V4XuHDEG8SbWRTyt7LPCK7RJPBcMIFZB3i?= =?iso-8859-1?q?jDjgjiYJhWyagsxvJFhuzLf+KAQYv7AopTaq8gvQyAPc9nJwzYvj2m2KQHf9?= =?iso-8859-1?q?evJn2VW+h1+E0/iWR1JS+rXmpyjhb3lqfazaDbgdpQrm4br4E79UufoS+iPc?= =?iso-8859-1?q?rbgq3rXaQ/jeQWUtMiXj4Rnhc0D8v89tkpDyvpKq9xX1zC1bchkNNHgVzhTP?= =?iso-8859-1?q?bOH+I6hzWXTgkeAZDoIf9oqPmpX6edvEQ1mR+wjKxUssCYx98o+il0nHT0MT?= =?iso-8859-1?q?zZyi8I/qjghlNxEEUeH0oX7bGQXoMdxOsHTagaDXqmESbE09o/i9UWZ6ZCEo?= =?iso-8859-1?q?DeBxrXKpQUz8CHlCCqkgA2HQWDXvv6VnEUX59Yg0GmNlHPrkT1a/OrSbkZ+Q?= =?iso-8859-1?q?=3D?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: htecgroup.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PA4PR09MB4864.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ebcacfb5-cf5e-4b60-1188-08dd421aaad5 X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Jan 2025 17:13:35.5087 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 9f85665b-7efd-4776-9dfe-b6bfda2565ee X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: U9Tuw2/RzO3JAh+NA/01vGS6cd+ToBrR6dZEvCirpWqwRnqDWIiEKvdWD0PbA9DYrL6Zfu0l/tC+/++vBN8mpRcYhbXGARh9vBZ8AYzpPQI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR09MB6367 X-Spam-Status: No, score=-13.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org |
Series |
Improve Mips target
|
|
Commit Message
Aleksandar Rakic
Jan. 31, 2025, 5:13 p.m. UTC
From: Robert Suchanek <robert.suchanek@imgtec.com> Cherry-picked 4194c529fade9b3106d118cac63b71bc8b13f7be from https://github.com/MIPS/gcc Signed-off-by: Robert Suchanek <robert.suchanek@imgtec.com> Signed-off-by: Faraz Shahbazker <fshahbazker@wavecomp.com> Signed-off-by: Aleksandar Rakic <aleksandar.rakic@htecgroup.com> --- gcc/config/mips/mips.cc | 8 +++++++- gcc/config/mips/mips.h | 5 +++++ 2 files changed, 12 insertions(+), 1 deletion(-)
Comments
On Fri, Jan 31, 2025 at 6:37 PM Aleksandar Rakic <aleksandar.rakic@htecgroup.com> wrote: > > From: Robert Suchanek <robert.suchanek@imgtec.com> > > Cherry-picked 4194c529fade9b3106d118cac63b71bc8b13f7be > from https://github.com/MIPS/gcc This (and some other of the patches) lack the appropriate ChangeLog entry embedded in the commit message. > Signed-off-by: Robert Suchanek <robert.suchanek@imgtec.com> > Signed-off-by: Faraz Shahbazker <fshahbazker@wavecomp.com> > Signed-off-by: Aleksandar Rakic <aleksandar.rakic@htecgroup.com> > --- > gcc/config/mips/mips.cc | 8 +++++++- > gcc/config/mips/mips.h | 5 +++++ > 2 files changed, 12 insertions(+), 1 deletion(-) > > diff --git a/gcc/config/mips/mips.cc b/gcc/config/mips/mips.cc > index 3185fa9633e..cd4bce71ae8 100644 > --- a/gcc/config/mips/mips.cc > +++ b/gcc/config/mips/mips.cc > @@ -9631,7 +9631,13 @@ mips_expand_block_move (rtx dest, rtx src, rtx length, rtx alignment) > { > if (ISA_HAS_COPY) > return mips16_expand_copy (dest, src, length, alignment); > - else if (INTVAL (length) <= MIPS_MAX_MOVE_BYTES_PER_LOOP_ITER) > + else if (INTVAL (length) <= MIPS_MAX_MOVE_BYTES_PER_LOOP_ITER > + /* We increase slightly the maximum number of bytes in > + a straight-line block if the source and destination > + are aligned to the register width. */ > + || (!optimize_size > + && INTVAL (alignment) == UNITS_PER_WORD > + && INTVAL (length) <= MIPS_MAX_MOVE_MEM_STRAIGHT)) > { > mips_block_move_straight (dest, src, INTVAL (length), > INTVAL (alignment)); > diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h > index efd23a262f9..0245287f9bf 100644 > --- a/gcc/config/mips/mips.h > +++ b/gcc/config/mips/mips.h > @@ -3171,6 +3171,11 @@ while (0) > #define MIPS_MAX_MOVE_BYTES_STRAIGHT \ > (MIPS_MAX_MOVE_BYTES_PER_LOOP_ITER * 2) > > +/* The maximum number of bytes that can be copied by any expanded block move; > + see mips_expand_block_move. */ > +#define MIPS_MAX_MOVE_MEM_STRAIGHT \ > + (MIPS_MAX_MOVE_BYTES_PER_LOOP_ITER * 3) > + > /* The base cost of a memcpy call, for MOVE_RATIO and friends. These > values were determined experimentally by benchmarking with CSiBE. > In theory, the call overhead is higher for TARGET_ABICALLS (especially > -- > 2.34.1
On Mon, Feb 03, 2025 at 10:36:15AM +0100, Richard Biener wrote: > > --- a/gcc/config/mips/mips.cc > > +++ b/gcc/config/mips/mips.cc > > @@ -9631,7 +9631,13 @@ mips_expand_block_move (rtx dest, rtx src, rtx length, rtx alignment) > > { > > if (ISA_HAS_COPY) > > return mips16_expand_copy (dest, src, length, alignment); > > - else if (INTVAL (length) <= MIPS_MAX_MOVE_BYTES_PER_LOOP_ITER) > > + else if (INTVAL (length) <= MIPS_MAX_MOVE_BYTES_PER_LOOP_ITER > > + /* We increase slightly the maximum number of bytes in > > + a straight-line block if the source and destination > > + are aligned to the register width. */ > > + || (!optimize_size > > + && INTVAL (alignment) == UNITS_PER_WORD > > + && INTVAL (length) <= MIPS_MAX_MOVE_MEM_STRAIGHT)) The formatting here doesn't follow the coding conventions. Dunno if this is in the MUA say replacing a tab with spaces, but unlikely, e.g. the || line should be indented by one tab and 7 spaces to go under INTVAL in else if line. See https://gcc.gnu.org/contribute.html#standards for details. Jakub
diff --git a/gcc/config/mips/mips.cc b/gcc/config/mips/mips.cc index 3185fa9633e..cd4bce71ae8 100644 --- a/gcc/config/mips/mips.cc +++ b/gcc/config/mips/mips.cc @@ -9631,7 +9631,13 @@ mips_expand_block_move (rtx dest, rtx src, rtx length, rtx alignment) { if (ISA_HAS_COPY) return mips16_expand_copy (dest, src, length, alignment); - else if (INTVAL (length) <= MIPS_MAX_MOVE_BYTES_PER_LOOP_ITER) + else if (INTVAL (length) <= MIPS_MAX_MOVE_BYTES_PER_LOOP_ITER + /* We increase slightly the maximum number of bytes in + a straight-line block if the source and destination + are aligned to the register width. */ + || (!optimize_size + && INTVAL (alignment) == UNITS_PER_WORD + && INTVAL (length) <= MIPS_MAX_MOVE_MEM_STRAIGHT)) { mips_block_move_straight (dest, src, INTVAL (length), INTVAL (alignment)); diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index efd23a262f9..0245287f9bf 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -3171,6 +3171,11 @@ while (0) #define MIPS_MAX_MOVE_BYTES_STRAIGHT \ (MIPS_MAX_MOVE_BYTES_PER_LOOP_ITER * 2) +/* The maximum number of bytes that can be copied by any expanded block move; + see mips_expand_block_move. */ +#define MIPS_MAX_MOVE_MEM_STRAIGHT \ + (MIPS_MAX_MOVE_BYTES_PER_LOOP_ITER * 3) + /* The base cost of a memcpy call, for MOVE_RATIO and friends. These values were determined experimentally by benchmarking with CSiBE. In theory, the call overhead is higher for TARGET_ABICALLS (especially