From patchwork Fri Nov 17 02:49:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Carlotti X-Patchwork-Id: 1864918 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-armh-onmicrosoft-com header.b=UnZCDWyU; dkim=pass (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-armh-onmicrosoft-com header.b=UnZCDWyU; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SWhG02DSwz1yS4 for ; Fri, 17 Nov 2023 13:50:00 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 831333858D38 for ; Fri, 17 Nov 2023 02:49:57 +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-vi1eur05on2079.outbound.protection.outlook.com [40.107.21.79]) by sourceware.org (Postfix) with ESMTPS id 9A4883858D20 for ; Fri, 17 Nov 2023 02:49:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9A4883858D20 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 9A4883858D20 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.21.79 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1700189383; cv=pass; b=maEpZwU1jK9i4gEqEGS9v0HeKWXnQIIjT27GpqW/Gi8E+Q1sGWfe0dfBvY4dwRmLrR5fsT26VPBhm+AZef1jaCOpUnWrzvJAcPMwJSi49qgz/8lg0zu7MuqPe5Wcyf8fAZKpFbd+MTK3yLlAhPX3/IErihjqXl/oHnaGsgltqiQ= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1700189383; c=relaxed/simple; bh=d3Zh1oiopU2GBKjub71EdmLtr9dY+i3WB4sDhBaz1Jo=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=Scm9xQ4nmgfnsPu7QCMDccyQ76zFboOKQluhXfzR1RL1Ov/R5bPwcPKFZTds24MPfOoK5awDsYOOjKD6NHcOzGHMiXmGRUYLT2Kep8lj8SgNLk345YdLMar5zLahq57TD3xZ9KRU13IvL5MVw/8hb8GnORPHuuSPqYB+uVD3Lng= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=P/I6JX6bfua7HSgza73GMpro4eDxNFD/0CR04LY32tzyapxUdCHzj8IHTP9+jKFqEVPlu5GRY59Q5FeSji0gWLvZFWs0UFeglt3HJ2hK8hAcQu4l/qcNuhWMoXdk71+AxmA21b2og1hupRYtf1zEoQ9Y5XwsbGiFJeIJt3NnalSzeIsx7esNTtx7jezbT5HKYLhcO/jcDJLYVS7gJnB5QqcxXXR5WYPREJFtFlZmn6406I5wyoZoBZPqucbneCYhY6Ydba5gpwdleuTWl87QTv1X+bVC9QfB9DelwfLNyVRop680wj4wuqmvVDT2MvczWU3kQyrkZMrIoXbpIdkeiA== 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=CPc/qp8mpqk+yKwPn2WwCQTkX/DzeERVvNrw94Z1fAE=; b=aPGQAXFecLQ4+eSwU84sdae+TzwJkrOL4gDZEDHSnYcpMUULIA0f/6vMAFrObPhWqSGFAvTPlAepLfsfhEExY5ufXIHGWVR6chEX8Ou4Et8SHUJi0/cPqGtNuT/NKZsk2rpqrKJj6ffCblYdQQ8UqOny8JRFHObKvP6LaLpv3345w3M8f8B01UlNf9xRLQaAxYwOHnwQOsFZ3iyjQHvKhywZO2l1rWK0iKvj+zIWan4wGkhq6c66cV+/D6Wo7//+sjT8N3y7e/JtgIQ5fSbCK7wndK9Ab7xuhnW6wKMTFKCqS8DO3Pkv1y4XlktRrFbMY/QcrMw2VUySkxV7VmTZkA== 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=CPc/qp8mpqk+yKwPn2WwCQTkX/DzeERVvNrw94Z1fAE=; b=UnZCDWyUxLbxZVAPS6i8fqB3LQbK6/qI2dCYwbUWwPMUg9RQdtoNxkJ7ngHL8HZ8JAY97EEaD492J+mPqea1dsABpIsPfEwLoqrsKbjS4s3xbAX/6PUevQD9bkHiCMUQJGaX/O8DsMav+rmF593i0SRwmuamiJKBv1lS6pxPNsE= Received: from AS8P189CA0020.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:31f::8) by PAVPR08MB9379.eurprd08.prod.outlook.com (2603:10a6:102:300::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.21; Fri, 17 Nov 2023 02:49:30 +0000 Received: from AMS0EPF0000019A.eurprd05.prod.outlook.com (2603:10a6:20b:31f:cafe::b7) by AS8P189CA0020.outlook.office365.com (2603:10a6:20b:31f::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.23 via Frontend Transport; Fri, 17 Nov 2023 02:49:30 +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 AMS0EPF0000019A.mail.protection.outlook.com (10.167.16.246) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.20 via Frontend Transport; Fri, 17 Nov 2023 02:49:29 +0000 Received: ("Tessian outbound 20615a7e7970:v228"); Fri, 17 Nov 2023 02:49:29 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 0dc28efb6494c484 X-CR-MTA-TID: 64aa7808 Received: from 82be6b6b3825.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 18B958CE-A83A-4D2F-98E6-324A67E8E374.1; Fri, 17 Nov 2023 02:49:23 +0000 Received: from EUR03-AM7-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 82be6b6b3825.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 17 Nov 2023 02:49:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Wmm6qYoUneIy60fJtmUGwQx/9bvFCB5LW3EUB4g/hPsORtfXtTe/m71iUxBMBcyiq18o4aMFtaoPFegK88W+EDYHG34bGRaaqzL61ihE6HFyhYPWZI0bE+PQ6TMW07I2gl78+Lq+JgvjdW7a7K4/zj2fZn6Ayxruxhb6t0pAMRHBjh+yBQiDA83fI9B7JDpcoRFe3sjCdouYDx4wqwgScFl13I55At3nmb6VNjj3o9fGEvHm/gCnezUiExGSkntR/vfUgatkDOZxSMdvBcDGje+3rpLe+m+8GCNbD91yjTtV6z3rCr+yDQbf/7F2XerBwYJxxt49DfjA8V53INa16g== 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=CPc/qp8mpqk+yKwPn2WwCQTkX/DzeERVvNrw94Z1fAE=; b=nHacLAAJKu0Z+Rc58yKOd2HNzLg8zj/2P8l2a27aiRGfepKixHdPjiFFPphm+PmdgV5VNa9g02zQzefMZMocOXKgtiyzSVnBdb5VP4ffIA04DwBXZSGALnlvVEPLcLzSNJxe8olxAKEkKtdBugW+E96sNUaVhzJmIrSRIOpVWMICzAfZqWY1Gt9AYHbv6mAc2+noFZmy9ezMuZao2Bug5/BMzi3F/YbyoZsrbzOFF6gxdkcYHs+HTDGWTafj63iKPBlb9yGmvw0Tc/PKNJmZyCXRkXRbqM+h2hYG1WoIQm9j1hMRg5PL8Sr2x13tgOqFdrjNOe+emNFoaByqLg/KEg== 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=CPc/qp8mpqk+yKwPn2WwCQTkX/DzeERVvNrw94Z1fAE=; b=UnZCDWyUxLbxZVAPS6i8fqB3LQbK6/qI2dCYwbUWwPMUg9RQdtoNxkJ7ngHL8HZ8JAY97EEaD492J+mPqea1dsABpIsPfEwLoqrsKbjS4s3xbAX/6PUevQD9bkHiCMUQJGaX/O8DsMav+rmF593i0SRwmuamiJKBv1lS6pxPNsE= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from AS8PR08MB6678.eurprd08.prod.outlook.com (2603:10a6:20b:398::8) by AS8PR08MB9409.eurprd08.prod.outlook.com (2603:10a6:20b:5a8::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.21; Fri, 17 Nov 2023 02:49:20 +0000 Received: from AS8PR08MB6678.eurprd08.prod.outlook.com ([fe80::af15:c9d7:cd8c:6da2]) by AS8PR08MB6678.eurprd08.prod.outlook.com ([fe80::af15:c9d7:cd8c:6da2%7]) with mapi id 15.20.7002.022; Fri, 17 Nov 2023 02:49:20 +0000 Date: Fri, 17 Nov 2023 02:49:17 +0000 From: Andrew Carlotti To: gcc-patches@gcc.gnu.org Cc: ebotcazou@libertysurf.fr, poulhies@adacore.com, ibuclaw@gdcproject.org, jason@redhat.com, nathan@acm.org, rguenther@suse.de, richard.sandiford@arm.com, richard.earnshaw@arm.com Subject: [PATCH v2 0/5] target_version and aarch64 function multiversioning Message-ID: <88dc78af-82a3-9a9f-4b8e-461c41d296cc@e124511.cambridge.arm.com> Content-Disposition: inline X-ClientProxiedBy: LO2P265CA0301.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a5::25) To AS8PR08MB6678.eurprd08.prod.outlook.com (2603:10a6:20b:398::8) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: AS8PR08MB6678:EE_|AS8PR08MB9409:EE_|AMS0EPF0000019A:EE_|PAVPR08MB9379:EE_ X-MS-Office365-Filtering-Correlation-Id: f77617cf-8b02-466f-ba8e-08dbe717d23a 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: bPfkN82U/G1Jt9Y0IUDh3qSGkw0nnFByNVezSysOmPOtAu2VQSvVbS7zSJVzj4aAJ0LVDNCgWcpHZMDFK2j5r1RHW08PHm5JnKsNdHIBQAgsS1RXJXWy7L9nG7Ze6NmT/kW6JdbfDmt3LniU0pl/RiaGDSUjaC12OUxMRiya2EJlPJBzNPPciqcsLCsOggRPoYafwHcvUKjou7+zHqENm6yP7t+0Z5aN0fobjbfN1ln7lBWkF/mxQ8zBFW0b+tUMNxOCTNj2TeoQdsZ3ZYd0RC0LZXKzCnxbdQi0vnoA2k1jdkRY52Kh2b6f8m7B1sx2yRH+xkq1nk9x7zLc62jyZUGLSq9/juS5Xrqm6MFcQZn2+393DRWV63GA+uAJpskPlkJYYTSWSWxt7s0ce24pvGtL9oz/KfiZ7bAOyB6Zr5j9rOiKS9fN4Yd3JLOJhjfKX0JuQ/B6999a8mksLGPk7fYOx5HxZxmjrdUZ0A8o0HEo9LorG5aoB1/wJZAlztvBuUCmZwFUwziIqw5uao7ZVx+WXa3V0Ldlm8dhJRjilVnJcNvnwLIZKvpI6+Tt/XJHun0RSV+Vx+EDENjKjMxENmgHqfLa3yHx9qNfx6T9qCqD5Ture09Iplb2/nEGA83T X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR08MB6678.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(346002)(366004)(39860400002)(376002)(396003)(136003)(230922051799003)(1800799009)(186009)(64100799003)(451199024)(2906002)(31686004)(38100700002)(31696002)(86362001)(5660300002)(44832011)(4326008)(41300700001)(8936002)(8676002)(83380400001)(6916009)(6512007)(316002)(26005)(66556008)(66946007)(66476007)(6666004)(478600001)(6506007)(6486002)(41080700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB9409 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: AMS0EPF0000019A.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 13e58264-acec-415f-eeb5-08dbe717cc75 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3W68Bym7R5rE1Ds2/wKOJ0b7KkzZ4jYrswZo6jl9f9FxmlkSBrAGGFsx7FcHCgHCAiLLSi1rbfGHIddwGeATRezF51OP/U4oovlvzVOo+9Cqd1JXvAp0G7auTqVlz8yKL1n9/Dz8kMEc8SaoWOhICkN5Fo/DKTOtLvZajk9N+lgp/ZWbHCehqOHKvwOT+Soign11iRpA7dpfd+0P2wdiexcVoC5eG/19EhTr2TDVY/B38Tkr5i9IvuG0KN36SpEy971OvsDIg4xGiQ/8GBFKi2g7ReUo0FJvmTHGmeGToCRZTyeqtk6+Va504yEXHG5nkwJBwNzR+/WdEv2OLy1pRe2ffnxGl/LHCgLTVEYL+RYDJ0P4EZj8esWoDEEan6A7k9cAcVkVmbgktaVs/fW5toX50BxwkLAtYeT+SHUsWh50OMwORs78Qe75WcWB7vVC9Wk+70ZBY8Db2S8QR2PcEKyTWzVUHYZUjQ2TsRFu4cS6nQAYNe63RfkqjC6b6LSprkAzz9rkZta6XvkZdPTfhu2rQkG4OUiiv4yZ39WZSM5HzvHKykiC2sggSh+FFMpfq363RABfFoFN+cW1lHMcC2SzwbEZx7EGjonqDNtgo70LCUR6RsS4EVOhy0+p3fXxA/lY8/VLJss0N39Dl4Qc0OhRbWmWB7SmElWTku/obF+eYpJ9XY7evwWbAczcE4ifGGM6ptYrpDz4grXn4Bqnt4ZAG93qXbVlLvTv/OAKWzL2LGpOd+uJVFwGq5TjYsQY 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)(39860400002)(346002)(136003)(376002)(396003)(230922051799003)(186009)(1800799009)(82310400011)(451199024)(64100799003)(46966006)(36840700001)(40470700004)(5660300002)(2906002)(31686004)(86362001)(31696002)(44832011)(8936002)(70206006)(41300700001)(70586007)(4326008)(6916009)(8676002)(316002)(6506007)(36860700001)(6512007)(47076005)(40480700001)(356005)(478600001)(81166007)(6486002)(83380400001)(40460700003)(26005)(336012)(6666004)(82740400003); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Nov 2023 02:49:29.9916 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f77617cf-8b02-466f-ba8e-08dbe717d23a 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: AMS0EPF0000019A.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR08MB9379 X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, 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=no 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+incoming=patchwork.ozlabs.org@gcc.gnu.org This series adds support for function multiversioning on aarch64. Patch 1/5 is a repost of my copy of Pavel's aarch64 cpu feature detection code to libgcc. This is slightly refactored in a later patch, but I've preserved this patch as-is to make the attribution clearer. Patches 2/5 and 3/5 are minor cleanups in the c-family and Ada attribute exclusion handling, to support further tweaks to attribute exclusion handling for c-family, Ada and D in patch 4. Patch 4/5 adds support for the target_version attribute to the middle end and C++ frontend, but should otherwise have no functional changes. Patch 5/5 uses this support to implement function multiversioning in aarch64. I plan to improve the existing documentation and tests, including covering the new functionality, in subsequent commits (perhaps after fixing some of the current ABI issues). I'm happy with the state of patches 2-4. Patches 1 and 5 have various outstanding issues, most of which require fixes to the ACLE as well. It might be best to push these patches in something like their current form, and then push incremental fixes once we've agreed on the relevant specification changes. The series passes regression testing on both x86 and aarch64 for C and C++. I haven't got an Ada or D compiler on my build machine, so I haven't tested these languages; however, I tested using the same code and making equivalent changes in the C++ frontend, to verify their (minimal) impact upon attribute processing functionality. Thanks, Andrew