Message ID | ZS7yomVmZjy4PJK1@arm.com |
---|---|
State | New |
Headers | show
Return-Path: <gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-armh-onmicrosoft-com header.b=jrQA5KRT; dkim=pass (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-armh-onmicrosoft-com header.b=jrQA5KRT; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S95cs50MCz20cx for <incoming@patchwork.ozlabs.org>; Wed, 18 Oct 2023 07:46:53 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A65B73857731 for <incoming@patchwork.ozlabs.org>; Tue, 17 Oct 2023 20:46:51 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2080.outbound.protection.outlook.com [40.107.105.80]) by sourceware.org (Postfix) with ESMTPS id 2E8043858412 for <gcc-patches@gcc.gnu.org>; Tue, 17 Oct 2023 20:46:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2E8043858412 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2E8043858412 Authentication-Results: server2.sourceware.org; arc=fail smtp.remote-ip=40.107.105.80 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1697575601; cv=fail; b=cyx86VjwOlsEljQPSDjipFnajuEc8dXsx8w4228ycFYyrREjkYT4cYtd5dlxRfgDAX+zOgqgTmBHizzql9HTHI/GK7RfMTdBFITu5RAk9+PqoE0JUug5ic5V4Vs3IHukuhSBxSKqOv8oy1UZpAlcEQ5bbzFMoVNq8mq2ol366r0= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1697575601; c=relaxed/simple; bh=gDA9WtBZzfxd4UPuipGpgjPpuxh5Vj3j5ry549CEBZY=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=WaWYcWK5KUDRFZI9Y/9g5/VRezHeYGIgjfdlTabRGSlGluxjV7pbbGJc8gvd+OTOFwOvl4DnFEzbpUcnP3S8zeyJT1HIcbXZtezdG6IWwI2Bz2AhfSwt42kHNo0fJ0StJjmc59JCrlN9+eDqKGOEO57cSvajNwcu7xWYgqrjUJo= ARC-Authentication-Results: i=2; server2.sourceware.org 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=edgltNQRwK/SC3pGdt7DRuzMDbP8zldHVMP8IQFuS8U=; b=jrQA5KRTtf+KX2sWDQ1IDcVxOoNTXuuN7yyCGtvXETUxV6rJiFzbOJXL3igAUkr3vFL0ZkhZrAuV+ebxMgkucDIM+GRfLDGQ4R1DGkRb3FHciFHUChxGh9YxoF6v3DPd0J77KuSwDvjYCA0L14pajlUzaUPF1zoVR8xfdruyzVE= Received: from DU6P191CA0053.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:53e::23) by AS4PR08MB8144.eurprd08.prod.outlook.com (2603:10a6:20b:58f::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.21; Tue, 17 Oct 2023 20:46:36 +0000 Received: from DBAEUR03FT036.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:53e:cafe::4b) by DU6P191CA0053.outlook.office365.com (2603:10a6:10:53e::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.36 via Frontend Transport; Tue, 17 Oct 2023 20:46:36 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass 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; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DBAEUR03FT036.mail.protection.outlook.com (100.127.142.193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.20 via Frontend Transport; Tue, 17 Oct 2023 20:46:36 +0000 Received: ("Tessian outbound fb5c0777b309:v211"); Tue, 17 Oct 2023 20:46:36 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 62b5a7f864c272e1 X-CR-MTA-TID: 64aa7808 Received: from 2b51ef87a6d8.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id E9084FF2-1EEA-45B9-BBA2-8C5469095C48.1; Tue, 17 Oct 2023 20:46:30 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 2b51ef87a6d8.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 17 Oct 2023 20:46:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H9j5AVa0JDrh9HG9MrVjrJB/8KEzmYBNPdI2/EeMrBe9okqyfT+3LXATjQhqAwTguRZbRxM5iFq9HUADJIxTbis8Ds0rK8OfeBZOT/zxPFUlC8YWvU+AlM3vmWunK7WCJxOl2VLpjJb5Bg3HEJ6Gx9pGjpxs5vIHmRZiTxAcVtDAVFQqecpC0ZutJ81W6j8fROsOkYQe/SZR7mydTyjmmRiZMcybCLcKDbuyjY0oBy1R6SlK4r0vinILIG4QS9rt0sSx4K89MVGCsfAQ5ADTEuRpdP+FAM403EnFyGM/ORKa0ud0slKJMoKi3m/nCwyEvM7clr0NMR95WyPe7aNc9g== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=edgltNQRwK/SC3pGdt7DRuzMDbP8zldHVMP8IQFuS8U=; b=RH4BdWfBuAfH0kE8xIC8KdlSTvRWVxrZgP9OgHNh8YCqyHThahLdb7yqeUzMokfuy/ouCzRxWHBBFcuzA6fzTQyQWRfNsfzhmlm0ZM1Dm+7j81yPCLowe9eaFHFD545zsYJBYCFM/lYMncFljT+d3+lKh9wRwL2fSg0xYbSUk0L/xLZEGbx/oyYtNV4vFoX8Tyap1vmOmDNdRrVPxGhRkOBdSjw1s+82lGO1kbjNyihIsctRbZQPN/U2v2KSD5xyGReYI6ksH8KP+nJb3phjbTPDvejzlNqxd6NlwiU7wfcisPSH3bmFB3AS7UqNuscywSjxRXEho+s1ICuDZ+UI0Q== 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=edgltNQRwK/SC3pGdt7DRuzMDbP8zldHVMP8IQFuS8U=; b=jrQA5KRTtf+KX2sWDQ1IDcVxOoNTXuuN7yyCGtvXETUxV6rJiFzbOJXL3igAUkr3vFL0ZkhZrAuV+ebxMgkucDIM+GRfLDGQ4R1DGkRb3FHciFHUChxGh9YxoF6v3DPd0J77KuSwDvjYCA0L14pajlUzaUPF1zoVR8xfdruyzVE= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from PAWPR08MB8958.eurprd08.prod.outlook.com (2603:10a6:102:33e::15) by AS4PR08MB7580.eurprd08.prod.outlook.com (2603:10a6:20b:4ff::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.36; Tue, 17 Oct 2023 20:46:28 +0000 Received: from PAWPR08MB8958.eurprd08.prod.outlook.com ([fe80::f41:4ae1:dba2:70f4]) by PAWPR08MB8958.eurprd08.prod.outlook.com ([fe80::f41:4ae1:dba2:70f4%6]) with mapi id 15.20.6863.046; Tue, 17 Oct 2023 20:46:28 +0000 Date: Tue, 17 Oct 2023 21:46:26 +0100 From: Alex Coplan <alex.coplan@arm.com> To: gcc-patches@gcc.gnu.org Cc: Richard Sandiford <richard.sandiford@arm.com> Subject: [PATCH 02/11] rtl-ssa: Add drop_memory_access helper Message-ID: <ZS7yomVmZjy4PJK1@arm.com> Content-Type: multipart/mixed; boundary="z7Gh7YtRt1Eo9+SW" Content-Disposition: inline Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LNXP265CA0061.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:5d::25) To PAWPR08MB8958.eurprd08.prod.outlook.com (2603:10a6:102:33e::15) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: PAWPR08MB8958:EE_|AS4PR08MB7580:EE_|DBAEUR03FT036:EE_|AS4PR08MB8144:EE_ X-MS-Office365-Filtering-Correlation-Id: 0155d37c-c608-4c90-d0e2-08dbcf5227e7 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: UsV8mw1t4I9qZG04Tju4ODXhbOQ11ExwZ5qa64a7YszM3wyWqCX8cU9vLDA1h1UJBVEWPVB/t2Lwu7p4EW0/+y2MpUnBkUXYcSrBDc+Csn23OVjUWWkAQCFQIhIQJNTdild1XocLSknBtvmLnXmKZcZVKpAu1aERIxgCDhAKBQqD+b+HZU9Ra6O3mepIKUt2KvnfVpKGwox/BK1CWlVJwmIjLb1Uiq1RFCyBwHYGs1X4nHIwNyr1CEGS6aSwhE5pwfj/Uik30pDYmsABxa8X8PZL5Jnya5aCXzV6RaoQJcy2KHxTduawQjq+u7gAulZ+L9pCmD/X9mRfDOPI8p5Ezir5MPYRWTsGGKvoJjRTTVPRuXJ/sJthbr6zf19pIz79rDzGI9rocv9dWQY06jCuJMqRthfpFZbhU2TQLJPE62jP8uKlCAmXvYQZr7jIhVZYnCQCJjAa0iAVZ/V1Pf91W1XQ78Mvzu4EOBmaliXNR0VBEvaT5rMz0c9ttKzBLHzyudSuV3EkwZ+4/3J1ez6IxqYGgDsuZ4GXZ/gMw/hmWdxIZT4H3s5e/Fng0cDnR+dC6CJNiLJMCN2SEQnkDxqPK10LrIXJDOKkpYla+q2C+mVKciM6LG0pX+9Rjq008DEO X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAWPR08MB8958.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(346002)(396003)(366004)(136003)(39860400002)(376002)(230922051799003)(64100799003)(451199024)(1800799009)(186009)(316002)(66556008)(66946007)(66476007)(8936002)(8676002)(6916009)(38100700002)(6512007)(478600001)(2616005)(6486002)(44144004)(33964004)(6506007)(83380400001)(4326008)(26005)(235185007)(2906002)(5660300002)(44832011)(86362001)(41300700001)(36756003)(2700100001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR08MB7580 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT036.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 73e7c92b-3e8b-4c43-76da-08dbcf522329 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YwLi2kzLt804wB0vwx8L5flJsxA0TjS+2qhemaKjhl43DVRoEfP2g3vAsFJFoEi4HJnMGrO4kHVKyYB7U6xWcnkEo7ZNmbLJRTVMOAOeJ0UG3iNDnjX9HTv7UlMvzpZQbmiGAJ+8ZIU2xxmgtxaUza7Om18ZKGeHwS3+9R6KmQGcoxrclhb0vdo7aZMuyiv/IBlppNA/ojnoQDwBrYd6VGqWo0bj7twygCN0Eeq2GND2Zv+AHUiXNFUXmRPgTnS9CmedP5lzSHAtC868r/1nKsP8kQNnP23XVK9c/6ZhsXtrCWPMcKupkemhDo1kGiX3xSgk5XDhXJLIlHMpUQMX1vV1U8x4M+zT+bbaTKQIrzRoyl4YcSLgq21P2SavPiBftkXGUyTk09Uhmgr6lEYAWh8GdfhYig6+LW83pt9bRZCrnho3M8J1iaIlEfex3tvxqxVEr4BAI5LHPUTPL8rp/Nr5nsgwvBgQyAL+UNRBi6wK6N25xPW6hiXQ9nLmCIsy2iAavMEwHBlZZjq/BojKI18hp2h+4Argj15P0m4AyXff+aPXR4BWd4FodqqH+KOqm5cP+jW/qHo4qsqMrSQoHe7Pmuj7RVUnyKT1pow1yM+ASISD1mNYrkASTccRRdMmFV8eJDe+r/XUtQ7ltkkLVyZZrx1c/km32zM8YTltyK1LpMVenA7sQs8907PAeCDUYN1/EMZBmxjgEBrcPrLuhdxjHfSFgfq28sjk42L5kOD63HRKP15F1grGuUzi6JvHg5rjuzEqtz76NInoREWXdQ== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230031)(4636009)(39860400002)(136003)(346002)(376002)(396003)(230922051799003)(186009)(1800799009)(82310400011)(64100799003)(451199024)(36840700001)(40470700004)(46966006)(2906002)(235185007)(40460700003)(70586007)(47076005)(36860700001)(6916009)(316002)(86362001)(82740400003)(70206006)(356005)(81166007)(33964004)(6506007)(44144004)(6512007)(478600001)(6486002)(83380400001)(26005)(2616005)(336012)(8936002)(5660300002)(44832011)(40480700001)(36756003)(41300700001)(4326008)(8676002)(2700100001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Oct 2023 20:46:36.6516 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0155d37c-c608-4c90-d0e2-08dbcf5227e7 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DBAEUR03FT036.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR08MB8144 X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, UNPARSEABLE_RELAY 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+incoming=patchwork.ozlabs.org@gcc.gnu.org |
Series |
aarch64: Add new load/store pair fusion pass
|
expand
|
Alex Coplan <alex.coplan@arm.com> writes: > Add a helper routine to access-utils.h which removes the memory access > from an access_array, if it has one. > > Bootstrapped/regtested as a series on aarch64-linux-gnu, OK for trunk? > > gcc/ChangeLog: > > * rtl-ssa/access-utils.h (drop_memory_access): New. > --- > gcc/rtl-ssa/access-utils.h | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/gcc/rtl-ssa/access-utils.h b/gcc/rtl-ssa/access-utils.h > index fbaaaa2c2d3..0c108b18bb8 100644 > --- a/gcc/rtl-ssa/access-utils.h > +++ b/gcc/rtl-ssa/access-utils.h > @@ -51,6 +51,17 @@ memory_access (T accesses) -> decltype (accesses[0]) > return nullptr; > } > > +template<typename T> > +inline T > +drop_memory_access (T accesses) > +{ > + if (!memory_access (accesses)) > + return accesses; > + > + access_array arr (accesses); > + return T (arr.begin (), accesses.size () - 1); > +} There ought to be a comment above the function. OK with that change, thanks. Richard > + > // If sorted array ACCESSES includes a reference to REGNO, return the > // access, otherwise return null. > template<typename T>
diff --git a/gcc/rtl-ssa/access-utils.h b/gcc/rtl-ssa/access-utils.h index fbaaaa2c2d3..0c108b18bb8 100644 --- a/gcc/rtl-ssa/access-utils.h +++ b/gcc/rtl-ssa/access-utils.h @@ -51,6 +51,17 @@ memory_access (T accesses) -> decltype (accesses[0]) return nullptr; } +template<typename T> +inline T +drop_memory_access (T accesses) +{ + if (!memory_access (accesses)) + return accesses; + + access_array arr (accesses); + return T (arr.begin (), accesses.size () - 1); +} + // If sorted array ACCESSES includes a reference to REGNO, return the // access, otherwise return null. template<typename T>