Message ID | ZS7yvoPreGQ+BDt5@arm.com |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp4389944vqb; Tue, 17 Oct 2023 13:47:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEuQcuIYqCUtSxye+0O88IB8NenoTFZs+qfOok8um2Q1qp3AE6Nu3G+m5qUtLuSaUggzPEH X-Received: by 2002:a05:6214:d47:b0:66d:7aee:bdb1 with SMTP id 7-20020a0562140d4700b0066d7aeebdb1mr360078qvr.12.1697575664007; Tue, 17 Oct 2023 13:47:44 -0700 (PDT) Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id g26-20020ac842da000000b0041cb3f5c435si1049766qtm.660.2023.10.17.13.47.43 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 13:47:43 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=cs8cM9KC; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=cs8cM9KC; arc=fail (previous hop failed); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C26CC385773F for <ouuuleilei@gmail.com>; Tue, 17 Oct 2023 20:47:43 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2088.outbound.protection.outlook.com [40.107.7.88]) by sourceware.org (Postfix) with ESMTPS id CB4783858C52 for <gcc-patches@gcc.gnu.org>; Tue, 17 Oct 2023 20:47:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CB4783858C52 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 CB4783858C52 Authentication-Results: server2.sourceware.org; arc=fail smtp.remote-ip=40.107.7.88 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1697575639; cv=fail; b=OxfHtmUGhcgrkdG9lCYKI8+fn6tEtqcO7v8D3TXzAoEdNClB781VFyz/Xg76le2Q6NMTKWDHyK1kLnPPZamZm79k2BgCuKeuBVLeajFO/aAOA51S5EHX3BRyy5NK+MOVFH7dA8NroX1lUMOzC0IoGUTRNngRn59M50GNwuGfhc4= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1697575639; c=relaxed/simple; bh=I4a3EFWechKkyGD/mcFuTjjRDzdbsWXD+VbEDeSM4xQ=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=k0L07Q4Vquss5odGzwBbY3NiJVv1j6K6CU46FDUCe/9Yo7ePqMDudh4twadMQhUOPL2T/0wtZvcQUzNE3FzewLsnkrpsxefO0oPVtt1WTPMuwYF5Sgi4w+PcOSGUhzA7sABxJIGvAdoWrfUJhuekjbr5IICtj4FeJ9cbV2wTIC4= 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=oOF+6AvOdVasbnJnYIcUt3zBGux4+r2laOEbRcDZbMU=; b=cs8cM9KCCGuSanzlfTINC3vweTdSN29VyXmEcWoiqOyinCpFtGaUtizmjcHDaoX9tz+zD+UlnjCUYauIzXgGbFd2vAfz9A66HtHXcE3H0nIlNvBDNfyGRUpg0W1qxTb3vl++3fKYZlq+hwMVmcCe30lP392zu+UIbskhbvzHfGU= Received: from AM7PR02CA0027.eurprd02.prod.outlook.com (2603:10a6:20b:100::37) by DB4PR08MB8053.eurprd08.prod.outlook.com (2603:10a6:10:38a::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.35; Tue, 17 Oct 2023 20:47:12 +0000 Received: from AM7EUR03FT020.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:100:cafe::e8) by AM7PR02CA0027.outlook.office365.com (2603:10a6:20b:100::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.21 via Frontend Transport; Tue, 17 Oct 2023 20:47:12 +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 AM7EUR03FT020.mail.protection.outlook.com (100.127.140.196) 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:47:12 +0000 Received: ("Tessian outbound fb5c0777b309:v211"); Tue, 17 Oct 2023 20:47:12 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 95a7318e6ff83d8c X-CR-MTA-TID: 64aa7808 Received: from 96c6bf96f75b.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 4D57EBE2-7816-4A4E-A9A6-C468A5BC47C7.1; Tue, 17 Oct 2023 20:47:00 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 96c6bf96f75b.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 17 Oct 2023 20:47:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=awfBZfFanotjicov+f7RoIZASK02IYMK42OTcxqT7rqEqMGAGoINermg0Kztp35KPlicJ160qsFFLHzaEHuQVU3zVRm4ZWp3PGOBgUu44qEPfhvGsxPJd0TlM5wFxjWIhmKIqLTapRpZ3aYj1JnbmBvrFnJaQsFTqoPRc2rQHsdhOYOO3YEtfjxHJX1DskDave/cVB7KXi0h4oIO2IW1hxivzNhW+5o1GRzWpFS4OYX0LT8dHvnGmaUSw2GHDeLWSb60eNcT7EXe9OPeqTENTqaPfTTD3L9T32UZ664k0AZSQmhHCPAID9q6uVx+TgNxK0Q4EoI6pCoCga6db20www== 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=oOF+6AvOdVasbnJnYIcUt3zBGux4+r2laOEbRcDZbMU=; b=eY2J+B/3lm7axIh0zRkaL2Ud58l2hYkyRXn00YjeW3W3BDeyUvt0Ud42gQ75s4J7c4JNP99cvNN5CCsLb3gBflEDWAUlly9dAEUIfsTQ8oB0hbjkp4Dw23bSMfq37aN/Qa3BfYP1Ncyulfkbkk/VqydlCxHJLqVL7Ow4cEx1mNQfSEYSPHcuIoGecZjNfKu3XBjMB6gtx1EUe81/RryAgobBZRJtvdRMp9ZRKMTNSB4lwkNMlKrIfnGYD8sbiPFRvtKGDzxVuj9E0bOYyTpq45DkaOI5tkVAcHD/GwiKbUEylAE1JxqSJHhAMt3+uvilLqjJyBNmqUZ4MPhPQr9Ttg== 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=oOF+6AvOdVasbnJnYIcUt3zBGux4+r2laOEbRcDZbMU=; b=cs8cM9KCCGuSanzlfTINC3vweTdSN29VyXmEcWoiqOyinCpFtGaUtizmjcHDaoX9tz+zD+UlnjCUYauIzXgGbFd2vAfz9A66HtHXcE3H0nIlNvBDNfyGRUpg0W1qxTb3vl++3fKYZlq+hwMVmcCe30lP392zu+UIbskhbvzHfGU= 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:59 +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:59 +0000 Date: Tue, 17 Oct 2023 21:46:54 +0100 From: Alex Coplan <alex.coplan@arm.com> To: gcc-patches@gcc.gnu.org Cc: Richard Sandiford <richard.sandiford@arm.com> Subject: [PATCH 03/11] rtl-ssa: Add entry point to allow re-parenting uses Message-ID: <ZS7yvoPreGQ+BDt5@arm.com> Content-Type: multipart/mixed; boundary="hhkrWe3eUGj6iMfc" Content-Disposition: inline Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO6P123CA0044.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:2fe::20) To PAWPR08MB8958.eurprd08.prod.outlook.com (2603:10a6:102:33e::15) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: PAWPR08MB8958:EE_|AS4PR08MB7580:EE_|AM7EUR03FT020:EE_|DB4PR08MB8053:EE_ X-MS-Office365-Filtering-Correlation-Id: 6b5bda3e-9c35-478d-ad4c-08dbcf523d19 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: QxBPCERnAVLNYX+ILKyA1/WPsYFNUC/oQVPV+W8RGpuDC9ggE55lQfRX7DIgqFwfdOEB9xL3Pcg4GKqjP3U1tXwqsyLcIwlwnHJUDO+FUx/+llrIvVt0AmI6AHj77JB6+W/kDBuTdMiFZmSsbwMJ1zTKYQr3XfvNbgjarXgTXi0gZSFijsJueVW/IStEfdRBf0IfX2QT8zIUJJc3QCsUluFnatIBD3/92HuC14tQRmF3QH1LSbFQ1tXXwpfbkQNxZoO3xN/PwOeOtDn7hycCFGbGOZIX56aYsD8707Kdmu7CRg5GnVJ4x7217+M0O6rbEv+Tpmmp58kT9AqWVId3lIA3fcV3zG9q4ATESnlrixYxPHYeT+jeS7O2tGMFoE1j1Tsv2A3LK44dtuh8JRMmZmCyucFNSkkQI51ecQIVZyt2u6BJMjkibRIg0yw84m87QNsckclgZJ8YtpeGKU5jkiKfjwIoIy1NmQMkoYQDhA0HCTXknExpRYeYzZVL0JXAwk584ehSUBYhL48+0e7lPsFXhNahvxAnBRDS29l7r+IBMCZUN/qp2oOlIDC7K6Rv2gE+PBAcvbtQ/xxl8GX6Z8uQSHJpd4D75SIBh1DMleR3cNCM2WS+hVKdCVcRsKQMQdt3r91P4xJHFcisvcXqmA== 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)(6666004)(478600001)(2616005)(6486002)(44144004)(33964004)(6506007)(83380400001)(4326008)(26005)(235185007)(2906002)(5660300002)(44832011)(86362001)(41300700001)(36756003)(2700100001)(67856001); 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: AM7EUR03FT020.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: ce164482-8cb4-477c-b342-08dbcf523533 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cnA9kgSbfTu1AdNC19vnBXynSN/dGygAozV9Urk031i3EvlbBUEDhVvm+Cfrgwm81hSgMsTK+xwJEOEdWobfHdORV1FlNh4bjkGVY2eT6E4MKpEwgG+FxtefwOPjGuOy24GoSlBsT9XDPx3FicbbF6WuDvNVlE+D7utqB2qtm/0zDrdKNsUhiQS4+WAj5ccSpCM14w1EHKIz0VjnCaQKT+XjkWHR6qsyCtSL1uUaooDLZpsRRsd1Ukkn1AFlLvpao1hFf4yDGGX0f52ZgqBTGwcujdmuQGfu+zVH0IxLqXNDTBNX7u/PZxdtowyxHOgIIQdGfe9zBg6AeGQYzzt9j5Oq7ygvJHZoPMmuhqifPM0xOlC5aLwv6NrPLwPob+1X8ZnkUnSd3bA2K7RllzLXEAf8M0S5WEJxbFdJ5bvtifTAoiPzE+7S9sxF2odAqU1W/hqnOHBM/695QXXuuiaXiZI6sTRW0GQpygbQWpoWEh1zidBrPYarjdyMuVfjDg/75MWIcxpPxCGr3n+rVFPC/wZpfLn+E9ZjN+tlpWJGIVPDLYm831Ui/QErDaMqVnlgS1A4k9E6bk/o8PzWhfYp5D3uht45tnLnpl7uCw11TUO88npzNKe1U3Y0AyY/3GwaqZ6kHIJgJqOHqPyjXyH/SJucwAxJ3wi6W+mUAqz8Mu9jAVpVQx+YPdvSBDvDKSzCPSH48YvN8wVYhDSHOTW8E5VPiK+MJtEAON+4cMhO0ooi3O7yx/kWjMy4X0SeM+nGxPwxQlqvAdsFMXjRpbZydoylV8lKbLnIAlIh1Hmc7Eg= 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)(376002)(136003)(396003)(39860400002)(346002)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(82310400011)(40470700004)(46966006)(36840700001)(40480700001)(40460700003)(6666004)(70586007)(6916009)(6486002)(70206006)(478600001)(41300700001)(33964004)(83380400001)(36860700001)(47076005)(86362001)(82740400003)(356005)(2616005)(316002)(6512007)(6506007)(44144004)(336012)(26005)(44832011)(81166007)(36756003)(4326008)(8676002)(5660300002)(2906002)(235185007)(8936002)(2700100001)(67856001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Oct 2023 20:47:12.1792 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6b5bda3e-9c35-478d-ad4c-08dbcf523d19 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: AM7EUR03FT020.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR08MB8053 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+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780037099312994784 X-GMAIL-MSGID: 1780037099312994784 |
Series |
aarch64: Add new load/store pair fusion pass
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Alex Coplan
Oct. 17, 2023, 8:46 p.m. UTC
This is needed by the upcoming aarch64 load pair pass, as it can re-order stores (when alias analysis determines this is safe) and thus change which mem def a given use consumes (in the RTL-SSA view, there is no alias disambiguation of memory). Bootstrapped/regtested as a series on aarch64-linux-gnu, OK for trunk? gcc/ChangeLog: * rtl-ssa/accesses.cc (function_info::reparent_use): New. * rtl-ssa/functions.h (function_info): Declare new member function reparent_use. --- gcc/rtl-ssa/accesses.cc | 8 ++++++++ gcc/rtl-ssa/functions.h | 3 +++ 2 files changed, 11 insertions(+)
Comments
Alex Coplan <alex.coplan@arm.com> writes: > This is needed by the upcoming aarch64 load pair pass, as it can > re-order stores (when alias analysis determines this is safe) and thus > change which mem def a given use consumes (in the RTL-SSA view, there is > no alias disambiguation of memory). > > Bootstrapped/regtested as a series on aarch64-linux-gnu, OK for trunk? > > gcc/ChangeLog: > > * rtl-ssa/accesses.cc (function_info::reparent_use): New. > * rtl-ssa/functions.h (function_info): Declare new member > function reparent_use. OK, thanks. Richard > --- > gcc/rtl-ssa/accesses.cc | 8 ++++++++ > gcc/rtl-ssa/functions.h | 3 +++ > 2 files changed, 11 insertions(+) > > diff --git a/gcc/rtl-ssa/accesses.cc b/gcc/rtl-ssa/accesses.cc > index f12b5f4dd77..774ab9d99ee 100644 > --- a/gcc/rtl-ssa/accesses.cc > +++ b/gcc/rtl-ssa/accesses.cc > @@ -1239,6 +1239,14 @@ function_info::add_use (use_info *use) > insert_use_before (use, neighbor->value ()); > } > > +void > +function_info::reparent_use (use_info *use, set_info *new_def) > +{ > + remove_use (use); > + use->set_def (new_def); > + add_use (use); > +} > + > // If USE has a known definition, remove USE from that definition's list > // of uses. Also remove if it from the associated splay tree, if any. > void > diff --git a/gcc/rtl-ssa/functions.h b/gcc/rtl-ssa/functions.h > index 8b53b264064..d7da9774213 100644 > --- a/gcc/rtl-ssa/functions.h > +++ b/gcc/rtl-ssa/functions.h > @@ -159,6 +159,9 @@ public: > // Like change_insns, but for a single change CHANGE. > void change_insn (insn_change &change); > > + // Given a use USE, re-parent it to get its def from NEW_DEF. > + void reparent_use (use_info *use, set_info *new_def); > + > // If the changes that have been made to instructions require updates > // to the CFG, perform those updates now. Return true if something changed. > // If it did:
diff --git a/gcc/rtl-ssa/accesses.cc b/gcc/rtl-ssa/accesses.cc index f12b5f4dd77..774ab9d99ee 100644 --- a/gcc/rtl-ssa/accesses.cc +++ b/gcc/rtl-ssa/accesses.cc @@ -1239,6 +1239,14 @@ function_info::add_use (use_info *use) insert_use_before (use, neighbor->value ()); } +void +function_info::reparent_use (use_info *use, set_info *new_def) +{ + remove_use (use); + use->set_def (new_def); + add_use (use); +} + // If USE has a known definition, remove USE from that definition's list // of uses. Also remove if it from the associated splay tree, if any. void diff --git a/gcc/rtl-ssa/functions.h b/gcc/rtl-ssa/functions.h index 8b53b264064..d7da9774213 100644 --- a/gcc/rtl-ssa/functions.h +++ b/gcc/rtl-ssa/functions.h @@ -159,6 +159,9 @@ public: // Like change_insns, but for a single change CHANGE. void change_insn (insn_change &change); + // Given a use USE, re-parent it to get its def from NEW_DEF. + void reparent_use (use_info *use, set_info *new_def); + // If the changes that have been made to instructions require updates // to the CFG, perform those updates now. Return true if something changed. // If it did: