Message ID | 0612833c-daa9-4008-a376-07fb81d80811@arm.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 3B87038708DD for <patchwork@sourceware.org>; Thu, 1 Feb 2024 16:27:17 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2076.outbound.protection.outlook.com [40.107.21.76]) by sourceware.org (Postfix) with ESMTPS id DD7F6386C5A7 for <gcc-patches@gcc.gnu.org>; Thu, 1 Feb 2024 16:25:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DD7F6386C5A7 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 DD7F6386C5A7 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.21.76 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1706804754; cv=pass; b=A4L1y3UlMys/HqQDL5DABG6E5zPXG+/EFpFZgigPsMEoHsJTJAanyw6nmHToioQZFxqkO6nF75C3lmLGDyMocXByKKOqqWHmxFvOeZ4kRbl9Eu9JoLB92yEYfJjXPz57zrerp4LilqgnaODLuEVvrxlpeZdIv44J4wGm1WoqRps= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1706804754; c=relaxed/simple; bh=W2GMALICPnzgbDTkEbRU3Qqk7UalWsiC3NrlpiNE9mE=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:To:From:Subject: MIME-Version; b=VIJxLaekfmhJYwHWRGX9uG/otCUzXbh2XcOsO8tqHociCbUCIy9B4AL7Z491Lti+aXkLu8Fk+K/wpFi9DTgmNbmkOIIwAa6kwddg6LjqirgtG3smEDOeYYzOaIjN+HqmNFc7gMiKcmB2AgVC+E+1BFAT8kml62Evre2/oB4rZKk= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=MaQD800UNNroJxoNeZzQOHTxSWpilVG9i1sgvIs7uab5ZQV52S/Y4LPsNX1g0VWGP4x1ID850JZBA2b/um2fRCyY5CRMYDJGYXPFBo2UFpityOay02HQsiruyb2vkOkhaNOPMWqZUnMQdwxwkMqNWPxvmqopPCoxcr8gA5At+DVbT7blWNrIhY0euVmeGPf8E8hpBNjiwzfwUjmsGIMZla2QzQoGyOEZDqXVBty4n3bzINGfgSl23VhHwLwRDJGCIHiH9Lqbh/81W8Xe5qcgBHPsHEMvMRNs6KlZPmGYfxG6zUrrNNcHCSCPMvoqD+FSuvyRBSQKFMozOziGOIlbkA== 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=BBFD8JyEFF/Z63WCT5lji8raomVFkpt08GRbCoo0ZOw=; b=FSXtEM5UbVK55G2LETQenZd2f7/Bi74V/iFrSBO2z24FORcvqgUGsZxWy40kBY+nuR8rQZuoil53TtY6pPopIp6JFo/5/ew8d6VwrMRFL6+qDX2FrX3B8Hrtxf2K881qt+2zz8lOC2dxrgdi69rgu3NY0/dTbvem28wZtDCJRyt2H1V773B4fOKI6NpkNJLbBuZIdzbhcFHRLqlcWzwwvonNkD0RWfsbe4WD4l/zKI2qcqdjBsfpz7rYBDYt8ad43gqvBCocF6y4gTtxHysBjAGW82+5MHnd5YCKiRWhPx0kdZfzUGyo+UYgqe+7Kx52AKwXNgdPs1aqZlKM0dCY6g== 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=BBFD8JyEFF/Z63WCT5lji8raomVFkpt08GRbCoo0ZOw=; b=HLxeqojHr3MWZdjHu5rkdqzl6Rq6ijdxN6s6cHJtXLhwm5GjyyYjYCxWhsUx3JM75LPttftQhc2pp4LUuW4vBlyEmxjN/HTUoHPYzdw4DVu4g9WfeQOGdr3HQRKz8qYlbBm5Nv3NtFSleGqAzaXrSvwlaGCp+3bjdsyDETmyj+4= Received: from DB9PR01CA0017.eurprd01.prod.exchangelabs.com (2603:10a6:10:1d8::22) by PAVPR08MB9281.eurprd08.prod.outlook.com (2603:10a6:102:306::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.26; Thu, 1 Feb 2024 16:25:43 +0000 Received: from DB5PEPF00014B90.eurprd02.prod.outlook.com (2603:10a6:10:1d8:cafe::8a) by DB9PR01CA0017.outlook.office365.com (2603:10a6:10:1d8::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.24 via Frontend Transport; Thu, 1 Feb 2024 16:25:43 +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 DB5PEPF00014B90.mail.protection.outlook.com (10.167.8.228) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.19 via Frontend Transport; Thu, 1 Feb 2024 16:25:43 +0000 Received: ("Tessian outbound 94d82ba85b1d:v228"); Thu, 01 Feb 2024 16:25:43 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: a108bc057d02ba2f X-CR-MTA-TID: 64aa7808 Received: from 1c0c6821819a.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 8B0750EB-54B0-42A0-BC5B-7BD9A2C1ABCE.1; Thu, 01 Feb 2024 16:25:36 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 1c0c6821819a.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 01 Feb 2024 16:25:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IJDWBtBk7JaTA4xgjdCX/g9qvrkgPz0fyTtiG8817QhrGIaZ49B5Aw7VThmO1jNwpuQTWhL+5UZvgmLDiVDR9LR4LfVsBP+85tV+VVLf1OAwYyKOoRhz4kJ9rDmUURZQd6dV+FClIynqZfKyU4UuOV2+56/MltyFFbs63G1pE1cjW4A6IH8Ctm3Tvh1YizO1FUoubBShB1J5Hq+EWd4OxQa6TLJWAs1nOqk1LVNlOsAgfnuqCGttyJRGiCj9yuyHavykG/CUBotlmBnlD7hspjwZxRjsv69+Jfl4KtbPOrCrGcY0/CIozZSWW1vgwwHHPHj1Ne1zHp7Ee8espyBTGA== 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=BBFD8JyEFF/Z63WCT5lji8raomVFkpt08GRbCoo0ZOw=; b=W3ZOy+RwJwduQt65lW6dI6GVxTgALvJiJ1XUgxyr0p9ENO21iYcYjJU12cgYwmD0qI+0iLSOhi1A6LobtXiqi07bHGqbfoCVSmvYf3R4efOnYmRwY3wxG43M3FJgmzWt/iOtrkwTw7CTqjs+yQeIrvKhxRjfhXESBvWwDO3EV7U2xpEs8eXykSqSA7t3EQ/VHZNnA+09tF4M7S1jg0MZLhdVco6PLh5nXEYYPRNbB1mBvSMrWIc3LwjaJt8f0AIYCAvvFrSgyenCj/nhwcH0k+JWlKUihCGdZX7WkFrDW5qUWGxF/PivJy0/N5Ytmo39XmbUz9oCdcaBcokxnc/1bQ== 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=BBFD8JyEFF/Z63WCT5lji8raomVFkpt08GRbCoo0ZOw=; b=HLxeqojHr3MWZdjHu5rkdqzl6Rq6ijdxN6s6cHJtXLhwm5GjyyYjYCxWhsUx3JM75LPttftQhc2pp4LUuW4vBlyEmxjN/HTUoHPYzdw4DVu4g9WfeQOGdr3HQRKz8qYlbBm5Nv3NtFSleGqAzaXrSvwlaGCp+3bjdsyDETmyj+4= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from DB9PR08MB6957.eurprd08.prod.outlook.com (2603:10a6:10:2bc::10) by DU2PR08MB10086.eurprd08.prod.outlook.com (2603:10a6:10:46e::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.34; Thu, 1 Feb 2024 16:25:34 +0000 Received: from DB9PR08MB6957.eurprd08.prod.outlook.com ([fe80::d8c3:56c4:5b0c:b427]) by DB9PR08MB6957.eurprd08.prod.outlook.com ([fe80::d8c3:56c4:5b0c:b427%6]) with mapi id 15.20.7249.023; Thu, 1 Feb 2024 16:25:34 +0000 Content-Type: multipart/mixed; boundary="------------8EeEJFuFJSwH0fbnoswAfMNw" Message-ID: <0612833c-daa9-4008-a376-07fb81d80811@arm.com> Date: Thu, 1 Feb 2024 16:25:29 +0000 User-Agent: Mozilla Thunderbird Content-Language: en-US To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>, Richard Earnshaw <Richard.Earnshaw@arm.com>, Richard Sandiford <Richard.Sandiford@arm.com>, Marcus Shawcroft <Marcus.Shawcroft@arm.com> From: Richard Ball <richard.ball@arm.com> Subject: [PATCH] aarch64: Fix ACLE SME streaming mode error in neon-sve-bridge X-ClientProxiedBy: LO4P123CA0054.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:152::23) To DB9PR08MB6957.eurprd08.prod.outlook.com (2603:10a6:10:2bc::10) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: DB9PR08MB6957:EE_|DU2PR08MB10086:EE_|DB5PEPF00014B90:EE_|PAVPR08MB9281:EE_ X-MS-Office365-Filtering-Correlation-Id: d087e4c3-3924-42e8-a92a-08dc23426ff6 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: /8OwsqMm0qJQxotpYcJgnrd5y2JaOs4eXcnp3mX512EgQDHgVZPW8+83k7JSOu/o6yKdMV6YRT9Su7YN0yU0pwF+NXMQOwIBRNjpjW+PUbFtbs4T46kCcWQuWU+ype7V4ZKd/6Bl7uzTcW9ZXKxSurC1znS7CzPR87NbMGvzgLInaaOuL/UYtPofgzay33sRSjkGMgGjNVsJQVqrb8tkKxL1UACAh9M4f5ItEJbZeqddPGM8W6jbyug/QgF5H6fCgbY1wFtv6Da7/wPdsF/FrRvLKLhEbj8WAuWxLqd8/mYQIqHxPixuCFlDajNAHwPIc/rrM3c+B2n0nVWHKVKKd3OLtuYmKzDQ5SptJxczFvhalzd+TLSWYoSG5U0VLjrUzxYOKcJ/n/nxMJC0JJHDb5N9Xz72Zwf4aNTgyJ00qlX6P2aD1JLVESUfEpcIeF7NoVrhoQBWr4e2ee9uOtHg3cnWKAmOlWUeeDGYU2S7oR3nfj255w+htMegUXq9dbVFXzkcmROH3nVZ2Ivj0tJ9cofvZIJh7yTbf73AsHgQrdLHFhLTXJ2lbJS+ulwm33Y7EfioMt/7T9K0vYQGwyN+HQms0f+ZHqmRyEsZFAIfyGtShVXT23LNf056jp4t12Q+ra4bx0pJ8puN1hRx+dR61Q== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB9PR08MB6957.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(396003)(136003)(346002)(366004)(376002)(39850400004)(230922051799003)(186009)(1800799012)(64100799003)(451199024)(41300700001)(2616005)(31686004)(6506007)(36756003)(66946007)(6486002)(83380400001)(478600001)(6666004)(6512007)(26005)(33964004)(38100700002)(6636002)(235185007)(2906002)(66476007)(31696002)(110136005)(8936002)(86362001)(44832011)(316002)(66556008)(5660300002)(8676002)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR08MB10086 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: DB5PEPF00014B90.eurprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: cef2ebd7-965d-442f-82fb-08dc23426a2c X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Kuc6QVG/8kbzWMgBs5N9wMObuPTYFSQLhTmKDwO6lqsgOqDkehkLbStrCzVVRnNT5cm+HBp2gfQsNg18bIo988ygOwGuMjWY6xXP1Wlye+LUDGEe71tTUB3xWyW8qwLdDNTWpX/QTK8oI41mohh4Bm0QZeUKxQca+ZtX+Xjnq4EwlP8Bz6fid7XnJqMjHKpi7TEkmmXDAyj6gkrGqmnXYi0JkszBpSGPvQ06c5mx5GiDXphzBssfC5VicdDimDn+SwUcqMB++k/BPDcThWzx8VLrOwN9xBQ4K0MhBPzFD+srZxZ4aqJ7rsFhnt4Fnv9f1XQjozxC/4wq9UEYVIgvi2zTA/A1wfnKtEonCCrYArdgUStI3wBHf+evoZHTAA61XX77urPe3iFKGz5GUwDkBN6ZPysvbTg8jiwIGbPcXa9OqU92aPjXtULeuda6O2LuX7EVX6gHhHuNArk8KMVAot/SUfy1SZFBvTfNzu5PoXKzNE9V81biixvXj3re8AoPXYP5i+AQu0ncG23w3m211O7mj8rM9OqwvfvIa6aACl922/IxWb/NZbLaccFCHbvU3cuk9spMz5Qb3PwFrW11QMPhxNgcoVmNFh30FfkehVmJ9BE8JE/3glptJmMFFTeZPoNW1Aqc+8bZ7XlsccHyevJTDnH9SwB/E1Xo5FmviZh9FSYHInEE1xQ9/66uNgnRvV7tE4NiBZR9a6PjMmYyFA/Lr0cGQj70weynMFt7JUaj1/tbbrCOKbb2wyLH72QukLtceskid6MD4RDoGU9BLA== 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)(136003)(39860400002)(396003)(376002)(346002)(230922051799003)(451199024)(82310400011)(186009)(64100799003)(1800799012)(36840700001)(46966006)(40470700004)(5660300002)(235185007)(478600001)(33964004)(6512007)(6666004)(70586007)(31696002)(86362001)(6506007)(36756003)(110136005)(8676002)(316002)(6486002)(47076005)(70206006)(8936002)(6636002)(82740400003)(36860700001)(2616005)(336012)(26005)(41300700001)(356005)(81166007)(83380400001)(44832011)(31686004)(2906002)(40460700003)(40480700001)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Feb 2024 16:25:43.3017 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d087e4c3-3924-42e8-a92a-08dc23426ff6 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: DB5PEPF00014B90.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR08MB9281 X-Spam-Status: No, score=-11.8 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 <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 |
aarch64: Fix ACLE SME streaming mode error in neon-sve-bridge
|
|
Checks
Context | Check | Description |
---|---|---|
linaro-tcwg-bot/tcwg_gcc_build--master-arm | success | Testing passed |
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 | success | Testing passed |
linaro-tcwg-bot/tcwg_gcc_check--master-arm | success | Testing passed |
linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 | success | Testing passed |
Commit Message
Richard Ball
Feb. 1, 2024, 4:25 p.m. UTC
When using LTO, handling the pragma for sme before the pragma for the neon-sve-bridge caused the following error on svset_neonq, in the neon-sve-bridge.c test. error: ACLE function '0' can only be called when SME streaming mode is enabled. Handling the pragmas the other way around fixes this. No regressions on aarch64-none-elf. gcc/ChangeLog: * config/aarch64/aarch64-sve-builtins.cc (init_builtins): Re-order handle pragma functions for lto.
Comments
Richard Ball <richard.ball@arm.com> writes: > When using LTO, handling the pragma for sme before the pragma > for the neon-sve-bridge caused the following error on svset_neonq, > in the neon-sve-bridge.c test. > > error: ACLE function '0' can only be called when SME streaming mode is enabled. > > Handling the pragmas the other way around fixes this. Why is that the right fix though? And where did the weird function name in the error message come from? Trying it locally, I think the patch works for the testcase because it mimics the testcase's particular include order. But the patch regresses LTO for: #include <arm_sme.h> int main (void) { __builtin_printf ("%d\n", (int) svcntsb ()); return 0; } because the handle_*() calls no longer match the arm_sme.h include order. I guess this is where assigning dynamic ids breaks down. It worked well for one header file, and arguably for two (given that one required the other). But now we need a slightly different approach. Some ideas for fixes: (1) Treat arm_neon_sve_bridge.h and arm_sme.h as separate enums in aarch64_builtin_class. (2) Subdivide AARCH64_BUILTIN_SVE internally within arm_sve.h into arm_sve.h, arm_neon_sve_bridge.h and arm_sme.h, using the low 2 bits of the function code. (3) Manually reserve a number of functions for each header file and assert that the reserved number is big enough. So arm_sve.h function codes would start at 0, arm_sme.h at N (for some "nice" N that is bigger than the number of functions in arm_sve.h), and arm_neon_sve_bridge.h at N+M, etc. (4) Like (3), but continue to maintain ids dynamically. Have a way of cycling through all the functions in a header file *without* declaring them, and just pushing nulls to registered_functions instead. I think (1) goes against the current design, since aarch64_builtin_class really selects a framework rather than a header file. (2) would mean maintaining separate datastructures for each header file. (3) could be wasteful, since we'd either have padding elements in registered_functions, or we'd need to convert registered_functions to some other datastructure. So I'm leaning towards (4). Thanks, Richard > > No regressions on aarch64-none-elf. > > > gcc/ChangeLog: > > * config/aarch64/aarch64-sve-builtins.cc (init_builtins): > Re-order handle pragma functions for lto. > > diff --git a/gcc/config/aarch64/aarch64-sve-builtins.cc b/gcc/config/aarch64/aarch64-sve-builtins.cc > index c2f1486315f02c3e38f808b3124a9b4cf49a4708..10f1df233ca9ae4e4a639a45a25db1f055a7d7c3 100644 > --- a/gcc/config/aarch64/aarch64-sve-builtins.cc > +++ b/gcc/config/aarch64/aarch64-sve-builtins.cc > @@ -4511,8 +4511,8 @@ init_builtins () > if (in_lto_p) > { > handle_arm_sve_h (); > - handle_arm_sme_h (); > handle_arm_neon_sve_bridge_h (); > + handle_arm_sme_h (); > } > } >
diff --git a/gcc/config/aarch64/aarch64-sve-builtins.cc b/gcc/config/aarch64/aarch64-sve-builtins.cc index c2f1486315f02c3e38f808b3124a9b4cf49a4708..10f1df233ca9ae4e4a639a45a25db1f055a7d7c3 100644 --- a/gcc/config/aarch64/aarch64-sve-builtins.cc +++ b/gcc/config/aarch64/aarch64-sve-builtins.cc @@ -4511,8 +4511,8 @@ init_builtins () if (in_lto_p) { handle_arm_sve_h (); - handle_arm_sme_h (); handle_arm_neon_sve_bridge_h (); + handle_arm_sme_h (); } }