From patchwork Tue Oct 17 20:48:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Coplan X-Patchwork-Id: 154528 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp4390521vqb; Tue, 17 Oct 2023 13:49:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFdfnfTXKbM36EXudfpzztLF1W64PQ9M0xSJA0L+nUQQcaIwJ4sJQjrwDId80gY518rMcpy X-Received: by 2002:a81:a0d5:0:b0:59b:d3cd:ffb6 with SMTP id x204-20020a81a0d5000000b0059bd3cdffb6mr3363778ywg.33.1697575747520; Tue, 17 Oct 2023 13:49:07 -0700 (PDT) Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id ay14-20020a05620a178e00b00778916b8652si280250qkb.536.2023.10.17.13.49.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 13:49:07 -0700 (PDT) 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=ZrpZd3pa; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=ZrpZd3pa; arc=fail (previous hop failed); 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 4A82C3857009 for ; Tue, 17 Oct 2023 20:49:07 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2067.outbound.protection.outlook.com [40.107.104.67]) by sourceware.org (Postfix) with ESMTPS id 2D53C3857BB3 for ; Tue, 17 Oct 2023 20:48:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2D53C3857BB3 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 2D53C3857BB3 Authentication-Results: server2.sourceware.org; arc=fail smtp.remote-ip=40.107.104.67 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1697575723; cv=fail; b=TI8iaJDyH3ydO3UmTaRIWLBsfnGZayDg3aMTBKBr5Fl++ASbjA25xhx7s0+i3u0t0f5Pu8H8ZFpr0oP8tWDOiNlA6hmovim7EnDdIMVzuCFxkNZPjK17SsItJDezT4zwUyrOZeIaG0eUvFC/qpK1dH4zPL+glddymOTg088nW+4= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1697575723; c=relaxed/simple; bh=NunMRrwsKJ9PosP4V5xzYtlZb2PMuX2QiDp7wcliAcY=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=GKRc5uqzyC1lk6+221VYvb7a4436RZtA/zeCsWNaqZgH/57tAEhvkWjpg7DvmSgYBSqSx32V9JqqxeF2OUIs6GW9g85HNB/LYBYL93sH4W8/VkMRC1/GXZ80QLbqG01d1Ho14Oha4fMUg2QlWv9mDlhPBlDginOoFX6EBMqM6mg= 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=EiGSnuIdyfhyJA1/f/H+qV0nbJ2QWMD685AKEaoe9/c=; b=ZrpZd3pabgWzqQMZI8gQTjUynWFpA4COf42enW2l2lFDgsq4/RxEFSRVX+aPCgiWf8X3mL5544ejSfipWXQ2ZXyJoSRwbnWDMfzNXsclxbaB01xHLKq2918DVVhplImcp+Hrc1XlPwF3Hu43zGfxUE5CPBHy1q61QpXxdFOk/cg= Received: from AS4P195CA0003.EURP195.PROD.OUTLOOK.COM (2603:10a6:20b:5e2::9) by AS8PR08MB6408.eurprd08.prod.outlook.com (2603:10a6:20b:33a::22) 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:48:35 +0000 Received: from AM7EUR03FT057.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:5e2:cafe::80) by AS4P195CA0003.outlook.office365.com (2603:10a6:20b:5e2::9) 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:48:35 +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 AM7EUR03FT057.mail.protection.outlook.com (100.127.140.117) 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:48:35 +0000 Received: ("Tessian outbound 6d14f3380669:v211"); Tue, 17 Oct 2023 20:48:35 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: cfc8f3eeddd474df X-CR-MTA-TID: 64aa7808 Received: from 6713bd85f0e5.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 34E5699F-89A8-4F3F-9DCF-6761C2057062.1; Tue, 17 Oct 2023 20:48:23 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 6713bd85f0e5.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 17 Oct 2023 20:48:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n+kCduwUzAhKT8FtgRBpcFHcHrt2QVVQJx2wQyc77DRHscvP5tBvnA+HOin2MSD4X6kyxxUISqMgSpChGr+PpDQ90khpWgdjhftJdcUpvEBFuAI1945Em0OtOqMWRbsqs8OKpzzWzP4TiSD58MWsRYVMMDLFv+uJYxp0ySQz7vgVkOj4yS3RE3dnZ/IFyx70VWKOeh/8t7qL3O0UzmIJG3XST03v/91Mf65V65tkojDehNW+Q56saPUT29nesNtAqNOOjtStnG1LI3e0PCYP/LH4R1ylMRZVooqRFbarJy/lC+DNqY4nMsMRVA8IRKHgNbOCFz1fmmNpuwxJceGPOQ== 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=EiGSnuIdyfhyJA1/f/H+qV0nbJ2QWMD685AKEaoe9/c=; b=BzfSen2Cw0Aee2E87bWv0mZ06I0O5kbppDc4oVTD52nKJqravKZz/4nw6Kiha4xV0nUS98c07dC/uM3byhFNQLurB1F/Iog6MrrwI44EWfe26FBXikZObj0K1qQ8d8KNftn+DRfGcEEAcn28fTvU1mN/AkLZOLcUyYoeAGHkG6v+DlzVwgcKOCep3Eox4R2HshHyE6hNTxArvtGTfN9VkatOn/so3OHlxJ3jGJkEDnUj6X4r9uyw5VFJImCUowATK+PNhQ8YMgPljfGZW2ZewBfIK7t8cwbOS5oYGhOOrYJ0dQQ/DVu4U071yXvw7e76j/rfxg7hpacuBGLK7uL0kg== 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=EiGSnuIdyfhyJA1/f/H+qV0nbJ2QWMD685AKEaoe9/c=; b=ZrpZd3pabgWzqQMZI8gQTjUynWFpA4COf42enW2l2lFDgsq4/RxEFSRVX+aPCgiWf8X3mL5544ejSfipWXQ2ZXyJoSRwbnWDMfzNXsclxbaB01xHLKq2918DVVhplImcp+Hrc1XlPwF3Hu43zGfxUE5CPBHy1q61QpXxdFOk/cg= 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:48:21 +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:48:21 +0000 Date: Tue, 17 Oct 2023 21:48:19 +0100 From: Alex Coplan To: gcc-patches@gcc.gnu.org Cc: Richard Sandiford , Jim Wilson , Michael Meissner , Jeff Law , Vladimir Makarov Subject: [PATCH 06/11] haifa-sched: Allow for NOTE_INSN_DELETED at start of epilogue Message-ID: Content-Disposition: inline X-ClientProxiedBy: LNXP265CA0016.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:5e::28) To PAWPR08MB8958.eurprd08.prod.outlook.com (2603:10a6:102:33e::15) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: PAWPR08MB8958:EE_|AS4PR08MB7580:EE_|AM7EUR03FT057:EE_|AS8PR08MB6408:EE_ X-MS-Office365-Filtering-Correlation-Id: b8abf9a0-5280-4636-9f7c-08dbcf526ea6 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: 3B2TPowI2+UssPL6aagD4382i2bsJ5BsfAp0+T25raYEDU3aiDcFuAy5SW5n7/kJwa5Ty0oJJroyZ1jqJDDlZEEGkRvKS5+iU9UhpWYOhbMsW7H9k+4UUYcUBddfrLajlvdHyxYRe6GH60XzPLXkxEHN1biSuTDa/Hf+puylmjrz9qzux4Spx0iDQJsdTIUUgrY1A6PXL/1qMBiKxiNXBnoj82lmahrCyNRUImH7nDIZl+XaJKtgm+jRMdPJ5L1uHMWy+mRHWR++VGmAoFKsvP41VgDO9zEqpfJa0bH58lc5bEcqwvZ17zfWPkG5VUkHiANTRBROZHVXrAkiKJ6rEboJjWJQc2p+HwJjYKGoLfe4Io39DCVzlQBVYCYwPjuTQErU+tBHU0t+bUWXdO8VqV8XxZpcuxQK2N4Hn3ZfXJTxdQOAQr1f7NDExh1pAfvcrxfx0GYADpnZeiccXNj4F1gGGttsYhiuh2BhPprapEqWhAjQRw/X88CX8pR69fm4HX9tOHszi4cavxjOgr9xQl5FOSU9IosG4ZS7ebWkKrBKqoNDSPDJypGQTohcNQDeNecJ4r45xchJr5JK0Pde2Jp/TEEJrziJaP7bouFLqnlWnMkyFk1fTl7Ax8Y6ZbwSnuzqx1DTETqWG49Gzs9vJQ== 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)(54906003)(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)(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: AM7EUR03FT057.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: cd1cdce9-953e-4905-e45d-08dbcf526669 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SQa8hxq7ImVObIzcHVWeTdheJ24xZnx8b5V3772vub4elfhw8lA8rXcLfw3Jx4VFe129T3ssb0TdzuohkbjjeRPci61Orcud8chhEMAi2LwVpoz2lE3bqpl2DJeJsIt6TrKYMJn/Hjf+QhgG0zc/Xd4vEdP8B1QoCB3HRisYfl5VGxJmY+Ap5Gs56iq+uDNW6ZCPbgxRUYZJ481Pf8MKVOizZYbK2lEdfalHyrkwBQbOPc1WBGwTaaU1TMHMqYgI6GhotJK6MZ2Px9cU595KS7oamCPYK56pXhFQSoSAqPPuyrugixW/YY0BvMuqhGFLxj/VyrW3CFQdV4j5THunJ5vphEPkuaSYIGRejjFersb3ZvVGlXOxaho2eCes9aHDxeDOmR/HnBSgIuODj/gnNh/7RzOlM/IgBgAY+d+OUVAUHUJfZoRU8uxwcai9UOzv2UcufnQlKJTP9KqgXCejlwTRIRiAMEo3mjCg0m0JqCL3KM//Jz4tjtfVvFRhpF4LvSiuUZAcz3E81fVH+bC187+Z7hsZxDm24kRAHZycAAbKkH7WdU6UG75HvKcehldHr66cMJ+tMqVIjZLB1l/3NfY/WirGKKECgjTGr/JbyZOC2c2vOoi4NRkv73AspEvzuKgJHbEMid9LupuJiWVh4Ev/YPmr3nejBB5gQtB+RBmr95g3WVtQfe18d3FipW73KtfthaukVFEr5wOpVsWwhy3WkEJW9XmKh8XzbYJcvlu19+tupxo6KEDt13nU7DHKVdpzUx35lz102tm4+Je9Aa28JXp8zpk65HXF66YEGX8= 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)(346002)(136003)(396003)(39860400002)(230922051799003)(1800799009)(451199024)(82310400011)(64100799003)(186009)(40470700004)(36840700001)(46966006)(82740400003)(235185007)(356005)(81166007)(40460700003)(4326008)(8936002)(8676002)(41300700001)(44832011)(5660300002)(86362001)(2906002)(40480700001)(6506007)(33964004)(44144004)(478600001)(6486002)(47076005)(6512007)(107886003)(336012)(36756003)(2616005)(83380400001)(26005)(54906003)(6916009)(70586007)(70206006)(36860700001)(316002)(67856001)(2700100001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Oct 2023 20:48:35.3113 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b8abf9a0-5280-4636-9f7c-08dbcf526ea6 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: AM7EUR03FT057.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6408 X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_DMARC_NONE, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, 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 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: 1780037186806241106 X-GMAIL-MSGID: 1780037186806241106 haifa-sched.cc:remove_notes asserts that it lands on a real (non-note) insn after advancing past NOTE_INSN_EPILOGUE_BEG, but with the upcoming post-RA aarch64 load pair pass enabled, we can land on NOTE_INSN_DELETED. This patch adjusts remove_notes to remove these if they occur at the start of the epilogue instead of asserting. Bootstrapped/regtested as a series on aarch64-linux-gnu, OK for trunk? gcc/ChangeLog: * haifa-sched.cc (remove_notes): Allow for NOTE_INSN_DELETED at the start of the epilgoue, remove these. --- gcc/haifa-sched.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gcc/haifa-sched.cc b/gcc/haifa-sched.cc index 8e8add709b3..9f45528fbe9 100644 --- a/gcc/haifa-sched.cc +++ b/gcc/haifa-sched.cc @@ -4249,6 +4249,17 @@ remove_notes (rtx_insn *head, rtx_insn *tail) && NOTE_KIND (next) == NOTE_INSN_BASIC_BLOCK && next != next_tail) next = NEXT_INSN (next); + + /* Skip over any NOTE_INSN_DELETED at the start of the epilogue. + */ + while (NOTE_P (next) + && NOTE_KIND (next) == NOTE_INSN_DELETED) + { + auto tmp = NEXT_INSN (next); + delete_insn (next); + next = tmp; + } + gcc_assert (INSN_P (next)); add_reg_note (next, REG_SAVE_NOTE, GEN_INT (NOTE_INSN_EPILOGUE_BEG));