Message ID | 20250203130421.2192732-11-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 2472F385841C for <patchwork@sourceware.org>; Mon, 3 Feb 2025 13:09:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2472F385841C 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=DwHWale4; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=DwHWale4 X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from AS8PR04CU009.outbound.protection.outlook.com (mail-westeuropeazlp170110003.outbound.protection.outlook.com [IPv6:2a01:111:f403:c201::3]) by sourceware.org (Postfix) with ESMTPS id C30003858C33 for <gcc-patches@gcc.gnu.org>; Mon, 3 Feb 2025 13:05:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C30003858C33 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 C30003858C33 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:c201::3 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1738587913; cv=pass; b=o57h9KPJM+liQDsWN61IHJa+yudxHU5yi8HqFNXf2A0R63cDTH88u12w6e9X5npDXQ/Qhym5EQhTRKaz2gMAYLDZuKoQc2APYSsYDbP/rozoN5u00X4q6SNVu6i5MmFrXYpUsFvu1QkGiT/zTHosjCoSmJ7JxddEdjq1/hikBNk= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1738587913; c=relaxed/simple; bh=v0zFUBtI8zHFUsjyoYil+J7F7dr85d1KGcXnN303YtQ=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=EJnuzxh/i1L2Xk4kMJK+qzBtKVtGkjbORL3eUKdGA6VznTgPg3cV5xalC/pmr3Po4HMhucCx2qRMaKyS0TXxyLs3cPpnMNNt2e/egwve/eD9Ri4d8eX/lzQZ4oFnJuEwRggYJ8HOyZoQNsQJwDnjbk3u1a800HiXS9tJ7ub9jbk= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=W2nlgakHsj5JaLB3Q7AVMD2SyX5o8grT9EvLbyL11RwHavKbpt6YPSwuU2wYYEbx1A3WWOrDHEvJ1BPq0n7S+6gqRAgxGluYjDZR4Dvuoe0AVRBoBlwxEMYr0vcu2WVzzcgw4dJNWw2fDtPGcFjfOgbSuB3DIwI2dEVRLa0ZQzPsVTPzbDeYwgO2b24Ldw6sTv3qVqvWP028uX5Z3/6oUnU2hB/zj6rxZCP24Bf72E5nYS3gws6PGSp7pmxI4bTnau+1EM9EL3gERgHOh6LQm+b4kmzQc8b4y0MPP4gXaZGah7Lj04QVux1gK1xEyjNO0ta2fc1eQyrz2nPytIL4Xg== 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=dlKmq16JHIS8oGgrOL3F8vNgqth9KdqIIoK8eIlOoL4=; b=bAwlbvW2JH1Pw9IxgYFgFzcMjLif+H0NT9d3hnpdzBe0Paa9Wp9Nj6sjGGWSbL3mDi3OtGnws9Y0uKp4HEIGjcNKePd2YuUoVPxkNHneYx3lmAQWIDPWG6l6lqC2558SNidsWIU6UmsTL+SOCRBNe9vfEEJ7ySEsLLgy36BW8qVsBwapH8z9V/uaz/RQvuHASpMaZpK8gv18FYUVeXv72RRPQDwp9bzrjtAhLFuLOQo/E5vbj5SAHiY25XI+QwgiGlB5HbQ73h66KyL2YZ2hTqgNKvqMK4x+TI5RPkwxhOFR+ODnw8B0wgIbJ8KUdLG06VYtjL/tjO3X5e1A3/pYcg== 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=dlKmq16JHIS8oGgrOL3F8vNgqth9KdqIIoK8eIlOoL4=; b=DwHWale46ryk13A495M/YbVp/C0s5SN+H+zriiLs7rhSNi4e/PR5XFBdezVRX1Qo4nHvPIUZM5ETzjshSQClQt1DaQX0wd4vLEDNpGvHX9I2QjY/Mp3SxpALLGdzGXHwvkukVVvUE5DtrFre+7aIqiWtjMQldetPvPwSG78X8fE= Received: from DBBPR09CA0009.eurprd09.prod.outlook.com (2603:10a6:10:c0::21) by DB9PR08MB9539.eurprd08.prod.outlook.com (2603:10a6:10:453::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8398.23; Mon, 3 Feb 2025 13:05:05 +0000 Received: from DU6PEPF0000A7E1.eurprd02.prod.outlook.com (2603:10a6:10:c0:cafe::bc) by DBBPR09CA0009.outlook.office365.com (2603:10a6:10:c0::21) 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:05:05 +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 DU6PEPF0000A7E1.mail.protection.outlook.com (10.167.8.40) 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:04 +0000 Received: ("Tessian outbound 72f36a054dd6:v560"); Mon, 03 Feb 2025 13:05:04 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 945edc90a95e1edf X-TessianGatewayMetadata: hsxzybSGw0fSwr89IYGdfJgEKZ0PFUv1ubLPrA4T3Bc+Fl/lEemk1t7bG208stdmto+3fLvo+w2JGnzDaib4elAY/pHmjBnBPUZcvgBcFtQhLyhksO/ZoL72TKU1OAFXYpfm3wXdj3PxIeKzDIP8ocynFq4r8jPtF5FcUUmgEcw= X-CR-MTA-TID: 64aa7808 Received: from L39a5bb49b403.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 4C42E35C-BF22-4F36-B1EB-037E1B200D41.1; Mon, 03 Feb 2025 13:04:52 +0000 Received: from DB3PR0202CU003.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id L39a5bb49b403.1 (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=hxnN94XCXY9yODtKqzrp0g8i+JYlSL/hqfwdrwjdp1zeq7wUnbZsyl5qTKAVjVycQ7Z7vht2FH12thN7RiWUr8qRPykjU9pvSSiCdwALtTP7FAN9eGvUv/ynqicJ6IZOhlSQStMau90ZOyCTonlU5+MWmAiVCbx3CwfZhEdFzarAN11+eYwzzjvAjZAEuPNz3gAkAtrR6M6q27u3e5WF8RKqo3pTfFnwtpBt90I3rUwE4jekBV4p7hiHhQB+Hdhru0TBzmua7r0Vn2/HnRJdS6lnxY32I9fX/wuD+c6LKC7RivXaAr+oglvfvBg3jbKZeuTKeI6K9D2I86IlvCpFkg== 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=dlKmq16JHIS8oGgrOL3F8vNgqth9KdqIIoK8eIlOoL4=; b=llmFKh7Zl1lq4uQ/BKO70DnGA4tu58Vc306agZrzx6ud04Yzknlaj5JeYb7wHfLNALDIz1CS3V0HHouetLWorxgC62onnI8gpJcRPlSBacisc4KvHdHmPTOjf+/y5NjUB2JDbnxMgueC6iRu4j9hnwOcP7BWnb3+QVH1dCue0jxVyvM29HtwLjsPP88hzI8HPnmnwWJxy05W/oXuyZjnkx5cJtmu8ZdV8UibmtjD0pTeXfpBfnuq0XQnWV/GJNWFIOLU24lXMoQzKlphwra1nr0R4xU0HyTm0nI/DYbtM04ksd6xY7Ki5PRTvCwIVECXs7UkL/lz+9/QSQbhNBFFhw== 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=dlKmq16JHIS8oGgrOL3F8vNgqth9KdqIIoK8eIlOoL4=; b=DwHWale46ryk13A495M/YbVp/C0s5SN+H+zriiLs7rhSNi4e/PR5XFBdezVRX1Qo4nHvPIUZM5ETzjshSQClQt1DaQX0wd4vLEDNpGvHX9I2QjY/Mp3SxpALLGdzGXHwvkukVVvUE5DtrFre+7aIqiWtjMQldetPvPwSG78X8fE= Received: from DB8P191CA0011.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:130::21) by PAVPR08MB9746.eurprd08.prod.outlook.com (2603:10a6:102:31d::11) 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:04:50 +0000 Received: from DU2PEPF00028CFD.eurprd03.prod.outlook.com (2603:10a6:10:130:cafe::fd) by DB8P191CA0011.outlook.office365.com (2603:10a6:10:130::21) 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:50 +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:50 +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:29 +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 09/16] Add assembler_name to cgraph_function_version_info. Date: Mon, 3 Feb 2025 13:04:14 +0000 Message-ID: <20250203130421.2192732-11-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_|PAVPR08MB9746:EE_|DU6PEPF0000A7E1:EE_|DB9PR08MB9539:EE_ X-MS-Office365-Filtering-Correlation-Id: 21b1d230-6c71-40f4-2800-08dd445360a4 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|36860700013|376014|82310400026; X-Microsoft-Antispam-Message-Info-Original: QdV09i8QTBxh2T4cioBH/pFFcaC9QxfiqEcpi56fnsyPczlanbDGcjI6+eYuqp4XTkxwLLbVLOoICEe7lKprzVxQvP53sUYlBimVNac3RynuGR5yicf0MNOcIuLghU0xTKyNdg0jQcVJuOkhIYOsfn4WrvMgp7dk5luKZuHA4RcmfopDnIexfAe5uQWps3Uxi5ITjU4Z/hw1HdCNT/4wSkobhAOtHDF/hHxb8zc8XH+NnMPcPNtrrEhdURc+o7KIwJ3ANVV30fNtTNt2x2yxETpCTNIso5fPzVA8ihe+9jvXE+ntroafc18GYZKjyzpQ6jP44ybTTOTH9IrILME929e/heuQhND7u7hDb4Ed32nPaa2rsGz6SZtbIPn1GrIJwLhx/iUA/5YBszsIqws0sqwLTY6aMoK3cKWZGvE82pGw1u9cXxGiqVh7aJvZO8QFemATU+rL7TpUiW/C9eo9E0nAx3R78rvErrBzbgn0mFaUcp1UOli5ZZdbYJgDuZ+cXDaUiuqtPlpgCs/rA/zxMj6C5LF3FUpX30In6RE/W9kTfXJ2HNfWN33lyrH8xaVzAuIxBuuF59x0UHwb1OQCaEmdY8B4wRBzMcNpK6+O9ewJ3bsPVf5tNQT8VW4pHPmsFTrA7MJf/Ja48O9PWPbjuEBEdMPiNqlu28Ml7SWPbuHjh/yQNr+e0Zvqa0Qg9IlVo3yvgH4GeV5ky+i1qKMe3ZMtL1I5tIR/py0JzoYCFUcqzpUxk7//aU26hIF/yD15x/7n1v2MvhYMS6iPcedVxbQP8abbmlGKU7obv2PX94aavNA/rE+KZthGrOyKZgHxhpxqeYnSmn2fJtyPWQI+GjhxTJtGxWh0SubJ86CuiGb2xii6Le4zh0/WsyZiYwUpoELDY0C/ffSL0SSG1ezPTuLyAidsBS3LPIp409eygzllZ57Yh6N4tPQUdlv3avizMXsyG905tBG6EE07Vjw5MNXog9Ua9sjH2c7TQJjFmlSAr3mn5+jKl7qz1UpTkI34XdPW5zezBwDvZv4+AZmP1Uzw4Td3jbs3KAXSZ2p6jGAlM/eIOkYZBBTYRnsOGSbZE9W/voJhZmTsO7xFeTUrUsRWQVVGOvOzL12K7bM2zIOD9GsOfhctevJktm1fNAbbZEDiQSTB0CP1NRGtmzQthEw3tGbYON+xRnb4S5/IXq+OsBExP/I1h/PdFrQbhW+iGT1KpUF6ugtwrAOHnLvnCDGtaCSEQt/KZRC1Jgc0Eul2btHT0JsnzevoAog0/BNSksNqbz5z9TtztD2nU7Q6Y6/JHBYG0GFwKgW3X6GIVHQkaLAUNPSHkm3adPd31hAHMnCJuEmUtQp+QvBMxKLwJqeTw/Pi0juZQvDFrVRyObvMRdk13m9mVNThzwa/5oV9NhJsi+VkMfJfM9zmsiFPcFCa3MegUuRh7tmogNRY3ewttmMwon5mIDMJDfYfGGo9dgXo6WcYfXuhc3AO3zN5n5hJCWJR5DD3UPCBGuMgymY= 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)(36860700013)(376014)(82310400026); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR08MB9746 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:10:130::21]; domain=DB8P191CA0011.EURP191.PROD.OUTLOOK.COM X-MS-Exchange-Transport-CrossTenantHeadersStripped: DU6PEPF0000A7E1.eurprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: b3ca81ad-f59c-4011-30ef-08dd445357d8 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|35042699022|36860700013|1800799024|14060799003|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?WHHHoWB8gY1JMuXCAGKTQag60nunEBM?= =?utf-8?q?0oiNohZgpcdAyAGlKpBQC9Vw0myuDmc25Jn2RW0msljLtCyJdFZ1Qa9iN95i6zNa6?= =?utf-8?q?5rkT8s6QtEEaN7ajVRSnzdSDbaEloAiDUg/BVDsPJ4MWo+BRH39MngT1FMDaCyBB5?= =?utf-8?q?A7n1QtN4QFj94+V6sCcdPKsRYVvP+Fn+ceiGVjyBxYtXlW7ZdxQxvGML6suV3SQ+k?= =?utf-8?q?1dZl+21UN+fFzSAOYfkLHJ5ITWZVhi7DglfUr/lR5k/3et0mK6BllqsgwLyFGwOoE?= =?utf-8?q?D/nZ2TYjN0XBmKnfJZmnyrjU+sS98ECate9lQWau/+J3DrF02VDE5nf/+3Y67pt6+?= =?utf-8?q?T5gvZCF3ypIvPh8w4WJPyZDlolk+ZsUJ6bvlnYYPczHD6mQZ+CvYAz63CgGnEnwpd?= =?utf-8?q?08h5GK4qUK5+Io7hyxil4isAxmIsNAgmqzeVd5RqrnyTbc6UJi5h+Q1adeMH/ZukZ?= =?utf-8?q?3dkeMMtcPR4VsKEX7kOxLsAebOYlSZ4p0NR2XJlLc4uZcrk78rnzKlKHY4oS2666W?= =?utf-8?q?ecJZi2Ztz3ban5bKQ21y8gs/xAsLL5WIAmzsuJi257dqX53rAbzBeHLcSGZ0rJx96?= =?utf-8?q?oPQ15UJ0vRM/EVOdFzn5peAxul7rq1vDCm35ueBk4YlN52+KFe/LEo3QhoVl7hoBj?= =?utf-8?q?/PJ7EtcbaGj4b+ICL3O5JQ4+XoMsKOaaBqCfdbq18a43FOCG+Wj9EoW139EtB/iVl?= =?utf-8?q?spu2q6kvIDkcM1j1Npc/QfnI2DJqiX9SZapBr0OiQc5OVVfd9CfKAhaEOfDVt/o1y?= =?utf-8?q?1E3CFaRQvDFtOdSPLmefY8I8J+ph2aeLFz7A5gt0V2Fukpg+K8CWTcyR8+yvqhuNv?= =?utf-8?q?XYFny7DKBFWt3CWm6qg5ZkYWMJkb/XGJIAQ07KkOnAhigsTzlO+zjKaullO21y+02?= =?utf-8?q?9auUhRZlX9smHcC1T6NwERGRaVkzha9Q/6Rf+J5mp05f1x1xXvZip2hAlZQnOmTuc?= =?utf-8?q?ja9ioRpq33CVUhHwGUcjgN4IGWp4Kf0AWY+52pyCFq9UIykw4SoMJnPp+GdnclM17?= =?utf-8?q?9JCdLpTTk1TP5lJZI3ny8fyrAiV64oPc3p6FRkRMSVDGSdRPOZwEyL3uN6jCEZFi3?= =?utf-8?q?NTscjyX5nho7medJy6nRtKAxd8ACd0o4HB9nIwy1SlYR16pQVJTm9PKOPez6Mi1Iu?= =?utf-8?q?Vta/NaGqWW97vtqgn/nIPIGQxr2JxzSyIWN9hqFaWV/BxEovv9d2NzUz7GY3t/dSP?= =?utf-8?q?IrjuZsfW015xhyPhYnmwIocz6xwUeRIfq1IzJWQMg8AGe1rDn4pU3+vz0voE27sIh?= =?utf-8?q?AX3lhVbH8GYF05CsoCSSH21IMmmRDwA1ZGYWYzpGkbsu2Gnr41Q701MOohPF0ldt3?= =?utf-8?q?8oGFXEoh/3rd4gielbsv56RynP7qrf6rVORYYWqTJS/DWa0vb/BA10vG1lGZ0jhht?= =?utf-8?q?S5+zCB8Zm4mmcTNHCKyjEhfidFO29E+KNHZTwsSiyRu9rUr9bP5WyA=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)(82310400026)(35042699022)(36860700013)(1800799024)(14060799003)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Feb 2025 13:05:04.9729 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 21b1d230-6c71-40f4-2800-08dd445360a4 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: DU6PEPF0000A7E1.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB9539 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 adds the assembler_name member to cgraph_function_version_info to store the base assembler name for the function to be mangled. This is used in later patches for refactoring FMV mangling. gcc/c/ChangeLog: * c-decl.cc (start_decl): Record assembler_name. (start_function): Record assembler_name. gcc/ChangeLog: * cgraph.cc (cgraph_node::record_function_versions): Record assembler_name. * cgraph.h (struct cgraph_function_version_info): Add assembler_name. gcc/cp/ChangeLog: * decl.cc (maybe_mark_function_versioned): Record assember_name. (start_decl): Record assembler_name. (start_preparsed_function): Record assembler_name. --- gcc/c/c-decl.cc | 20 ++++++++++++++++++++ gcc/cgraph.cc | 10 ++++++++-- gcc/cgraph.h | 3 +++ gcc/cp/decl.cc | 34 ++++++++++++++++++++++++++++++++++ 4 files changed, 65 insertions(+), 2 deletions(-)
Comments
Alfie Richards <alfie.richards@arm.com> writes: > This adds the assembler_name member to cgraph_function_version_info > to store the base assembler name for the function to be mangled. This is > used in later patches for refactoring FMV mangling. > > gcc/c/ChangeLog: > > * c-decl.cc (start_decl): Record assembler_name. > (start_function): Record assembler_name. > > gcc/ChangeLog: > > * cgraph.cc (cgraph_node::record_function_versions): Record > assembler_name. > * cgraph.h (struct cgraph_function_version_info): Add assembler_name. > > gcc/cp/ChangeLog: > > * decl.cc (maybe_mark_function_versioned): Record assember_name. > (start_decl): Record assembler_name. > (start_preparsed_function): Record assembler_name. I'm not really qualified to review this part, but FWIW, my main question would be: is it safe to cache the DECL_ASSEMBLER_NAME so early? E.g. wrt https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117987 , it looks like the C frontend applies the asm in finish_decl rather than start_decl. I don't know whether the name could change even later, or whether it is supposed to be final after finish_decl. Also: > --- > gcc/c/c-decl.cc | 20 ++++++++++++++++++++ > gcc/cgraph.cc | 10 ++++++++-- > gcc/cgraph.h | 3 +++ > gcc/cp/decl.cc | 34 ++++++++++++++++++++++++++++++++++ > 4 files changed, 65 insertions(+), 2 deletions(-) > > diff --git a/gcc/c/c-decl.cc b/gcc/c/c-decl.cc > index 0dcbae9b26f..daa19f360e6 100644 > --- a/gcc/c/c-decl.cc > +++ b/gcc/c/c-decl.cc > @@ -5762,6 +5762,16 @@ start_decl (struct c_declarator *declarator, struct c_declspecs *declspecs, > && VAR_OR_FUNCTION_DECL_P (decl)) > objc_check_global_decl (decl); > > + /* Store the base assembler name for mangling later. */ > + if (TREE_CODE (decl) == FUNCTION_DECL > + && lookup_attribute ("target_clones", DECL_ATTRIBUTES (decl))) > + { > + cgraph_node *node = cgraph_node::get_create (decl); > + if (!node->function_version ()) > + node->insert_new_function_version (); > + node->function_version ()->assembler_name = DECL_ASSEMBLER_NAME (decl); > + } > + > /* Add this decl to the current scope. > TEM may equal DECL or it may be a previous decl of the same name. */ > if (do_push) > @@ -10863,6 +10873,16 @@ start_function (struct c_declspecs *declspecs, struct c_declarator *declarator, > > current_function_decl = pushdecl (decl1); > > + /* Store the base assembler name for mangling later. */ > + if (TREE_CODE (decl1) == FUNCTION_DECL > + && lookup_attribute ("target_clones", DECL_ATTRIBUTES (decl1))) > + { > + cgraph_node *node = cgraph_node::get_create (decl1); > + if (!node->function_version ()) > + node->insert_new_function_version (); > + node->function_version ()->assembler_name = DECL_ASSEMBLER_NAME (decl1); > + } > + > if (tree access = build_attr_access_from_parms (parms, false)) > decl_attributes (¤t_function_decl, access, ATTR_FLAG_INTERNAL, > old_decl); > diff --git a/gcc/cgraph.cc b/gcc/cgraph.cc > index 1ea38d16e56..c2038be4671 100644 > --- a/gcc/cgraph.cc > +++ b/gcc/cgraph.cc > @@ -252,10 +252,16 @@ cgraph_node::record_function_versions (tree decl1, tree decl2) > decl2_v = decl2_node->function_version (); > > if (decl1_v == NULL) > - decl1_v = decl1_node->insert_new_function_version (); > + { > + decl1_v = decl1_node->insert_new_function_version (); > + decl1_v->assembler_name = DECL_ASSEMBLER_NAME (decl1); > + } > > if (decl2_v == NULL) > - decl2_v = decl2_node->insert_new_function_version (); > + { > + decl2_v = decl2_node->insert_new_function_version (); > + decl2_v->assembler_name = DECL_ASSEMBLER_NAME (decl2); > + } > > gcc_assert (decl1_v); > gcc_assert (decl2_v); > diff --git a/gcc/cgraph.h b/gcc/cgraph.h > index 065fcc742e8..d9177364b7a 100644 > --- a/gcc/cgraph.h > +++ b/gcc/cgraph.h > @@ -856,6 +856,9 @@ struct GTY((for_user)) cgraph_function_version_info { > dispatcher. The dispatcher decl is an alias to the resolver > function decl. */ > tree dispatcher_resolver; > + > + /* The assmbly name of the function set before version mangling. */ > + tree assembler_name; > }; > > #define DEFCIFCODE(code, type, string) CIF_ ## code, > diff --git a/gcc/cp/decl.cc b/gcc/cp/decl.cc > index 3b3b4481964..fdef98f8062 100644 > --- a/gcc/cp/decl.cc > +++ b/gcc/cp/decl.cc > @@ -1273,6 +1273,12 @@ maybe_mark_function_versioned (tree decl) > { > if (!DECL_FUNCTION_VERSIONED (decl)) > { > + cgraph_node *node = cgraph_node::get_create (decl); > + if (!node->function_version ()) > + node->insert_new_function_version (); > + if (!node->function_version ()->assembler_name) > + node->function_version ()->assembler_name = DECL_ASSEMBLER_NAME (decl); > + > DECL_FUNCTION_VERSIONED (decl) = 1; > /* If DECL_ASSEMBLER_NAME has already been set, re-mangle > to include the version marker. */ > @@ -6155,6 +6161,20 @@ start_decl (const cp_declarator *declarator, > > was_public = TREE_PUBLIC (decl); > > + /* Set the assembler string for any versioned function. */ > + if (TREE_CODE (decl) == FUNCTION_DECL > + && (lookup_attribute (TARGET_HAS_FMV_TARGET_ATTRIBUTE ? "target" > + : "target_version", > + DECL_ATTRIBUTES (decl)) > + || lookup_attribute ("target_clones", DECL_ATTRIBUTES (decl)))) > + { > + cgraph_node *node = cgraph_node::get_create (decl); > + if (!node->function_version ()) > + node->insert_new_function_version (); > + if (!node->function_version ()->assembler_name) > + node->function_version ()->assembler_name = DECL_ASSEMBLER_NAME (decl); > + } function_version () is a hash lookup, so I think we should try to minimise the number of calls. E.g.: auto *decl_version = node->function_version (); if (!decl_version) decl_version = node->insert_new_function_version (); It'd also be good avoid the cut-&-paste, in the sense that the C frontend has two copies of the same code, and similarly the C++ frontend. Thanks, Richard > + > if ((DECL_EXTERNAL (decl) || TREE_CODE (decl) == FUNCTION_DECL) > && current_function_decl) > { > @@ -18743,6 +18763,20 @@ start_preparsed_function (tree decl1, tree attrs, int flags) > if (!DECL_OMP_DECLARE_REDUCTION_P (decl1)) > start_lambda_scope (decl1); > > + /* Set the assembler string for any versioned function. */ > + if (TREE_CODE (decl1) == FUNCTION_DECL > + && (lookup_attribute (TARGET_HAS_FMV_TARGET_ATTRIBUTE ? "target" > + : "target_version", > + DECL_ATTRIBUTES (decl1)) > + || lookup_attribute ("target_clones", DECL_ATTRIBUTES (decl1)))) > + { > + cgraph_node *node = cgraph_node::get_create (decl1); > + if (!node->function_version ()) > + node->insert_new_function_version (); > + if (!node->function_version ()->assembler_name) > + node->function_version ()->assembler_name = DECL_ASSEMBLER_NAME (decl1); > + } > + > return true; > } >
On 04/02/2025 08:41, Richard Sandiford wrote: > Alfie Richards <alfie.richards@arm.com> writes: >> This adds the assembler_name member to cgraph_function_version_info >> to store the base assembler name for the function to be mangled. This is >> used in later patches for refactoring FMV mangling. >> >> gcc/c/ChangeLog: >> >> * c-decl.cc (start_decl): Record assembler_name. >> (start_function): Record assembler_name. >> >> gcc/ChangeLog: >> >> * cgraph.cc (cgraph_node::record_function_versions): Record >> assembler_name. >> * cgraph.h (struct cgraph_function_version_info): Add assembler_name. >> >> gcc/cp/ChangeLog: >> >> * decl.cc (maybe_mark_function_versioned): Record assember_name. >> (start_decl): Record assembler_name. >> (start_preparsed_function): Record assembler_name. > I'm not really qualified to review this part, but FWIW, my main question > would be: is it safe to cache the DECL_ASSEMBLER_NAME so early? E.g. wrt > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117987 , it looks like the > C frontend applies the asm in finish_decl rather than start_decl. > I don't know whether the name could change even later, or whether > it is supposed to be final after finish_decl. You're absolutely right, this is definitely the wrong time to do this. I have found a better way and will send an updated version shortly. This was also the reasons for the CI failures I didn't catch in my testing, as it was subtly unsound.Sorry about this. > Also: >> --- >> gcc/c/c-decl.cc | 20 ++++++++++++++++++++ >> gcc/cgraph.cc | 10 ++++++++-- >> gcc/cgraph.h | 3 +++ >> gcc/cp/decl.cc | 34 ++++++++++++++++++++++++++++++++++ >> 4 files changed, 65 insertions(+), 2 deletions(-) >> >> diff --git a/gcc/c/c-decl.cc b/gcc/c/c-decl.cc >> index 0dcbae9b26f..daa19f360e6 100644 >> --- a/gcc/c/c-decl.cc >> +++ b/gcc/c/c-decl.cc >> @@ -5762,6 +5762,16 @@ start_decl (struct c_declarator *declarator, struct c_declspecs *declspecs, >> && VAR_OR_FUNCTION_DECL_P (decl)) >> objc_check_global_decl (decl); >> >> + /* Store the base assembler name for mangling later. */ >> + if (TREE_CODE (decl) == FUNCTION_DECL >> + && lookup_attribute ("target_clones", DECL_ATTRIBUTES (decl))) >> + { >> + cgraph_node *node = cgraph_node::get_create (decl); >> + if (!node->function_version ()) >> + node->insert_new_function_version (); >> + node->function_version ()->assembler_name = DECL_ASSEMBLER_NAME (decl); >> + } >> + >> /* Add this decl to the current scope. >> TEM may equal DECL or it may be a previous decl of the same name. */ >> if (do_push) >> @@ -10863,6 +10873,16 @@ start_function (struct c_declspecs *declspecs, struct c_declarator *declarator, >> >> current_function_decl = pushdecl (decl1); >> >> + /* Store the base assembler name for mangling later. */ >> + if (TREE_CODE (decl1) == FUNCTION_DECL >> + && lookup_attribute ("target_clones", DECL_ATTRIBUTES (decl1))) >> + { >> + cgraph_node *node = cgraph_node::get_create (decl1); >> + if (!node->function_version ()) >> + node->insert_new_function_version (); >> + node->function_version ()->assembler_name = DECL_ASSEMBLER_NAME (decl1); >> + } >> + >> if (tree access = build_attr_access_from_parms (parms, false)) >> decl_attributes (¤t_function_decl, access, ATTR_FLAG_INTERNAL, >> old_decl); >> diff --git a/gcc/cgraph.cc b/gcc/cgraph.cc >> index 1ea38d16e56..c2038be4671 100644 >> --- a/gcc/cgraph.cc >> +++ b/gcc/cgraph.cc >> @@ -252,10 +252,16 @@ cgraph_node::record_function_versions (tree decl1, tree decl2) >> decl2_v = decl2_node->function_version (); >> >> if (decl1_v == NULL) >> - decl1_v = decl1_node->insert_new_function_version (); >> + { >> + decl1_v = decl1_node->insert_new_function_version (); >> + decl1_v->assembler_name = DECL_ASSEMBLER_NAME (decl1); >> + } >> >> if (decl2_v == NULL) >> - decl2_v = decl2_node->insert_new_function_version (); >> + { >> + decl2_v = decl2_node->insert_new_function_version (); >> + decl2_v->assembler_name = DECL_ASSEMBLER_NAME (decl2); >> + } >> >> gcc_assert (decl1_v); >> gcc_assert (decl2_v); >> diff --git a/gcc/cgraph.h b/gcc/cgraph.h >> index 065fcc742e8..d9177364b7a 100644 >> --- a/gcc/cgraph.h >> +++ b/gcc/cgraph.h >> @@ -856,6 +856,9 @@ struct GTY((for_user)) cgraph_function_version_info { >> dispatcher. The dispatcher decl is an alias to the resolver >> function decl. */ >> tree dispatcher_resolver; >> + >> + /* The assmbly name of the function set before version mangling. */ >> + tree assembler_name; >> }; >> >> #define DEFCIFCODE(code, type, string) CIF_ ## code, >> diff --git a/gcc/cp/decl.cc b/gcc/cp/decl.cc >> index 3b3b4481964..fdef98f8062 100644 >> --- a/gcc/cp/decl.cc >> +++ b/gcc/cp/decl.cc >> @@ -1273,6 +1273,12 @@ maybe_mark_function_versioned (tree decl) >> { >> if (!DECL_FUNCTION_VERSIONED (decl)) >> { >> + cgraph_node *node = cgraph_node::get_create (decl); >> + if (!node->function_version ()) >> + node->insert_new_function_version (); >> + if (!node->function_version ()->assembler_name) >> + node->function_version ()->assembler_name = DECL_ASSEMBLER_NAME (decl); >> + >> DECL_FUNCTION_VERSIONED (decl) = 1; >> /* If DECL_ASSEMBLER_NAME has already been set, re-mangle >> to include the version marker. */ >> @@ -6155,6 +6161,20 @@ start_decl (const cp_declarator *declarator, >> >> was_public = TREE_PUBLIC (decl); >> >> + /* Set the assembler string for any versioned function. */ >> + if (TREE_CODE (decl) == FUNCTION_DECL >> + && (lookup_attribute (TARGET_HAS_FMV_TARGET_ATTRIBUTE ? "target" >> + : "target_version", >> + DECL_ATTRIBUTES (decl)) >> + || lookup_attribute ("target_clones", DECL_ATTRIBUTES (decl)))) >> + { >> + cgraph_node *node = cgraph_node::get_create (decl); >> + if (!node->function_version ()) >> + node->insert_new_function_version (); >> + if (!node->function_version ()->assembler_name) >> + node->function_version ()->assembler_name = DECL_ASSEMBLER_NAME (decl); >> + } > function_version () is a hash lookup, so I think we should try to minimise > the number of calls. E.g.: > > auto *decl_version = node->function_version (); > if (!decl_version) > decl_version = node->insert_new_function_version (); > > It'd also be good avoid the cut-&-paste, in the sense that the C frontend > has two copies of the same code, and similarly the C++ frontend. > > Thanks, > Richard > >> + >> if ((DECL_EXTERNAL (decl) || TREE_CODE (decl) == FUNCTION_DECL) >> && current_function_decl) >> { >> @@ -18743,6 +18763,20 @@ start_preparsed_function (tree decl1, tree attrs, int flags) >> if (!DECL_OMP_DECLARE_REDUCTION_P (decl1)) >> start_lambda_scope (decl1); >> >> + /* Set the assembler string for any versioned function. */ >> + if (TREE_CODE (decl1) == FUNCTION_DECL >> + && (lookup_attribute (TARGET_HAS_FMV_TARGET_ATTRIBUTE ? "target" >> + : "target_version", >> + DECL_ATTRIBUTES (decl1)) >> + || lookup_attribute ("target_clones", DECL_ATTRIBUTES (decl1)))) >> + { >> + cgraph_node *node = cgraph_node::get_create (decl1); >> + if (!node->function_version ()) >> + node->insert_new_function_version (); >> + if (!node->function_version ()->assembler_name) >> + node->function_version ()->assembler_name = DECL_ASSEMBLER_NAME (decl1); >> + } >> + >> return true; >> } >>
diff --git a/gcc/c/c-decl.cc b/gcc/c/c-decl.cc index 0dcbae9b26f..daa19f360e6 100644 --- a/gcc/c/c-decl.cc +++ b/gcc/c/c-decl.cc @@ -5762,6 +5762,16 @@ start_decl (struct c_declarator *declarator, struct c_declspecs *declspecs, && VAR_OR_FUNCTION_DECL_P (decl)) objc_check_global_decl (decl); + /* Store the base assembler name for mangling later. */ + if (TREE_CODE (decl) == FUNCTION_DECL + && lookup_attribute ("target_clones", DECL_ATTRIBUTES (decl))) + { + cgraph_node *node = cgraph_node::get_create (decl); + if (!node->function_version ()) + node->insert_new_function_version (); + node->function_version ()->assembler_name = DECL_ASSEMBLER_NAME (decl); + } + /* Add this decl to the current scope. TEM may equal DECL or it may be a previous decl of the same name. */ if (do_push) @@ -10863,6 +10873,16 @@ start_function (struct c_declspecs *declspecs, struct c_declarator *declarator, current_function_decl = pushdecl (decl1); + /* Store the base assembler name for mangling later. */ + if (TREE_CODE (decl1) == FUNCTION_DECL + && lookup_attribute ("target_clones", DECL_ATTRIBUTES (decl1))) + { + cgraph_node *node = cgraph_node::get_create (decl1); + if (!node->function_version ()) + node->insert_new_function_version (); + node->function_version ()->assembler_name = DECL_ASSEMBLER_NAME (decl1); + } + if (tree access = build_attr_access_from_parms (parms, false)) decl_attributes (¤t_function_decl, access, ATTR_FLAG_INTERNAL, old_decl); diff --git a/gcc/cgraph.cc b/gcc/cgraph.cc index 1ea38d16e56..c2038be4671 100644 --- a/gcc/cgraph.cc +++ b/gcc/cgraph.cc @@ -252,10 +252,16 @@ cgraph_node::record_function_versions (tree decl1, tree decl2) decl2_v = decl2_node->function_version (); if (decl1_v == NULL) - decl1_v = decl1_node->insert_new_function_version (); + { + decl1_v = decl1_node->insert_new_function_version (); + decl1_v->assembler_name = DECL_ASSEMBLER_NAME (decl1); + } if (decl2_v == NULL) - decl2_v = decl2_node->insert_new_function_version (); + { + decl2_v = decl2_node->insert_new_function_version (); + decl2_v->assembler_name = DECL_ASSEMBLER_NAME (decl2); + } gcc_assert (decl1_v); gcc_assert (decl2_v); diff --git a/gcc/cgraph.h b/gcc/cgraph.h index 065fcc742e8..d9177364b7a 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -856,6 +856,9 @@ struct GTY((for_user)) cgraph_function_version_info { dispatcher. The dispatcher decl is an alias to the resolver function decl. */ tree dispatcher_resolver; + + /* The assmbly name of the function set before version mangling. */ + tree assembler_name; }; #define DEFCIFCODE(code, type, string) CIF_ ## code, diff --git a/gcc/cp/decl.cc b/gcc/cp/decl.cc index 3b3b4481964..fdef98f8062 100644 --- a/gcc/cp/decl.cc +++ b/gcc/cp/decl.cc @@ -1273,6 +1273,12 @@ maybe_mark_function_versioned (tree decl) { if (!DECL_FUNCTION_VERSIONED (decl)) { + cgraph_node *node = cgraph_node::get_create (decl); + if (!node->function_version ()) + node->insert_new_function_version (); + if (!node->function_version ()->assembler_name) + node->function_version ()->assembler_name = DECL_ASSEMBLER_NAME (decl); + DECL_FUNCTION_VERSIONED (decl) = 1; /* If DECL_ASSEMBLER_NAME has already been set, re-mangle to include the version marker. */ @@ -6155,6 +6161,20 @@ start_decl (const cp_declarator *declarator, was_public = TREE_PUBLIC (decl); + /* Set the assembler string for any versioned function. */ + if (TREE_CODE (decl) == FUNCTION_DECL + && (lookup_attribute (TARGET_HAS_FMV_TARGET_ATTRIBUTE ? "target" + : "target_version", + DECL_ATTRIBUTES (decl)) + || lookup_attribute ("target_clones", DECL_ATTRIBUTES (decl)))) + { + cgraph_node *node = cgraph_node::get_create (decl); + if (!node->function_version ()) + node->insert_new_function_version (); + if (!node->function_version ()->assembler_name) + node->function_version ()->assembler_name = DECL_ASSEMBLER_NAME (decl); + } + if ((DECL_EXTERNAL (decl) || TREE_CODE (decl) == FUNCTION_DECL) && current_function_decl) { @@ -18743,6 +18763,20 @@ start_preparsed_function (tree decl1, tree attrs, int flags) if (!DECL_OMP_DECLARE_REDUCTION_P (decl1)) start_lambda_scope (decl1); + /* Set the assembler string for any versioned function. */ + if (TREE_CODE (decl1) == FUNCTION_DECL + && (lookup_attribute (TARGET_HAS_FMV_TARGET_ATTRIBUTE ? "target" + : "target_version", + DECL_ATTRIBUTES (decl1)) + || lookup_attribute ("target_clones", DECL_ATTRIBUTES (decl1)))) + { + cgraph_node *node = cgraph_node::get_create (decl1); + if (!node->function_version ()) + node->insert_new_function_version (); + if (!node->function_version ()->assembler_name) + node->function_version ()->assembler_name = DECL_ASSEMBLER_NAME (decl1); + } + return true; }