Message ID | 20250203130421.2192732-10-alfie.richards@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 388C33858408 for <patchwork@sourceware.org>; Mon, 3 Feb 2025 13:20:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 388C33858408 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=r0qhRbu9; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=r0qhRbu9 X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on20613.outbound.protection.outlook.com [IPv6:2a01:111:f403:2612::613]) by sourceware.org (Postfix) with ESMTPS id 0D5073858C56 for <gcc-patches@gcc.gnu.org>; Mon, 3 Feb 2025 13:05:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0D5073858C56 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 0D5073858C56 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2612::613 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1738587909; cv=pass; b=mfJH6IJZbzQtqUYPdBEjHydHVDZkl7NA2cRqIL+K5xvJqTA5iKipcClg+8uCcpa9T4byphzn0PFjuh/J7i6DyLxV46dX3fVicJAd5i0dZT8r7txiBN4MN3lFm854N9ixoUKda3hqbGqFWWOk5NuWeuN+MXQqd9Io9zg3i8EnbvU= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1738587909; c=relaxed/simple; bh=yOOUq92Mzl5toYlI3C3XhF1PrW1Q08TMFJ54AI+S8Q8=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=gUjj6UymSm11Tpp4gzvBsTOxWMfX+X4UjeHbzWBW3h75xqsSuwfq10+Vy8C7inBsjYzItjevx4rGG7kZzlOZUeuhRtJq6bFOQkxz610bjzxuKgwbKLI9S6wb/di2RkbYdHYb/Z6xxJW7g3VFgu8HcjHCR3EN9WKROuXZ+gkOcXM= ARC-Authentication-Results: i=3; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0D5073858C56 ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=biOQms0ggy6MvdklTuogU2kzh4Y2LpGtxI9NFlIrf1qa7oXj6wpOZCFjPHEpzbGD0n8n4wIGJgbvBQHInybHtSewx/8DWDtvbByXeRG1ai01lNQVrB4jvMm9ajq+a0nIJygFiX7mV4yGZSvttv0mOQJQg2hPHCxlrIdRRECpCkhJjaXK2S8z5CJT21K9EeDuTiTAR7o012wedNTtPbYxYeRmfumPoJXStn30C12ytWou6BXX8Bi68qq57Vc43ursLHbRM+7fADUWBZhIOWSJJ/O9t36bNCEBVPoljxHnJ1Q80OBg0duNJ0FvD7v82Ad2+GvFohO2wN3hzvjcQ0+MTg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=Q1jd0YOzKxvQzOrQ/XOSv8gGlmPP2XBBDex23mLJaEs=; b=hqXvTtzXr4YiFsQ4Q9/b9fuLzF9Jfo30bm2kCc3yklFi7WGnlXKkj/eUK/ZRlF5FvyO+XhsZziRcJj3pzi6jlHjRwzqXcAO87AwbznCmeNzlJ8ToP99Ky4Tj/h3ibPV1CRbbZO2qKnpkPHx/ShQbDqufrFdUQCtQgGZWOfPndh+eZRM3W5tdonDfIPzzhirIovXp27GcAovQ48AYtehLsM/VWNfZgp4mG8ebjosIuQ/ZLxZdYuscnzCYioGSbuG0a3gjHY2xopd3X6haXjI7Tuij9jPdrjwoV437BPk+S1hChODoD+DpXsq/HlLBOmCd6Web6e+YvntUB0LRbg+k4g== 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=arm.com; arc=pass (0 oda=0 ltdi=1) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Q1jd0YOzKxvQzOrQ/XOSv8gGlmPP2XBBDex23mLJaEs=; b=r0qhRbu9IY56p9Vpa9yTD3vS6+kYqg/P+hlcaE0jskFTYmZgXDaa50/IyXEIutvopsWrMItq1EewSoZCOMN0vPjWFA/60XZwWM45gUkDIF5wAx2btPgw5OUIcegOVzB91lU87zQvSC0fzWcYscWMUDYbNzuIqqQISDt9n86gwEI= Received: from DU2PR04CA0245.eurprd04.prod.outlook.com (2603:10a6:10:28e::10) by AS8PR08MB6104.eurprd08.prod.outlook.com (2603:10a6:20b:299::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8398.24; Mon, 3 Feb 2025 13:05:04 +0000 Received: from DU2PEPF00028D12.eurprd03.prod.outlook.com (2603:10a6:10:28e:cafe::c) by DU2PR04CA0245.outlook.office365.com (2603:10a6:10:28e::10) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8398.24 via Frontend Transport; Mon, 3 Feb 2025 13:05:04 +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=arm.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 DU2PEPF00028D12.mail.protection.outlook.com (10.167.242.26) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8398.14 via Frontend Transport; Mon, 3 Feb 2025 13:05:03 +0000 Received: ("Tessian outbound 4d4d74fe3cc9:v560"); Mon, 03 Feb 2025 13:05:03 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 1e282dba61c9f5ba X-TessianGatewayMetadata: jNRjJl6FQoPE4NOSTQoNge7zwUry2Kl++TYubk/ykvJ8IXmCgYnM66kma06cbUQ9EDl92nbv+qU1rCex0kZneSd7Np72aC4wLhBoZdkL/9jNkTiSPHnp481yTdEXoCGOZdHoD6Ky/pjRxC+9uNGU6ukNbnQ3IpVi9e4oMb5y9kk= X-CR-MTA-TID: 64aa7808 Received: from L0e1fb950100c.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id ECBC5936-15A2-4F8B-AA11-D7F08875A9BC.1; Mon, 03 Feb 2025 13:04:52 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id L0e1fb950100c.2 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Mon, 03 Feb 2025 13:04:52 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vlXVXQERe2JLeunNnDT7KUsyluSi+Gj/afeGhqcsxjzILC2ob/YeD3bJo2kF3FcsjsPv06nicFt1rMOBMrpev2KfgI3MCM05k6v/voeb6rJWM5X5VzBMQu64OCT2pgi2sDyyOCX90LgJ0GjBD2mp6cK1B8TgxEGLVFNYn4Fq2h/H79ui2fFFx/jhnzpHCF4Ep07Bz8ziC1aeW12HHKiRiwxGtGCpF8VGf7JducReAEuRvtkMkgFo8yuTN3h5qV08vEQ28Rp/M5pAUsazXOzjk5SUtpiEK1zFa1aTDzy2OYeTQnMyuf5gLZ04zBh8+zLxB9wkQFK5LMZ5ygdIGvZT7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=Q1jd0YOzKxvQzOrQ/XOSv8gGlmPP2XBBDex23mLJaEs=; b=Z7v5zBuBQN4yOHn7wvwOsWBVH9t2tiQiw3MVsAhSlvEGhsbtLolXKbYMVm2ebTDvg5CcOA15/DnlY3NNMnfdnzsNaUcpk1Skzmz3ud81TlzSHAGzoyivQ2tFQ04u4BTiDLa+fdQCCRSj5UfUc14uvxWTtAXHDRtwWV62E0AbC/2xJHAjkSA1fRSqhnObOtk3GrhnN3hU9vaCM80sa7+yu4uZgH7TLbjXLy+YuavAK2IECMRc7db/VD8AIeAKIW5YVIeNZ6UF753Yr3m1CyXeSImKWSGEllK+dplKaExpaIKoXKDkFiNpXN348t+Lk3hQtXhpbxldNcXPEBY/JNP3Ag== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 172.205.89.229) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=fail (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Q1jd0YOzKxvQzOrQ/XOSv8gGlmPP2XBBDex23mLJaEs=; b=r0qhRbu9IY56p9Vpa9yTD3vS6+kYqg/P+hlcaE0jskFTYmZgXDaa50/IyXEIutvopsWrMItq1EewSoZCOMN0vPjWFA/60XZwWM45gUkDIF5wAx2btPgw5OUIcegOVzB91lU87zQvSC0fzWcYscWMUDYbNzuIqqQISDt9n86gwEI= Received: from DB8P191CA0006.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:130::16) by VI1PR08MB5310.eurprd08.prod.outlook.com (2603:10a6:803:135::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8398.25; Mon, 3 Feb 2025 13:04:49 +0000 Received: from DU2PEPF00028CFD.eurprd03.prod.outlook.com (2603:10a6:10:130:cafe::3b) by DB8P191CA0006.outlook.office365.com (2603:10a6:10:130::16) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8398.25 via Frontend Transport; Mon, 3 Feb 2025 13:04:49 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 172.205.89.229) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=arm.com; Received-SPF: Fail (protection.outlook.com: domain of arm.com does not designate 172.205.89.229 as permitted sender) receiver=protection.outlook.com; client-ip=172.205.89.229; helo=nebula.arm.com; Received: from nebula.arm.com (172.205.89.229) by DU2PEPF00028CFD.mail.protection.outlook.com (10.167.242.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8398.14 via Frontend Transport; Mon, 3 Feb 2025 13:04:48 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX05.Arm.com (10.240.25.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 3 Feb 2025 13:04:30 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 3 Feb 2025 13:04:29 +0000 Received: from ip-10-248-139-135.eu-west-1.compute.internal (10.252.78.54) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Mon, 3 Feb 2025 13:04:28 +0000 From: Alfie Richards <alfie.richards@arm.com> To: <gcc-patches@gcc.gnu.org> CC: <richard.sandiford@arm.com>, <hubicka@ucw.cz>, <ubizjak@gmail.com>, <josmyers@redhat.com>, <jason@redhat.com>, <dje.gcc@gmail.com>, <kito.cheng@gmail.com>, Alfie Richards <alfie.richards@arm.com> Subject: [PATCH v1 08/16] Add get_clone_versions function. Date: Mon, 3 Feb 2025 13:04:13 +0000 Message-ID: <20250203130421.2192732-10-alfie.richards@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250203130421.2192732-1-alfie.richards@arm.com> References: <20250203130421.2192732-1-alfie.richards@arm.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------2.34.1" Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DU2PEPF00028CFD:EE_|VI1PR08MB5310:EE_|DU2PEPF00028D12:EE_|AS8PR08MB6104:EE_ X-MS-Office365-Filtering-Correlation-Id: 0cbe0d0a-5110-4090-c827-08dd44535fe6 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|1800799024|376014|36860700013|82310400026; X-Microsoft-Antispam-Message-Info-Original: l/xNC81fABRFvhW2nhzwV1akot9I6t0YxD9sa+DhsIzVAyrjaNCf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1iPZ6QFPnbtSLXhnQgAokDDwaImjgCnHyo1zty7pMjbv9yaeV1Zzyl4Kg4BDVh5oSTMCgezVIn+n0MBrziGRHGJioqzKMK6nswywyMjAnl+VDC8s2fud0nc92eDz1W71Af4wz3Go7T+Ng2yKLP9cQfKvcAXr+6/p++uQVgyM8XE8SMplJqpogaN5sAEY8IpfoMpvSKOXhqeKY6BxDI5pPQhPITbQrsrFw1AdN5vhNemXO62Fe+I9UYHxuUHCp11jvVDQYZjFhuXtl7oagDVJSBBNSx7iUSrztmEvpQ+IFOu0rwulhJgdgBkvHEXpl5Ss9WRYtSSpk/aWFoYP8C2ebJDvkH8saKzokNekptGsbPM4Jp3altLA87gxkNrVRtV0= X-Forefront-Antispam-Report-Untrusted: CIP:172.205.89.229; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(1800799024)(376014)(36860700013)(82310400026); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB5310 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:10:130::16]; domain=DB8P191CA0006.EURP191.PROD.OUTLOOK.COM X-MS-Exchange-Transport-CrossTenantHeadersStripped: DU2PEPF00028D12.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 09278ceb-3b85-4d82-635b-08dd445356e7 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|82310400026|35042699022|36860700013|1800799024|14060799003; X-Microsoft-Antispam-Message-Info: =?utf-8?q?ftWfKjfCk2aNn5xGBiAH8shJBxCeMB/?= =?utf-8?q?E8bIkrQGfCalhkecSL+I3aoJxO3mRydy/wvNgdpmJDLEmQPtrG3F3G/f3gFTPKru2?= =?utf-8?q?CSqMxnETpK9/7aq9/xnT+heyJfUk5FwUTeWGIvuBSHcjH6N4a89JI6eT023fVfF65?= =?utf-8?q?nw7T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1QjjjK+aL+xNwBbIk3RDAWJxAeDwhMorZ4qqyLnFkLmbYO547cjpJJnS?= =?utf-8?q?BuIeYPtrolQveZRkFb/tHgNH2VjqkCrG6w5oerGY7cox0dTe8gQlAgtVcJO/W+tV2?= =?utf-8?q?5arTYBWVrcBhVYTcW/WEFLTWgwSDmJOApcyBANFDl83BaFP0bPgmqtaAtooNBUX6F?= =?utf-8?q?YPZw5SXdY1EI1V6Hx0m+P/C4d4RFHtRRcyMuk6tBCK0l85qD8JdL0yr5RTi0Y263A?= =?utf-8?q?DPLvG9V2wZB8WaBfO81I6yTDaXW/FOUWwCS7H5Rp7lHSgMv6t/D0keBZsh0rx/OoR?= =?utf-8?q?eAO+w23Rj5eF3NansWvCtTv7Pi6OVfwvuucWSfSDb1JXJyiaOPIK4efJ9r8+lMfrd?= =?utf-8?q?V4TnJDDlh3kACascnOSuDdMwXFmStvWzuYuduoB7uDDlvFuGRhKFVY=3D?= 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:64aa7808-outbound-1.mta.getcheckrecipient.com; CAT:NONE; SFS:(13230040)(376014)(82310400026)(35042699022)(36860700013)(1800799024)(14060799003); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Feb 2025 13:05:03.8256 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0cbe0d0a-5110-4090-c827-08dd44535fe6 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: DU2PEPF00028D12.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6104 X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, 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~patchwork=sourceware.org@gcc.gnu.org |
Series |
FMV refactor and ACLE compliance.
|
|
Commit Message
Alfie Richards
Feb. 3, 2025, 1:04 p.m. UTC
This is a reimplementation of get_target_clone_attr_len, get_attr_str, and separate_attrs using string_slice and auto_vec to make memory management and use simpler. gcc/c-family/ChangeLog: * c-attribs.cc (handle_target_clones_attribute): Change to use get_clone_versions. gcc/ChangeLog: * tree.cc (get_clone_versions): New function. (get_clone_attr_versions): New function. * tree.h (get_clone_versions): New function. (get_clone_attr_versions): New function. --- gcc/c-family/c-attribs.cc | 2 +- gcc/tree.cc | 40 +++++++++++++++++++++++++++++++++++++++ gcc/tree.h | 5 +++++ 3 files changed, 46 insertions(+), 1 deletion(-)
Comments
Alfie Richards <alfie.richards@arm.com> writes: > This is a reimplementation of get_target_clone_attr_len, > get_attr_str, and separate_attrs using string_slice and auto_vec to make > memory management and use simpler. > > gcc/c-family/ChangeLog: > > * c-attribs.cc (handle_target_clones_attribute): Change to use > get_clone_versions. > > gcc/ChangeLog: > > * tree.cc (get_clone_versions): New function. > (get_clone_attr_versions): New function. > * tree.h (get_clone_versions): New function. > (get_clone_attr_versions): New function. > --- > gcc/c-family/c-attribs.cc | 2 +- > gcc/tree.cc | 40 +++++++++++++++++++++++++++++++++++++++ > gcc/tree.h | 5 +++++ > 3 files changed, 46 insertions(+), 1 deletion(-) > > diff --git a/gcc/c-family/c-attribs.cc b/gcc/c-family/c-attribs.cc > index f3181e7b57c..642d724f6c6 100644 > --- a/gcc/c-family/c-attribs.cc > +++ b/gcc/c-family/c-attribs.cc > @@ -6129,7 +6129,7 @@ handle_target_clones_attribute (tree *node, tree name, tree ARG_UNUSED (args), > } > } > > - if (get_target_clone_attr_len (args) == -1) > + if (get_clone_attr_versions (args).length () == 1) > { > warning (OPT_Wattributes, > "single %<target_clones%> attribute is ignored"); > diff --git a/gcc/tree.cc b/gcc/tree.cc > index 05f679edc09..346522d01c0 100644 > --- a/gcc/tree.cc > +++ b/gcc/tree.cc > @@ -15299,6 +15299,46 @@ get_target_clone_attr_len (tree arglist) > return str_len_sum; > } > > +/* Returns an auto_vec of string_slices containing the version strings from > + ARGLIST. DEFAULT_COUNT is incremented for each default version found. */ > + > +auto_vec<string_slice> > +get_clone_attr_versions (const tree arglist, int *default_count) > +{ > + gcc_assert (TREE_CODE (arglist) == TREE_LIST); > + auto_vec<string_slice> versions; > + > + static const char separator_str[] = {TARGET_CLONES_ATTR_SEPARATOR, 0}; > + string_slice separators = string_slice (separator_str); > + > + for (tree arg = arglist; arg; arg = TREE_CHAIN (arg)) > + { > + string_slice str = string_slice (TREE_STRING_POINTER (TREE_VALUE (arg))); > + for (string_slice attr = string_slice::strtok (&str, separators); > + attr.is_valid (); attr = string_slice::strtok (&str, separators)) > + { > + attr = attr.strip (); > + if (attr == string_slice ("default") && default_count) Do we need the explicit constructor here? It would be nice if attr == "default" worked. > + (*default_count)++; > + versions.safe_push (attr); > + } > + } > + return versions; > +} > + > +/* Returns an auto_vec of string_slices containing the version strings from > + the target_clone attribute from DECL. DEFAULT_COUNT is incremented for each > + default version found. */ > +auto_vec<string_slice> > +get_clone_versions (const tree decl, int *default_count) > +{ > + tree attr = lookup_attribute ("target_clones", DECL_ATTRIBUTES (decl)); > + if (!attr) > + return auto_vec<string_slice> (); > + tree arglist = TREE_VALUE (attr); > + return get_clone_attr_versions (arglist, default_count); > +} > + > void > tree_cc_finalize (void) > { > diff --git a/gcc/tree.h b/gcc/tree.h > index 21f3cd5525c..aea1cf078a0 100644 > --- a/gcc/tree.h > +++ b/gcc/tree.h > @@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see > > #include "tree-core.h" > #include "options.h" > +#include "vec.h" > > /* Convert a target-independent built-in function code to a combined_fn. */ > > @@ -7035,5 +7036,9 @@ extern unsigned fndecl_dealloc_argno (tree); > extern tree get_attr_nonstring_decl (tree, tree * = NULL); > > extern int get_target_clone_attr_len (tree); > +auto_vec<string_slice> > +get_clone_versions (const tree, int * = NULL); > +auto_vec<string_slice> > +get_clone_attr_versions (const tree, int * = NULL); Formatting nit, but: it's more usual to put declarations on a single line, if they'd fit. Otherwise it looks good, given that patch 13 removes the old functions. Thanks, Richard > > #endif /* GCC_TREE_H */
diff --git a/gcc/c-family/c-attribs.cc b/gcc/c-family/c-attribs.cc index f3181e7b57c..642d724f6c6 100644 --- a/gcc/c-family/c-attribs.cc +++ b/gcc/c-family/c-attribs.cc @@ -6129,7 +6129,7 @@ handle_target_clones_attribute (tree *node, tree name, tree ARG_UNUSED (args), } } - if (get_target_clone_attr_len (args) == -1) + if (get_clone_attr_versions (args).length () == 1) { warning (OPT_Wattributes, "single %<target_clones%> attribute is ignored"); diff --git a/gcc/tree.cc b/gcc/tree.cc index 05f679edc09..346522d01c0 100644 --- a/gcc/tree.cc +++ b/gcc/tree.cc @@ -15299,6 +15299,46 @@ get_target_clone_attr_len (tree arglist) return str_len_sum; } +/* Returns an auto_vec of string_slices containing the version strings from + ARGLIST. DEFAULT_COUNT is incremented for each default version found. */ + +auto_vec<string_slice> +get_clone_attr_versions (const tree arglist, int *default_count) +{ + gcc_assert (TREE_CODE (arglist) == TREE_LIST); + auto_vec<string_slice> versions; + + static const char separator_str[] = {TARGET_CLONES_ATTR_SEPARATOR, 0}; + string_slice separators = string_slice (separator_str); + + for (tree arg = arglist; arg; arg = TREE_CHAIN (arg)) + { + string_slice str = string_slice (TREE_STRING_POINTER (TREE_VALUE (arg))); + for (string_slice attr = string_slice::strtok (&str, separators); + attr.is_valid (); attr = string_slice::strtok (&str, separators)) + { + attr = attr.strip (); + if (attr == string_slice ("default") && default_count) + (*default_count)++; + versions.safe_push (attr); + } + } + return versions; +} + +/* Returns an auto_vec of string_slices containing the version strings from + the target_clone attribute from DECL. DEFAULT_COUNT is incremented for each + default version found. */ +auto_vec<string_slice> +get_clone_versions (const tree decl, int *default_count) +{ + tree attr = lookup_attribute ("target_clones", DECL_ATTRIBUTES (decl)); + if (!attr) + return auto_vec<string_slice> (); + tree arglist = TREE_VALUE (attr); + return get_clone_attr_versions (arglist, default_count); +} + void tree_cc_finalize (void) { diff --git a/gcc/tree.h b/gcc/tree.h index 21f3cd5525c..aea1cf078a0 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see #include "tree-core.h" #include "options.h" +#include "vec.h" /* Convert a target-independent built-in function code to a combined_fn. */ @@ -7035,5 +7036,9 @@ extern unsigned fndecl_dealloc_argno (tree); extern tree get_attr_nonstring_decl (tree, tree * = NULL); extern int get_target_clone_attr_len (tree); +auto_vec<string_slice> +get_clone_versions (const tree, int * = NULL); +auto_vec<string_slice> +get_clone_attr_versions (const tree, int * = NULL); #endif /* GCC_TREE_H */