From patchwork Sat Jan 13 15:44:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Coplan X-Patchwork-Id: 187921 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2614:b0:101:6a76:bbe3 with SMTP id mm20csp820538dyc; Sat, 13 Jan 2024 07:45:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IE2Mh+quzEbtXJt2alNlqG2nM35ZcYU49xz37hEBrIS7QknZHaPdhH7oDc14dTPr+SmXGlP X-Received: by 2002:a05:620a:1369:b0:783:3a23:ea3f with SMTP id d9-20020a05620a136900b007833a23ea3fmr3455218qkl.77.1705160717501; Sat, 13 Jan 2024 07:45:17 -0800 (PST) ARC-Seal: i=4; a=rsa-sha256; t=1705160717; cv=pass; d=google.com; s=arc-20160816; b=q2MEgoD4os+rvLF5wNjS6MYJIz5o8bEO7TlIhe6jswRPPqVY+6F8AHY3IXo/1qEsiL ffR8DjwGUQbjF85Yx0h2yo1vxH4khIuxPVKHBGcBeW5fLHeXZZRZH11ut0MHpqyPh4e/ 3hOuFA6CfDMNl6ak0479RXYdpSZb7Xp3E8qylTvitEyU8iv82BXylhoa+YkY0IE9Rsae 9a3JpsN36R8xq9qWV+slT9B22pilBHgqvTPs5sdH8DiPOK6IriNZtpg0lhJ39/4xMLn3 psABVNxz69xLxllZ59S/QnNtHJpu7jJPgDBtk0nPt+VRzNpEIqWmr3nJ7ETmp0DcIEGJ pWEw== ARC-Message-Signature: i=4; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:original-authentication-results :nodisclaimer:mime-version:content-transfer-encoding :content-disposition:message-id:subject:cc:to:from:date :authentication-results-original:dkim-signature:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=/QxFs7AYJS/LbVMrjskh4R3XVQsQmf37RrknxGMvFao=; fh=rK/GR6E5CDeX4v661qR4Md+UnKo7nXSDh7f7HZAPX1U=; b=J/qoAyzcCtV7pRWkEoxiNyEgS6dxb7MkwQqFRFjWa0EeVQdUdCNfVmHwo1B0x2+L7U 2ZSKrblfdqn5zxMcKZR0fQZ4AixWIKNbeo4+cmDEAoJKuRCHIV/f4Gd9xnScftzxKMzn MhD6EtysJCDRNNtG2K4PtakqOTqirgZQVuEA/VfYDk+wSidMwC1PX6WwCX1mSvJASuLD bATRG5EW7IZZhdHsxPWn9v2DfeXPz+SI6M7AwAI/hyb9W4AvcFwxRugxTCaXFeg1bo5g eL5s9zLFREDg0d0jKhJ5h2F9/tZ5M7IxcMos9MrHB/wFhmMfHApRU+/AbPrSt4HxjfyK MI8A== ARC-Authentication-Results: i=4; mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=z+AeGtHu; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=z+AeGtHu; arc=pass (i=3); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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 (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id ea17-20020a05620a489100b00783527bebd6si1062532qkb.252.2024.01.13.07.45.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Jan 2024 07:45:17 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=z+AeGtHu; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=z+AeGtHu; arc=pass (i=3); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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 382903858C98 for ; Sat, 13 Jan 2024 15:45:17 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2056.outbound.protection.outlook.com [40.107.20.56]) by sourceware.org (Postfix) with ESMTPS id 528D53858C29 for ; Sat, 13 Jan 2024 15:44:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 528D53858C29 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 528D53858C29 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.20.56 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1705160675; cv=pass; b=kTTi19PBdCovFqUmNbs2umv1VaPHlON0ovEub/MO0FJZegXYlrHaQzEWyUZmzZGS37/Z2XIUsYSchhctjU3J/Ccj1apR32BphJidizsjPDFErejumuvC4/ex7Rjs9lmsiwlQtfX+pXyIlcrDXhsUpGe0WuurZ9elCppjm85EUaY= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1705160675; c=relaxed/simple; bh=D5qi9ELvFGc7S2lKhjjnwkAQSakny6L6NeZ9jF/edws=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=S4CA7UzTnKTBH1mG+UpiUzWWbtT1CmxroAIPF6IV4sWyLjuougxPSZ/n1z7gRNLnadvF7x5WDun9ZfR5iSyluI6RC+cg8r3TjjpGIUl6ixju4782QOZjYJwZtFY1J2MpZ2vvNxf/mRl38OysLulZ1myhq9BsudADMy2OIqALjfk= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=Zeft4DwkLR/glW1YAllvFiNMZ5YwEvlsXASxgRDaOVSg75/7+dJ1vn2eFPiIq9PeL7OqpghaHKDvdZbAwPEhmQR8bu3AQIR+mZr26kbBY+bMJfXEMeaNKiq0pL17/bCduWTYpCZVJRFkTj7sKB4OPBzyMw1SrB6Yo53tlrN1L7rHx8201Fmiuiv7og8HNljbq5SgIzAQAd8X5dOjiC6resX5MD/nwmid3QENkRNVmg/iVA5fpfn3uLEJO/yqR0rcwN2CJFziDzM8FPiZ8QVrqTqSZRdtpyq9ul9bHZ3IF0jFGOuaJa1GAjVWZEQeKr4K8gOki7D37qd1iGuNumJWzg== ARC-Message-Signature: i=2; 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=/QxFs7AYJS/LbVMrjskh4R3XVQsQmf37RrknxGMvFao=; b=CvmdJNaADwUCwxYkuimQjbBxyV9Gy+IFIoz6cKQj3hvPWRbsth/Yb1EQoQWf7qsXARKVCxLIHExCZ8X1Rp/ecya3+MwIbqWW/OuU2nrc7psrG4UD358ycTk4RxFzX27vcKB9rXCmAbrfCd0YNmtgYk5HKunwwDOX7BfTn7t0Oee7B+La47anwSlUybzRffBHiwI5BlTEJRgFI0licL5sQffwDqBvAb4tGuTqjn/I1RQmTC9bl9eQrFANcftQWoKrGq2AQrAgoIpiEfegfOzQvAzzWeM0Sf6OSUMiO5Vd4KOMzlx49LxGZdbFVrvdywdejq0dtKbpFbzu/y0yM0rhKw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) 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=/QxFs7AYJS/LbVMrjskh4R3XVQsQmf37RrknxGMvFao=; b=z+AeGtHureCmfsSxH3HncGZqLi/2uBANQMQ7vJOGVd8r6wGKPXfyP2Pnj735cswbdGy+ERExApSXTgRDKYwW+cBrqOD58eR+zkZHMMFpe6+ozT1/e8zRznv4MW7IGeIstRF76chqtLNtDBnWgz6WejX0EwCJ+T0vJz2XNNWEeJ8= Received: from AS9P194CA0011.EURP194.PROD.OUTLOOK.COM (2603:10a6:20b:46d::16) by PR3PR08MB5708.eurprd08.prod.outlook.com (2603:10a6:102:84::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.23; Sat, 13 Jan 2024 15:44:29 +0000 Received: from AM3PEPF0000A791.eurprd04.prod.outlook.com (2603:10a6:20b:46d:cafe::d4) by AS9P194CA0011.outlook.office365.com (2603:10a6:20b:46d::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.23 via Frontend Transport; Sat, 13 Jan 2024 15:44:29 +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 AM3PEPF0000A791.mail.protection.outlook.com (10.167.16.120) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.14 via Frontend Transport; Sat, 13 Jan 2024 15:44:29 +0000 Received: ("Tessian outbound 1076c872ecc6:v228"); Sat, 13 Jan 2024 15:44:29 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 8daea96fdb55cd46 X-CR-MTA-TID: 64aa7808 Received: from 4edc99f96549.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 7DA4F0D3-1F66-4400-B41E-95C468305C17.1; Sat, 13 Jan 2024 15:44:23 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 4edc99f96549.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Sat, 13 Jan 2024 15:44:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VrrnedJ4BeNxKUZ0aybJJodgy9zqLuYk/C0nUroPad7tQ0tlk+nvzOmHkAGE/dJshNL5qKJLimCBzL8SzLqiSMsxG23L8g3BMyrtcyjKyBvc0m/acFOXTr0FYOGpainSoGHOQ0PiE0N/JmPu49QF8a6KZF6vs8wsSZeYrLOty2cah6Pi+d0s0opCqMkhKHohe92C5GE8yikfEmVvgpa2welnZPKv9CETOd6iY9EeCNI9nRDvyKYMFik2ytVCi8nYPboJw4rgVeSguHnEd6eDpTW588w0Z2auejvEt0MNRC6HY51nrfO3zPE0+CmOMsAqf8h+3jHtY3gt49b3rJkATA== 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=/QxFs7AYJS/LbVMrjskh4R3XVQsQmf37RrknxGMvFao=; b=kzQLf62k3rLUa6xJXRWkFg1J4B2yo6twdI1NLPGKbGPpfhDjrLFkrZHA0WFd/bE+abXWd9aFKFpJxks4VxwrTbmfhMr6zmw/ECo6Bsgg6gadyBApmtoUPXnVtLqZCfQZDqniL5DtShXJZeZTtKPrlRZONVhvsCGrnC5RWYv/4tF/JtHaBoOhVEjahtYoWXwmB5aMkWcttdbksaPgomC0Ob2qMXrbF0TlAsZJP0W9eMTXrTUnw3StZncDpK6XGL4dAiW7poYEUI+0xJJgJUTXSePqZobGfP+Ki90GFqetFfI3vktu8RyCqCJCgV3udTNfGD5NgxIxA0/T8LcJ+rEWhA== 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=/QxFs7AYJS/LbVMrjskh4R3XVQsQmf37RrknxGMvFao=; b=z+AeGtHureCmfsSxH3HncGZqLi/2uBANQMQ7vJOGVd8r6wGKPXfyP2Pnj735cswbdGy+ERExApSXTgRDKYwW+cBrqOD58eR+zkZHMMFpe6+ozT1/e8zRznv4MW7IGeIstRF76chqtLNtDBnWgz6WejX0EwCJ+T0vJz2XNNWEeJ8= 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 DB9PR08MB8484.eurprd08.prod.outlook.com (2603:10a6:10:3d4::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.23; Sat, 13 Jan 2024 15:44:21 +0000 Received: from PAWPR08MB8958.eurprd08.prod.outlook.com ([fe80::48ca:fbcb:84bf:ed17]) by PAWPR08MB8958.eurprd08.prod.outlook.com ([fe80::48ca:fbcb:84bf:ed17%4]) with mapi id 15.20.7181.015; Sat, 13 Jan 2024 15:44:21 +0000 Date: Sat, 13 Jan 2024 15:44:18 +0000 From: Alex Coplan To: gcc-patches@gcc.gnu.org Cc: Richard Sandiford , Kyrylo Tkachov , Richard Earnshaw Subject: [PATCH 2/4] rtl-ssa: Support for creating new uses [PR113070] Message-ID: Content-Disposition: inline X-ClientProxiedBy: LO4P123CA0424.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18b::15) To PAWPR08MB8958.eurprd08.prod.outlook.com (2603:10a6:102:33e::15) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: PAWPR08MB8958:EE_|DB9PR08MB8484:EE_|AM3PEPF0000A791:EE_|PR3PR08MB5708:EE_ X-MS-Office365-Filtering-Correlation-Id: 459a5f07-5a56-4642-66a9-08dc144e87a8 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: F4hIU4+AC3YV/k/jDkinGysnJgSbNBz0G9sa1zkUfVWO3+l8X+wucuXIUSxeN5a8FTYcDBwny6wHp4zDpxJ3uQwZawQgnRrKgUCNy+uH8Ph3/qrgfH0MylVDgwEQO6lZ31Ya23IT2uq2DTpRQ+x7VNWVHkFV+I9eNwpgQXxsscXINhuUMGgZ78xDn/AbGlsKOFxtV4rnqLZoWxzfE0kQYwp3MXx5dDsOXYmNH0BMleZMawxyMCIdJ8DajZfTHUabBPSmz/I/y1bP8hO49qEY83Nyzt7e4XtUeK2ShhQg3coFAK+7Xg4x9YYpVP8NNdUDGlYAZbELPj6ed1hqGHsgTJL3Hd5/ObEk4KHiQQ1LgSH6hAz1zemP9BWdvD5JscXkpvsEKVeFrVqdTFrXRm9Hhih9FrW9dzojI+K6XspRMlAxghj1KZJp7y3NwcvI5L7/T5AdHKjjLE8i0hcBlcDx6RRyiJYcV+QyxFXNrokG3jJ8i3Yv+7VMW300xkHXVXJ3Il0k9CKnURkxZHkrRzUQvJwRGBzy7blsSYJ2UShIVFmnZdQQoE/XTUDtKifnpeE2cMtgQaq5UJsg5ZrTkfjyWrXMsOmdFDhoNqMxwgQst9aWj6t3FG6uGtB/+Jcc1o+5 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)(396003)(366004)(376002)(346002)(136003)(39860400002)(230922051799003)(451199024)(1800799012)(64100799003)(186009)(86362001)(38100700002)(26005)(2616005)(36756003)(83380400001)(6512007)(6506007)(6666004)(316002)(6486002)(33964004)(44144004)(66946007)(54906003)(66556008)(66476007)(6916009)(2906002)(235185007)(44832011)(8676002)(5660300002)(4326008)(478600001)(8936002)(41300700001)(2700100001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB8484 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: AM3PEPF0000A791.eurprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 99732efe-1d2c-4a74-d05c-08dc144e8307 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: T4n96kxHurZZ0JYl8LqAS5ST1MaOexln++6oTjM0WcqE23V6ceIUA6I3NHXBh03R0/IAw87aSkCEZX7aWOc5Mm64nnVhKcDbD5Xi/d+kNomSVvS7m88ODYiKo8v19ervkQ4O+Nf8DX6BDGoCa33mZEvD9B22utOXt2G9bJx2wC36Ql+ypuLlChjXG4ubObLQkwrEaOFFEQaYAv/1ugM06jzJiMYErD+8Srk0vtWwWurIaMuj9bxmw68sFdHfvg28afdKHSz53trejpQZdiFla0otBpCAXbWryPROuFNypyUljkOBfK/+5l9hzWgMtHCaqBEA2TokB9KsIGtCaEwFvFV/gwpHKW7g/KsWAt01RxBGEYrUFHsjZXOxeqlKMg8KXzVBOhGgF91LU229LBn3e41mLLg0W1qbLI7YZE/Z88xug3d2/KkPnbCVeaHhfdxo1qx8e7OFsYm3GNUVuOpGZcdSCsMyPcEbx5tvUtHN/C1trN3NHz0CSLM6PM0ZQRXB0thywHh3B8QilKC0HX8Ot+id/krDfENYgAyW1zUWpfwpZR9eqiRmRDuAQuK75JnfGixkcQFPDPYZjjF+msFZQOuLSMC0Uc38G1/4XF0AN2JZktekwQ+c/UY8x6Y2DYGLqhm4mZ2Wo1cmVJvQT1gDFafETEq369cGmmN93iIyNXJ/QWXKj6lNvK6+xwg+u95MWkhi7cW0fFkyTZMQnouS4g56O0MQpyrtivs/323FQih3+P4QKecLECeXla+GCeS6kiCaNU3fbZTfYy35wKOsAg== 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)(39850400004)(136003)(396003)(376002)(346002)(230922051799003)(82310400011)(186009)(1800799012)(64100799003)(451199024)(46966006)(36840700001)(40470700004)(33964004)(44144004)(26005)(336012)(478600001)(6486002)(6506007)(6512007)(6666004)(2616005)(47076005)(83380400001)(2906002)(5660300002)(235185007)(41300700001)(70206006)(70586007)(54906003)(316002)(6916009)(44832011)(4326008)(8676002)(8936002)(82740400003)(36860700001)(86362001)(36756003)(81166007)(356005)(40480700001)(40460700003)(2700100001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2024 15:44:29.5264 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 459a5f07-5a56-4642-66a9-08dc144e87a8 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: AM3PEPF0000A791.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR08MB5708 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, T_SCC_BODY_TEXT_LINE, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787990604783363374 X-GMAIL-MSGID: 1787990604783363374 This exposes an interface for users to create new uses in RTL-SSA. This is needed for updating uses after inserting a new store pair insn in the aarch64 load/store pair fusion pass. gcc/ChangeLog: PR target/113070 * rtl-ssa/accesses.cc (function_info::create_use): New. * rtl-ssa/changes.cc (function_info::finalize_new_accesses): Handle temporary uses, ensure new uses end up referring to permanent defs. * rtl-ssa/functions.h (function_info::create_use): Declare. --- gcc/rtl-ssa/accesses.cc | 10 ++++++++++ gcc/rtl-ssa/changes.cc | 24 +++++++++++++++++++----- gcc/rtl-ssa/functions.h | 5 +++++ 3 files changed, 34 insertions(+), 5 deletions(-) diff --git a/gcc/rtl-ssa/accesses.cc b/gcc/rtl-ssa/accesses.cc index ce4a8b8dc00..3f1304fc5bf 100644 --- a/gcc/rtl-ssa/accesses.cc +++ b/gcc/rtl-ssa/accesses.cc @@ -1466,6 +1466,16 @@ function_info::create_set (obstack_watermark &watermark, return set; } +use_info * +function_info::create_use (obstack_watermark &watermark, + insn_info *insn, + set_info *set) +{ + auto use = change_alloc (watermark, insn, set->resource (), set); + use->m_is_temp = true; + return use; +} + // Return true if ACCESS1 can represent ACCESS2 and if ACCESS2 can // represent ACCESS1. static bool diff --git a/gcc/rtl-ssa/changes.cc b/gcc/rtl-ssa/changes.cc index e538b637848..ce51d6ccd8d 100644 --- a/gcc/rtl-ssa/changes.cc +++ b/gcc/rtl-ssa/changes.cc @@ -538,7 +538,9 @@ function_info::finalize_new_accesses (insn_change &change, insn_info *pos) unsigned int i = 0; for (use_info *use : change.new_uses) { - if (!use->m_has_been_superceded) + if (use->m_is_temp) + use->m_has_been_superceded = true; + else if (!use->m_has_been_superceded) { use = allocate_temp (insn, use->resource (), use->def ()); use->m_has_been_superceded = true; @@ -609,15 +611,27 @@ function_info::finalize_new_accesses (insn_change &change, insn_info *pos) m_temp_uses[i] = use = allocate (*use); use->m_is_temp = false; set_info *def = use->def (); - // Handle cases in which the value was previously not used - // within the block. - if (def && def->m_is_temp) + if (!def || !def->m_is_temp) + continue; + + if (auto phi = dyn_cast (def)) { - phi_info *phi = as_a (def); + // Handle cases in which the value was previously not used + // within the block. gcc_assert (phi->is_degenerate ()); phi = create_degenerate_phi (phi->ebb (), phi->input_value (0)); use->set_def (phi); } + else + { + // The temporary def may also be a set added with this change, in + // which case the permanent set is stored in the last_def link, + // and we need to update the use to refer to the permanent set. + gcc_assert (is_a (def)); + auto perm_set = as_a (def->last_def ()); + gcc_assert (!perm_set->is_temporary ()); + use->set_def (perm_set); + } } } diff --git a/gcc/rtl-ssa/functions.h b/gcc/rtl-ssa/functions.h index 58d0b50ea83..962180e27d6 100644 --- a/gcc/rtl-ssa/functions.h +++ b/gcc/rtl-ssa/functions.h @@ -73,6 +73,11 @@ public: insn_info *insn, resource_info resource); + // Create a temporary use. + use_info *create_use (obstack_watermark &watermark, + insn_info *insn, + set_info *set); + // Create a temporary insn with code INSN_CODE and pattern PAT. insn_info *create_insn (obstack_watermark &watermark, rtx_code insn_code, From patchwork Sat Jan 13 15:45:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Coplan X-Patchwork-Id: 187922 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2614:b0:101:6a76:bbe3 with SMTP id mm20csp820934dyc; Sat, 13 Jan 2024 07:46:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IH5LmqdlIW+ULpusuW0jPYxwlGCABXU13jjtEdmck8uxzpqwPhC1kpeBqTbRjT9lRAJPxgA X-Received: by 2002:a05:620a:4ac1:b0:783:52a:2597 with SMTP id sq1-20020a05620a4ac100b00783052a2597mr2841934qkn.64.1705160772822; Sat, 13 Jan 2024 07:46:12 -0800 (PST) ARC-Seal: i=4; a=rsa-sha256; t=1705160772; cv=pass; d=google.com; s=arc-20160816; b=Xl9bxMCDbQquuI/6wrhSH7Nbn9dC3Ywcp7jRKk0VdycA+GmTJJc6pjkmF286Md24eN Kt3ifE1eVE10foG7LRb6ZsFyUEhJ/XZY1TMA+yCKTQ7T8eZoPrMw0EZ8r5tIvAUzyWoU V/f7/DAruUHDhgFVL6c1VmvM8SJOA2Ewb9Mt4kLK/bfbZ/p2DdD+HR6qyWzQbSacbTGo 7wG3lwV5Ljj/v0g+y2WnjwLO7wI+mSbgLW6A9UOuBThfVhgaFbfco0ioFwbaVOx0ogYx j5bpDj9anMr2G5A4mi2cTsY2o+c0rof33rhFrNMGCnHz52atjLQhP0yq6zJJPjhZdRSX jLbQ== ARC-Message-Signature: i=4; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:original-authentication-results :nodisclaimer:mime-version:content-transfer-encoding :content-disposition:message-id:subject:cc:to:from:date :authentication-results-original:dkim-signature:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=Ffnkxrkl862jiy8xABWl6Odrq+oKbWfUPuZ/e1jqY6I=; fh=rK/GR6E5CDeX4v661qR4Md+UnKo7nXSDh7f7HZAPX1U=; b=lKOCfpwAMNziH78h43waLYt36Xgxq7SBhl2OrbNNz9ywJe7DDO+0nDAkOfJ6xmWDBq 8+pHJuOXNFXAakYdHxwaF+zqFi8YeoZcwUjts9Bh6Hn3zjGbLpZWTMhfPisWhhxgo0i1 jZ1VIpdqfSwSYI1KjubhRF82WlbeThZ2WUYiZnGi9b/79xjEXWDPHv1fV1ZCVgm3AHvJ ZDB1MmsBW88Vrv20qtZZFN6/vqy6+fujoKA39FIwXV07pZs83jJJhirGCUzzU6M3PFh+ t9o7/bFOkCsaCgyWNbukInBCqWuXqBgauzk/fPf6AYfUGPxzCXxxrIuYYakrmuv7hYIj qC4w== ARC-Authentication-Results: i=4; mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=goKSjM18; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=goKSjM18; arc=pass (i=3); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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 (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id g18-20020a05620a40d200b00783420fb6f3si5289640qko.314.2024.01.13.07.46.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Jan 2024 07:46:12 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=goKSjM18; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=goKSjM18; arc=pass (i=3); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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 45AA3385840E for ; Sat, 13 Jan 2024 15:46:12 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2085.outbound.protection.outlook.com [40.107.8.85]) by sourceware.org (Postfix) with ESMTPS id 4EA513858C29 for ; Sat, 13 Jan 2024 15:45:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4EA513858C29 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 4EA513858C29 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.8.85 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1705160734; cv=pass; b=FmPwVUJ8S2oSyrTNqIhuhI0tXYTipD2MAl2Kk09OwlQ2y51fhEmTfQrs1bSZGrRZ7e+LkQzAhZHk+LibyD3XC/yZRGhVY7HLAKqjGNo7d+mVf+CZ89AylkxoRWty3fiiEx/hLzYisG0v7hVcO2TIopvjtduVnnKDVnHz4Imf/kY= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1705160734; c=relaxed/simple; bh=ZVix3B6UeyBuojOMU07eFSrUcx4EQc/VY+6MXo0UOgU=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=wMscTqmHkCR9939/6tjB3fh0umzs4wY9EJI5xVCzl3UbaNhsSHYhZLEipKyvcm15n03tJ2y1D8EmlOawZ1/b1suDfHMLbpVzy0HmH3PZ3pBgFP7+Smy43xWPTsI6dSPjihrxwCQX/CYG5sTfJ+BTR7gdAi0yE6ohe1tfFBil53g= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=FsPI94/xqiZHphpE/BcL6mfUukJoOBpXPA8q8na7gKHmjsYgqHnOaCyRo6DWA5V26jG/pcFzUhjd3TnCx81jqASqVMqnJL9vZVzFWJwMA/8Y6x6FzN7CnaQ8rob9r6eDhmFoFW73rZVL/jq42rRjq3VFZK+KF0Ss7isxzyrjXWX+qOVA/9xorgGEi51gWQziIYqIjQJ01QX14o6ZP7dXnGLoK/HCbnYKEM1bhMsjjouNvo85f9q3pKwDuH0XYp+B+747tN/UiM6o2MoNhulqMgrQtKU67KjeM84zitsP2a7h7cByM4dvAztrmsyXOTs5k/2ec79Wd3jqNpo/rlKiyw== ARC-Message-Signature: i=2; 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=Ffnkxrkl862jiy8xABWl6Odrq+oKbWfUPuZ/e1jqY6I=; b=ha8CdW2gMqoEfQ4W5Ct4WK5w5443GNqWQjcAqO0jGWzx5J09Mfghu7P9TZz29CujG1CCj4zF72ATUuLZKvmD1xxhFMSYWrOob6Tf3cryXy5xtGSPwVaa4SEIniMCowwAaSQQMR42liTGY0wFuQBc6spwh/lypJa+7DbDdSK6Chp92Q/OB9FQDDGlK7zF19wCEHwoa3o1+O1wSv/Zsxi0zJQVfKprK65fYM1lDp0S9s5GxmF4YKyt24JEbI3nNZpfo0zlO1igrRPKaOv9R/d3Zibd/b1Ut27H6OaKBABoai2yCmzSfT6E1fkUcWfRjGX6ywPaioO4Jd8pmnE+fIPc9A== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) 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=Ffnkxrkl862jiy8xABWl6Odrq+oKbWfUPuZ/e1jqY6I=; b=goKSjM18fedbBfsJclF4W7GL4fecQpJeqHB4dZJC/Yn9+xFTqDpqLT1MLnyw3JA1qmcP5nnTj8Ho+0/2TsusSRLs2gmiezfi1G2Q8kdun8zJmeC7SD0XTJaO6oN8fKO5htsDvDf7MahmbUzsvuzGB6RYJ277c9jxISXU2fKhKA4= Received: from AM6PR04CA0050.eurprd04.prod.outlook.com (2603:10a6:20b:f0::27) by AM8PR08MB6372.eurprd08.prod.outlook.com (2603:10a6:20b:369::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.23; Sat, 13 Jan 2024 15:45:26 +0000 Received: from AM3PEPF00009BA0.eurprd04.prod.outlook.com (2603:10a6:20b:f0:cafe::80) by AM6PR04CA0050.outlook.office365.com (2603:10a6:20b:f0::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.21 via Frontend Transport; Sat, 13 Jan 2024 15:45:26 +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 AM3PEPF00009BA0.mail.protection.outlook.com (10.167.16.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.14 via Frontend Transport; Sat, 13 Jan 2024 15:45:26 +0000 Received: ("Tessian outbound 31df1b57f90c:v228"); Sat, 13 Jan 2024 15:45:26 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 457cdd9b36aeeb40 X-CR-MTA-TID: 64aa7808 Received: from cccf462281f0.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 31E1F29E-4ABB-4861-9BDC-A7DE3564C25E.1; Sat, 13 Jan 2024 15:45:19 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id cccf462281f0.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Sat, 13 Jan 2024 15:45:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VIEHX1LmItkLF4QQ71S0NOtyY7Kc+hKZ5tXf/nWRqWwDP+HZYRFuzwP/iA59+MuqJDhVnVRd4gjKxcUdcXkX9c/Z32M68tb+dC59VjfDH7vXcpYvRI99S5+KtMbg/DvN0T8pCwG3D7MMLwkaTcUiqVpc4k5Hl05DKLigDtzn18BIczfGjyBM96YTYjg2hll2Ly6YzRO6iDvEtwMLOgbQSVRCGCo5wrqBD6YX7Ytj8QUbn4ts9y16duTr3Exb1hwevOQY56QSU8mqtqKMGUwWm+cFyMxw8phRWgExYQw8+TKNi8noMSzvowuQBy6pEpWwE5W5s3BtYfMxlaKHZRGvOQ== 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=Ffnkxrkl862jiy8xABWl6Odrq+oKbWfUPuZ/e1jqY6I=; b=ZxyR4DylHMIYx5uz7DdQ1K913xWFyb2lBW0ctqGExJihP1ZrYevEZJD1JQgkwKmLUl7YfAD3j4rvy/OAl9qAmXevPevL3Yb4A31xBebxYd+U5O3oFIymYD5ZT438a3crTHQJeAnlI7RBRRZ4OKcYnQsAIljWzWUKhYvxmLeF2JtaAKS6gM3lunDs4O0XfPlP6HeGigKgaQEdKSFLAKUYtR4xjiZ6sWn+DM9S5/VnIeXb8nuJm7eaYYmyRS12aankEtIiT54TbrgRWHVrBJpKgEPizpz3E24EMmorkDoKJ5cGJUFohgIehsJwtFTlXYk+FrGYPBoie7+XBizRDWaDWQ== 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=Ffnkxrkl862jiy8xABWl6Odrq+oKbWfUPuZ/e1jqY6I=; b=goKSjM18fedbBfsJclF4W7GL4fecQpJeqHB4dZJC/Yn9+xFTqDpqLT1MLnyw3JA1qmcP5nnTj8Ho+0/2TsusSRLs2gmiezfi1G2Q8kdun8zJmeC7SD0XTJaO6oN8fKO5htsDvDf7MahmbUzsvuzGB6RYJ277c9jxISXU2fKhKA4= 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 DB9PR08MB8484.eurprd08.prod.outlook.com (2603:10a6:10:3d4::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.23; Sat, 13 Jan 2024 15:45:16 +0000 Received: from PAWPR08MB8958.eurprd08.prod.outlook.com ([fe80::48ca:fbcb:84bf:ed17]) by PAWPR08MB8958.eurprd08.prod.outlook.com ([fe80::48ca:fbcb:84bf:ed17%4]) with mapi id 15.20.7181.015; Sat, 13 Jan 2024 15:45:16 +0000 Date: Sat, 13 Jan 2024 15:45:12 +0000 From: Alex Coplan To: gcc-patches@gcc.gnu.org Cc: Richard Sandiford , Kyrylo Tkachov , Richard Earnshaw Subject: [PATCH 3/4] rtl-ssa: Ensure new defs get inserted [PR113070] Message-ID: Content-Disposition: inline X-ClientProxiedBy: LO4P123CA0119.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:192::16) To PAWPR08MB8958.eurprd08.prod.outlook.com (2603:10a6:102:33e::15) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: PAWPR08MB8958:EE_|DB9PR08MB8484:EE_|AM3PEPF00009BA0:EE_|AM8PR08MB6372:EE_ X-MS-Office365-Filtering-Correlation-Id: c94c74de-1fd9-4b70-a99c-08dc144ea97d 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: JF86OLjn+rXONQgdcAT+D1/x2H/4ekBCrCft3M0kQstqMfEfeWvCmvwFe5CSMfugUKZWl8ST2sCxEpWdYptOWfRnMoI5kPbLowitlsGCev44B6uERAn675Ok7gBE9/bmFWtdYQfRT576AYc+vk8h3x6huRFm4FTUaQZozS7ohSDphA1OTOINbAC0hvPuYBj+tRQ2JT5sCzKfDh0kORaqTGZB9sTlHQ/O28EAIoV7HnvZOwhyuC0u8sg4vVDrtk1II0EYOp3uNG4OrxSw6pmFZLWFD/RECshwmInQ1YsQabWr8XYnvnobgLmO7C58mqh3JbJqKDFGNWIHuiH9tu9rMn1YYCucuEIRd9WP5Lgvu+IzTaJx2GnVEXNfAFa39VQW3R3ak8OSjEoidGjVYww0LnTZCNylA4qq1r5GJkisImhJExX1gVvSXLjxcu4zDv2Z2m0G0Mcctn14cvs7jcDSXUeChiVksAdogI6TPT96tLHNbywS+oiFIzzfZ4o++ihwXAXbhJrOPISY1bbHU6SatA9HwBPyplCdc9SVey3mzs9nDmqan/CqfLXZlPJXtffPBIN4tpMnYFpYWLLtu/1nGWy6yFUQ4u0GgcIw1z1nMJM0Sw0vkIKtexGmE0I/WfbS 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)(396003)(366004)(376002)(346002)(136003)(39860400002)(230922051799003)(451199024)(1800799012)(64100799003)(186009)(86362001)(38100700002)(26005)(2616005)(36756003)(83380400001)(6512007)(6506007)(6666004)(316002)(6486002)(33964004)(44144004)(66946007)(54906003)(66556008)(66476007)(6916009)(2906002)(235185007)(44832011)(8676002)(5660300002)(4326008)(478600001)(8936002)(41300700001)(2700100001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB8484 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: AM3PEPF00009BA0.eurprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 96eeff1a-7840-4036-55c1-08dc144ea3c4 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zuLwdCOw1W2R0SrZc2ppRCl4aeoTDWPUBjmTy7Hy4uHP5P8Nc/Z8RGFmkF4rxd1lc8X83xYLo2dZSY49xNVt30GcK94hCs9H/ZuXY6b/AZqRGC2TrKOWPpjD1PxmrYiFxGafFI7Y0vz6fwzs46SudrbuIXKfMNqwMJKstHxuYMyxitX7ltmMnMOkUCDlNMh5vsDM7xFTxO/XmZgYuOiAtyflddb8kgs0gUepZr5WlXX6G3anmAW5ICJSgtPwyCONDwNcz1Hl2Tz6I4GcOK0FMZNK9KnvBxfFlOrZ1nfRBPVaxcp+8GvwJbdwO0RfpR5SeCExeqFZTYbv4dIpwSj/QvTJ0ctyI4YsRelSZ215jt7w9l9lgIYD/Q40bWdJg9rUbDGG7r8kB/DEK2nY2GQ/flSncptYzYXGgJgpIko3B/AVcaESCtbh+isRuh6nbQ7mKTkQHLarDWZO1LnKWbtPAI2ccVLqX1VRJB4UYIv6B8cd3ipHEtm0XF9namDpz6cAa6xRV6q9Wi1i9YvKB+mVLRu+4NsAxY3+Q/oa1lSIkX3C0wxtY39Xu728Xo7OGGXJAFwFptA6XViIB2y6OrY379KLQmZFCFDq1nBaCswyAipMooPT+bL9gnHBwIv1cvBAZ73jr3uOhXCxbpDFrtxhO1AVjkxjRkLlaTWlliWAzZ889e08MGDLY6MXiuoQiPyxqENXz7h3GBj5Wfs6T3QYawg2tQPUcu0vnpdf2v4yIqxU/5j8j9IjVZpM5pmoCcLd1Ld0UwWEyKP1lygoZ22SwA== 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)(346002)(39860400002)(376002)(396003)(136003)(230922051799003)(1800799012)(451199024)(82310400011)(64100799003)(186009)(36840700001)(40470700004)(46966006)(356005)(81166007)(82740400003)(36756003)(40460700003)(40480700001)(86362001)(336012)(26005)(83380400001)(36860700001)(41300700001)(6512007)(70206006)(54906003)(70586007)(316002)(44144004)(33964004)(6666004)(2616005)(6506007)(47076005)(478600001)(6916009)(6486002)(2906002)(5660300002)(44832011)(4326008)(235185007)(8936002)(8676002)(2700100001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2024 15:45:26.2732 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c94c74de-1fd9-4b70-a99c-08dc144ea97d 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: AM3PEPF00009BA0.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR08MB6372 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, T_SCC_BODY_TEXT_LINE, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787990662448320112 X-GMAIL-MSGID: 1787990662448320112 In r14-5820-ga49befbd2c783e751dc2110b544fe540eb7e33eb I added support to RTL-SSA for inserting new insns, which included support for users creating new defs. However, I missed that apply_changes_to_insn needed updating to ensure that the new defs actually got inserted into the main def chain. This meant that when the aarch64 ldp/stp pass inserted a new stp insn, the stp would just get skipped over during subsequent alias analysis, as its def never got inserted into the memory def chain. This (unsurprisingly) led to wrong code. This patch fixes the issue by ensuring new user-created defs get inserted. I would have preferred to have used a flag internal to the defs instead of a separate data structure to keep track of them, but since machine_mode increased to 16 bits we're already at 64 bits in access_info, and we can't really reuse m_is_temp as the logic in finalize_new_accesses requires it to get cleared. Bootstrapped/regtested as a series on aarch64-linux-gnu, OK for trunk? Thanks, Alex gcc/ChangeLog: PR target/113070 * rtl-ssa.h: Include hash-set.h. * rtl-ssa/changes.cc (function_info::finalize_new_accesses): Add new_sets parameter and use it to keep track of new user-created sets. (function_info::apply_changes_to_insn): Also call add_def on new sets. (function_info::change_insns): Add hash_set to keep track of new user-created defs. Plumb it through. * rtl-ssa/functions.h: Add hash_set parameter to finalize_new_accesses and apply_changes_to_insn. --- gcc/rtl-ssa.h | 1 + gcc/rtl-ssa/changes.cc | 28 +++++++++++++++++++++------- gcc/rtl-ssa/functions.h | 6 ++++-- 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/gcc/rtl-ssa.h b/gcc/rtl-ssa.h index f0cf656f5ac..17337639ae8 100644 --- a/gcc/rtl-ssa.h +++ b/gcc/rtl-ssa.h @@ -50,6 +50,7 @@ #include "mux-utils.h" #include "rtlanal.h" #include "cfgbuild.h" +#include "hash-set.h" // Provides the global crtl->ssa. #include "memmodel.h" diff --git a/gcc/rtl-ssa/changes.cc b/gcc/rtl-ssa/changes.cc index ce51d6ccd8d..6119ec3535b 100644 --- a/gcc/rtl-ssa/changes.cc +++ b/gcc/rtl-ssa/changes.cc @@ -429,7 +429,8 @@ update_insn_in_place (insn_change &change) // POS gives the final position of INSN, which hasn't yet been moved into // place. void -function_info::finalize_new_accesses (insn_change &change, insn_info *pos) +function_info::finalize_new_accesses (insn_change &change, insn_info *pos, + hash_set &new_sets) { insn_info *insn = change.insn (); @@ -465,6 +466,12 @@ function_info::finalize_new_accesses (insn_change &change, insn_info *pos) // later in case we see a second write to the same resource. def_info *perm_def = allocate (change.insn (), def->resource ()); + + // Keep track of the new set so we remember to add it to the + // def chain later. + if (new_sets.add (perm_def)) + gcc_unreachable (); // We shouldn't see duplicates here. + def->set_last_def (perm_def); def = perm_def; } @@ -647,7 +654,8 @@ function_info::finalize_new_accesses (insn_change &change, insn_info *pos) // Copy information from CHANGE to its underlying insn_info, given that // the insn_info has already been placed appropriately. void -function_info::apply_changes_to_insn (insn_change &change) +function_info::apply_changes_to_insn (insn_change &change, + hash_set &new_sets) { insn_info *insn = change.insn (); if (change.is_deletion ()) @@ -659,10 +667,11 @@ function_info::apply_changes_to_insn (insn_change &change) // Copy the cost. insn->set_cost (change.new_cost); - // Add all clobbers. Sets and call clobbers never move relative to - // other definitions, so are OK as-is. + // Add all clobbers and newly-created sets. Existing sets and call + // clobbers never move relative to other definitions, so are OK as-is. for (def_info *def : change.new_defs) - if (is_a (def) && !def->is_call_clobber ()) + if ((is_a (def) && !def->is_call_clobber ()) + || (is_a (def) && new_sets.contains (def))) add_def (def); // Add all uses, now that their position is final. @@ -793,6 +802,10 @@ function_info::change_insns (array_slice changes) placeholders[i] = placeholder; } + // We need to keep track of newly-added sets as these need adding to + // the def chain later. + hash_set new_sets; + // Finalize the new list of accesses for each change. Don't install them yet, // so that we still have access to the old lists below. // @@ -806,7 +819,8 @@ function_info::change_insns (array_slice changes) insn_info *placeholder = placeholders[i]; if (!change.is_deletion ()) finalize_new_accesses (change, - placeholder ? placeholder : change.insn ()); + placeholder ? placeholder : change.insn (), + new_sets); } // Remove all definitions that are no longer needed. After the above, @@ -861,7 +875,7 @@ function_info::change_insns (array_slice changes) // Apply the changes to the underlying insn_infos. for (insn_change *change : changes) - apply_changes_to_insn (*change); + apply_changes_to_insn (*change, new_sets); // Now that the insns and accesses are up to date, add any REG_UNUSED notes. for (insn_change *change : changes) diff --git a/gcc/rtl-ssa/functions.h b/gcc/rtl-ssa/functions.h index 962180e27d6..4573453d896 100644 --- a/gcc/rtl-ssa/functions.h +++ b/gcc/rtl-ssa/functions.h @@ -299,8 +299,10 @@ private: void process_uses_of_deleted_def (set_info *); insn_info *add_placeholder_after (insn_info *); void possibly_queue_changes (insn_change &); - void finalize_new_accesses (insn_change &, insn_info *); - void apply_changes_to_insn (insn_change &); + void finalize_new_accesses (insn_change &, insn_info *, + hash_set &); + void apply_changes_to_insn (insn_change &, + hash_set &); void init_function_data (); void calculate_potential_phi_regs (build_info &);