From patchwork Tue Oct 15 08:22:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamar Christina X-Patchwork-Id: 1997247 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=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=RkEqaiiv; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=RkEqaiiv; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; 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 [IPv6:2620:52:3:1:0:246e:9693:128c]) (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 4XSRvS1V8hz1xsc for ; Tue, 15 Oct 2024 19:23:47 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4B296385828B for ; Tue, 15 Oct 2024 08:23:45 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR03-VI1-obe.outbound.protection.outlook.com (mail-vi1eur03on20617.outbound.protection.outlook.com [IPv6:2a01:111:f403:260c::617]) by sourceware.org (Postfix) with ESMTPS id A0E203858D20; Tue, 15 Oct 2024 08:23:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A0E203858D20 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 A0E203858D20 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:260c::617 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1728980606; cv=pass; b=CK3ronX2RwSs1MGX63brb9BW79Rg3W1+eTa+i8B/+UV4EXWrOeHRVxiNmai8iToQ/mX9kxM5lJrJBwTQvfH78kiIy2jaTb1vdL9ZpyRgoUmlWDH7lO92pIT2N7ELXOOHa5ojsqJMTT1gyTEyFzr3093k/sTNgAbW2BQw2Gi4pSc= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1728980606; c=relaxed/simple; bh=E/mxq7ztj3Fo2y0gCjOkexKjDPeTpXFrzh8pMNx1uL8=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=KaXwQN7s0wBFxb+zJOX3g/ARPlrMgry+1WQGIRQNVvWlmvhWyj9JjWLOTh0nM08hxQLa8FiRrbfBVTb2Yq9BTeeTU9naHjnIWdBSS1q1euTPKZF//JQ+jwvruzFL440VQjK/kPLWwsLjxdj1EWBp+688qMqGeAYEgMXHSaVe7I8= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=k9agn95blHydWbS/nr5V3PDp/8vXMY3fSs63jqWNIMz+w+0RbcyoRKqKRMa4hqJXgubyW/XDtUFACTde1YqSZJHp5A2GZhA/DFx1U/sK4JrX3747z677tlrZLbyiHaM1KJWevWd2Aro5XPX2JGHlExAZE4x1xvMFnGAzY9ot6uJJUo1tjQ47e4zVBHUolzbbai1Jth5P5uUfPMBKCubEmUzZvBgoEZ5yLiXMwftorEvVIiOV8Vp7DAgJjL/CpxEFJ+lJd/5Iz7oTbzhBNS8C3vzOOMXuTOoipYgAT1bmgTD29dhRWVSl6ZgqVJVLrHAg8UT0mXNsA0nf2E1xSWTFZQ== 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=ENxY6MGL237HNUNrjsZ0aJujD7qIWs6emGgnlgQOHK0=; b=QY12n85lY6UpAN+545BihsTW/WVl5eBmHLB7VaShM5p5XcmlcH/DyFC2OMb5j/o96KpGfWzh0DwE1JJZ4/FucXFFoKDP5KqcZCMMseFi2vqZEy7696EIFHiYXuHH+t4VPX7nilxFkaEPptndcV+Ba+ASmdsVkYXqqtHp/RIfMFDsLXiOn7C1IiQWDufCM6+btRWqxRoykyaJzOJ04EfF3KM3IRLKzXaHazU2DA41pL9QFklrCJuzO5dI1cm83eWYqVPEi9M+Khw3rdnrNGrQwkFJU3jnCCSlkrUgcoMTFLKVl6OJrPbZIK3CSBtkoItDAQhK5qrmRRvPey8dHRWnig== 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=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=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ENxY6MGL237HNUNrjsZ0aJujD7qIWs6emGgnlgQOHK0=; b=RkEqaiivdrHZnFlwVp+dEdAsgaaW7Vb0PmRSMC3enGVvPicUt2b2jWxtinec5CaDzfwOt0wQNsSiiHVI64DmRkQ4WeYJxkY3K8SxpjYap2flnJX3qqwTYrJliWIgVWvG6LQpa/d8pc4wf7l5J7esa2dtsIyJDSftBUrqDZIuCVk= Received: from DU7P194CA0028.EURP194.PROD.OUTLOOK.COM (2603:10a6:10:553::12) by DU0PR08MB7739.eurprd08.prod.outlook.com (2603:10a6:10:3bd::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.26; Tue, 15 Oct 2024 08:23:09 +0000 Received: from DB3PEPF0000885E.eurprd02.prod.outlook.com (2603:10a6:10:553:cafe::c8) by DU7P194CA0028.outlook.office365.com (2603:10a6:10:553::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.17 via Frontend Transport; Tue, 15 Oct 2024 08:23:09 +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 DB3PEPF0000885E.mail.protection.outlook.com (10.167.242.9) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8069.17 via Frontend Transport; Tue, 15 Oct 2024 08:23:07 +0000 Received: ("Tessian outbound 60a4253641a2:v473"); Tue, 15 Oct 2024 08:23:07 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 0df5b537d3b90e65 X-TessianGatewayMetadata: KseahMDHz4aqRO7ahwJhcAubgl33wQJsfwLXKRRZQgtO10safU6kLLeBA30gARVuJ5hraTpw/oGthBSFjnMCF+8FEn6p2JblV0xBBQ/xebVPz0cliMpyMLaj14OjGUsVpJZ9fbRq0dP/uYwxVsaHbQ== X-CR-MTA-TID: 64aa7808 Received: from Lc4064671886c.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 31D8405B-7837-4C34-BA13-91CBE575785B.1; Tue, 15 Oct 2024 08:23:00 +0000 Received: from EUR02-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id Lc4064671886c.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 15 Oct 2024 08:23:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=tYj4P5UI8QpDGCkdMv6ReJi66zSkHx1WSYk0wK65+JGYcyvd2jEnITiyHifR03T1dYS8sSV5eF95VVdWErL9rP2rPBb2wFpfLupksDISpMCCehWI7lyJUNs2e5g5MYFxRgd/yJxeQ4NhGxux0bWrihc6IZtnuAQRettV3bnFALlwRm5w6drPlz4NN6u1BLrhXBbYz4isYeM2MnMnCuyN6JbE1ToSEtUU9zH3UvIQKRvvyw2Bw/IZBbpQbPJPZanmDhP9x3n9AbEMGjus15Yax1ZS3kWHd/JQY8zkZS0AzOu/YxMatz9c6zl2ReyInrjsS/5nuEKt1ZqtLfQ0rzNZuA== 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=ENxY6MGL237HNUNrjsZ0aJujD7qIWs6emGgnlgQOHK0=; b=y0YERnOCNHRI9ZIbJx2qgknEMIimYWlzOsxjRDmcGE01TPwDP/bMy8UsgrT1bIJmJFKSD/5twazRIv02M07B03WqZcyjQKXso/perx8sKU7fXZR93Zatp2ZFaX1nX1uYD9xXyStCmT+BobBYutKXiyhaC0KOrebtbtVNpLdK0lqtrUhT7E1Up4U1Uh1NbuVqatgKYqctGN6ZUtRv7LjjUPLzFCn223+mNB3clR0k/MRjUDLtprt5FiXosphBNF3iP8jEV7c1iUWVHBpvppjbbByc4Rf1aNrTCi04EHlO1FdHLxXebEpypnaQDj1ElZ9bXK7QLxWSYT9LWR5uBecJwg== 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=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ENxY6MGL237HNUNrjsZ0aJujD7qIWs6emGgnlgQOHK0=; b=RkEqaiivdrHZnFlwVp+dEdAsgaaW7Vb0PmRSMC3enGVvPicUt2b2jWxtinec5CaDzfwOt0wQNsSiiHVI64DmRkQ4WeYJxkY3K8SxpjYap2flnJX3qqwTYrJliWIgVWvG6LQpa/d8pc4wf7l5J7esa2dtsIyJDSftBUrqDZIuCVk= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) by PAWPR08MB9496.eurprd08.prod.outlook.com (2603:10a6:102:2ed::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.26; Tue, 15 Oct 2024 08:22:56 +0000 Received: from VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::89dc:c731:362b:7c69]) by VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::89dc:c731:362b:7c69%7]) with mapi id 15.20.8048.020; Tue, 15 Oct 2024 08:22:56 +0000 Date: Tue, 15 Oct 2024 09:22:53 +0100 From: Tamar Christina To: gcc-patches@gcc.gnu.org Cc: nd@arm.com, Richard.Earnshaw@arm.com, ktkachov@gcc.gnu.org, richard.sandiford@arm.com Subject: [PATCH]AArch64 re-enable memory access costing after SLP change. Message-ID: Content-Disposition: inline X-ClientProxiedBy: LO4P123CA0251.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a7::22) To VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB5325:EE_|PAWPR08MB9496:EE_|DB3PEPF0000885E:EE_|DU0PR08MB7739:EE_ X-MS-Office365-Filtering-Correlation-Id: 61fd3de2-1ddb-409e-b546-08dcecf2993d x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|376014|366016|1800799024; X-Microsoft-Antispam-Message-Info-Original: qofeD6rnBMBB6QcsuDAK45l+n+xyW4wdBxwWNXUBrWEL4rCMpFfxIoL+hxnLyVZhz4pxM4bKaz0h+4As3U72LmXixjkpjNdSLqJK1zhgUuZwIJe89qnQGrReEOwMQkfCjm4c03mDqF1emGF7wK6JbIVaLDdj4IKoo6QN3iSLp95rVx5GgP+YrVSurny7ge2iEgCp3iQcfIirGJ5q2WuYGl9FusfQmbHaYvSwDAK9zeHyyChI9Q8urpF5UdOEVtODnpnLykaiFYAtCghtWl9WoTi2qZnUsUNBPWMamxQvfGmjNuk9TvDc7XIaqyCejIBRVP5L1Rk99hpv+7YTpDCspuEsaiICk9OkPpmKbk7i/sIwY0Jgx0de3Ln7lzZydk1foR4HGZtnU3Tfyy6JVFT0OiaD/X4bTCHo/VNFsXLQluVB+QZ72m3UZK3WTaacjNaZnVt3yP2fIa98gZcilEzx4EMOpAaHXppadI4ox0Yn/2uU52dr+9ZOomt82BBMtWYIp2Fmay3CowjuV72ITLIv2qERFxnan4rBWC0GItYrwIy0ZdiacPmF2MzYmrs+tIRx+zX3t4oE+VM4lNRMeDi8eGMj2Z0XKxdL2ZTHCIedmlohoreKmHN+mhkOJl0Y4suRyRVN1IpfnXBicBvh5JRS6IDNyPhL5rfyaBEJengUGVzjtSptWOBr5ax/xTW1+9wSOL2KmHDoT8TolnM2sOT0+QWIrU6JutQXQ76N2rOK/rEmAOwHzZ/X8nID9ktqzQX8Vsd5G3GlAntqI9DKBkStncwENS1RLc1nC/yyxykJZAyknKM9v/NnTKmpA7PjjjqHW4pB+VpSpZPio8EkY86ZTVxz6KRnuEiW399xf6fiSJFyn6/LrHxuMFQwcVq1qKYhzUyUfo7XNbOEEpHBHq+ExnuIrDFq4U5WDRdiJY5PLsSnwKRUExJOQ1vlRZ9POk4iUQuzhPDBdhLaPjr67uHn1hwZctyQ1cU7E1nzlfj4cwOrM7N3mBCeaEOjwnTPbNrbUKFE044JCvae6m4kwMxBZIOh1TzpvyogXJxUY1WIP7aIzTGWwwhTvWhHY6gqW5iAH84pWBmn17eC9qY6Q3Io7Pwm46U/rBkdmJZM61dI2lYvYSUjELlIL2C55fKlWk2ju01Jy308A56tyuF3x6GGldiJojsQSChWA2e1OSORMq+bYVeEqqtbLF7CqN9J52Wctz1tQcP6UX1O9uMLsVm0VJrnyI0QknOOiDG41ER2Sc2IXeTP0SWZ7XSZ0SQhkKvDOUF/FXEOh4JcUIzJMqSwgQ== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR08MB5325.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(366016)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR08MB9496 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-SkipListedInternetSender: ip=[2603:10a6:803:13e::17]; domain=VI1PR08MB5325.eurprd08.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB3PEPF0000885E.eurprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 1b4fc07d-ccf9-4fed-338d-08dcecf29246 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|36860700013|82310400026|1800799024|35042699022; X-Microsoft-Antispam-Message-Info: =?utf-8?q?dtgK7YeoVghG8mow4s+DzZceuNcdJ5c?= =?utf-8?q?t0krDKFALvKUK+pMYMc+h0CNdZ53pQa2QLUwwCZYYG3SCUlXK8PfxDVngIfAJSFgC?= =?utf-8?q?Iwk61xmVQl20+bOflHh9lUJ1jGQJrpPQbyo5p79tWCPX9xMDDVfP07wChnmJ3XqNj?= =?utf-8?q?d20UoWLuRxN52r1KGzFULBnSRhVzBzAHkM8hK5NSOEaeI6iuqU/aCVTEFcPBZKnVS?= =?utf-8?q?tCTbG2Ffvg4FFa9DOvfth7YS/06WpSlh/mhL+jucznDjhWS3gAFLa60BhDxLpIkrX?= =?utf-8?q?wJ0XN79R011O04a0OfSShJR0FGyU82q0MkLP/wQ/p9Ghp00qgd1Hu3JZdEh10hCtE?= =?utf-8?q?/HsshERBGJcqsmeYXfdv4uEMEHW6Zx1RC1I6HMYUR8tMcFwhtV9MKCNGkC6FbnmJe?= =?utf-8?q?Cb5d+A9r9P8Er+6mZgtnxJUy0Kk9jMm2O0rcGfQOFHGFYqnB8f1+3qtlGXS+5cMcR?= =?utf-8?q?wdwazMZLcfFCnUpYFMxb/P5k5vJeeGZESsY3Qeb8HPL4i6frlHQI40wA29+81rDze?= =?utf-8?q?AkXsxoz5HcIRTiZdFlYR43CSzPJq797sqQu9gVYkssh02ucN2Xcbq29kHejdPcR4I?= =?utf-8?q?vtvhmDfoi7aaOZTmuxJ2/FAcp10Fm2iWRdW51fnyRCGhooK/prlcIw5ktgPkO6NIR?= =?utf-8?q?U/chi6JNrpTo46Wr4y+dHV8JfMJzJqIl8IXepZb4AHZDwd8F/k2sIxYOxYmKWNngq?= =?utf-8?q?yTqT6Z4CNBER5BFAu1qbXF4IpjgroHYtczpHV8tAWA8y+OVu/q6Qfhwiyz9fVV7yg?= =?utf-8?q?Z6dyZ4duPtWYDK0WLdCDR98DFov/QPblSACaXXJK0xU1gXCImgJTLBnHl4PFs66Bn?= =?utf-8?q?9rD/Zz9X1PeCObLjLgaekakxL23rx7mJCGyluQv1Rx6GDT0ZGP00WzX1y6aneHhmq?= =?utf-8?q?IzIRIo3wAmbMhtQOqxHbYEwUyQCEhxCJs0oevJZInK/J3NXLSrMe/Sxbx0kMFjRLu?= =?utf-8?q?lXx2vgnI0XdDcMQKAN90NCQIPkUB6q6zp+kSOfiriZjWOJlXwlkfzs5OjxG4oo1hP?= =?utf-8?q?bHZA9H7sEqtd/Fir9Tf+oXYgGOb09MASOyZnYwS77LHdUa2S68PBHE5N2jRRxoBXB?= =?utf-8?q?xVlytO30grS+HoBMr1jLoN58py2DuaWNG+3cFCzWXJaN+S2clI5OhoZa96IjRcG3A?= =?utf-8?q?hTTHs5dm/7Tu0bsy4tUPwHRhYZNDSiQSZRsh7g7nukzh7lE/YgdRE791/dPt+xFGN?= =?utf-8?q?i2p/RkA33sDfL0/BioYoAj1SSXkx1O6zU0CYBUypmNTCdk5SnEGE3UvsIMyFtQkj8?= =?utf-8?q?dLrkbxblEvdd0HUBa62eVq7iPToR9nO/J3ZGLzD+rNqehTwahmrIXo232rIO8qdBj?= =?utf-8?q?vwKLxeVZ3l9r?= 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:ErrorRetry; CAT:NONE; SFS:(13230040)(376014)(36860700013)(82310400026)(1800799024)(35042699022); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2024 08:23:07.6966 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 61fd3de2-1ddb-409e-b546-08dcecf2993d 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: DB3PEPF0000885E.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB7739 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, KAM_LOTSOFHASH, KAM_SHORT, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org Hi All, While chasing down a costing difference between SLP and non-SLP for memory access costing I noticed that at some point the SLP and non-SLP costing have diverged. It used to be we only supported LOAD_LANES in SLP and so the non-SLP costing was working fine. But with the change to SLP only we now lost costing. It looks like the vectorizer for non-SLP stores the VMAT type in STMT_VINFO_MEMORY_ACCESS_TYPE on the stmt_info, but for SLP it stores it in SLP_TREE_MEMORY_ACCESS_TYPE which is on the SLP node itself. While my first attempt of a patch was to just also store the VMAT in the stmt_info https://gcc.gnu.org/pipermail/gcc-patches/2024-October/665295.html Richi pointed out that this goes wrong when the same access is used Hybrid. And so we have to do a backend specific fix. To help out other backends this also introduces a generic helper function suggested by Richi in that patch (I hope that's ok.. I didn't want to split out just the helper.) This successfully restores VMAT based costing in the new SLP only world. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: * tree-vectorizer.h (vect_mem_access_type): New. * config/aarch64/aarch64.cc (aarch64_ld234_st234_vectors): Use it. (aarch64_detect_vector_stmt_subtype): Likewise. (aarch64_adjust_stmt_cost): Likewise. (aarch64_vector_costs::count_ops): Likewise. (aarch64_vector_costs::add_stmt_cost): Make SLP node named. --- -- diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc index 102680a0efca1ce928e6945033c01cfb68a65152..055b0ff47c68dc5e7560debe5a29dcdc9df21f8c 100644 --- a/gcc/config/aarch64/aarch64.cc +++ b/gcc/config/aarch64/aarch64.cc @@ -16278,7 +16278,7 @@ public: private: void record_potential_advsimd_unrolling (loop_vec_info); void analyze_loop_vinfo (loop_vec_info); - void count_ops (unsigned int, vect_cost_for_stmt, stmt_vec_info, + void count_ops (unsigned int, vect_cost_for_stmt, stmt_vec_info, slp_tree, aarch64_vec_op_count *); fractional_cost adjust_body_cost_sve (const aarch64_vec_op_count *, fractional_cost, unsigned int, @@ -16599,7 +16599,8 @@ aarch64_builtin_vectorization_cost (enum vect_cost_for_stmt type_of_cost, vector of an LD[234] or ST[234] operation. Return the total number of vectors (2, 3 or 4) if so, otherwise return a value outside that range. */ static int -aarch64_ld234_st234_vectors (vect_cost_for_stmt kind, stmt_vec_info stmt_info) +aarch64_ld234_st234_vectors (vect_cost_for_stmt kind, stmt_vec_info stmt_info, + slp_tree node) { if ((kind == vector_load || kind == unaligned_load @@ -16609,7 +16610,7 @@ aarch64_ld234_st234_vectors (vect_cost_for_stmt kind, stmt_vec_info stmt_info) { stmt_info = DR_GROUP_FIRST_ELEMENT (stmt_info); if (stmt_info - && STMT_VINFO_MEMORY_ACCESS_TYPE (stmt_info) == VMAT_LOAD_STORE_LANES) + && vect_mem_access_type (stmt_info, node) == VMAT_LOAD_STORE_LANES) return DR_GROUP_SIZE (stmt_info); } return 0; @@ -16847,14 +16848,15 @@ aarch64_detect_scalar_stmt_subtype (vec_info *vinfo, vect_cost_for_stmt kind, } /* STMT_COST is the cost calculated by aarch64_builtin_vectorization_cost - for the vectorized form of STMT_INFO, which has cost kind KIND and which - when vectorized would operate on vector type VECTYPE. Try to subdivide - the target-independent categorization provided by KIND to get a more + for the vectorized form of STMT_INFO possibly using SLP node NODE, which has cost + kind KIND and which when vectorized would operate on vector type VECTYPE. Try to + subdivide the target-independent categorization provided by KIND to get a more accurate cost. WHERE specifies where the cost associated with KIND occurs. */ static fractional_cost aarch64_detect_vector_stmt_subtype (vec_info *vinfo, vect_cost_for_stmt kind, - stmt_vec_info stmt_info, tree vectype, + stmt_vec_info stmt_info, slp_tree node, + tree vectype, enum vect_cost_model_location where, fractional_cost stmt_cost) { @@ -16880,7 +16882,7 @@ aarch64_detect_vector_stmt_subtype (vec_info *vinfo, vect_cost_for_stmt kind, cost by the number of elements in the vector. */ if (kind == scalar_load && sve_costs - && STMT_VINFO_MEMORY_ACCESS_TYPE (stmt_info) == VMAT_GATHER_SCATTER) + && vect_mem_access_type (stmt_info, node) == VMAT_GATHER_SCATTER) { unsigned int nunits = vect_nunits_for_cost (vectype); /* Test for VNx2 modes, which have 64-bit containers. */ @@ -16893,7 +16895,7 @@ aarch64_detect_vector_stmt_subtype (vec_info *vinfo, vect_cost_for_stmt kind, in a scatter operation. */ if (kind == scalar_store && sve_costs - && STMT_VINFO_MEMORY_ACCESS_TYPE (stmt_info) == VMAT_GATHER_SCATTER) + && vect_mem_access_type (stmt_info, node) == VMAT_GATHER_SCATTER) return sve_costs->scatter_store_elt_cost; /* Detect cases in which vec_to_scalar represents an in-loop reduction. */ @@ -17017,7 +17019,7 @@ aarch64_sve_adjust_stmt_cost (class vec_info *vinfo, vect_cost_for_stmt kind, cost of any embedded operations. */ static fractional_cost aarch64_adjust_stmt_cost (vec_info *vinfo, vect_cost_for_stmt kind, - stmt_vec_info stmt_info, tree vectype, + stmt_vec_info stmt_info, slp_tree node, tree vectype, unsigned vec_flags, fractional_cost stmt_cost) { if (vectype) @@ -17026,7 +17028,7 @@ aarch64_adjust_stmt_cost (vec_info *vinfo, vect_cost_for_stmt kind, /* Detect cases in which a vector load or store represents an LD[234] or ST[234] instruction. */ - switch (aarch64_ld234_st234_vectors (kind, stmt_info)) + switch (aarch64_ld234_st234_vectors (kind, stmt_info, node)) { case 2: stmt_cost += simd_costs->ld2_st2_permute_cost; @@ -17098,7 +17100,7 @@ aarch64_force_single_cycle (vec_info *vinfo, stmt_vec_info stmt_info) information relating to the vector operation in OPS. */ void aarch64_vector_costs::count_ops (unsigned int count, vect_cost_for_stmt kind, - stmt_vec_info stmt_info, + stmt_vec_info stmt_info, slp_tree node, aarch64_vec_op_count *ops) { const aarch64_base_vec_issue_info *base_issue = ops->base_issue_info (); @@ -17196,7 +17198,7 @@ aarch64_vector_costs::count_ops (unsigned int count, vect_cost_for_stmt kind, /* Add any extra overhead associated with LD[234] and ST[234] operations. */ if (simd_issue) - switch (aarch64_ld234_st234_vectors (kind, stmt_info)) + switch (aarch64_ld234_st234_vectors (kind, stmt_info, node)) { case 2: ops->general_ops += simd_issue->ld2_st2_general_ops * count; @@ -17214,7 +17216,7 @@ aarch64_vector_costs::count_ops (unsigned int count, vect_cost_for_stmt kind, /* Add any overhead associated with gather loads and scatter stores. */ if (sve_issue && (kind == scalar_load || kind == scalar_store) - && STMT_VINFO_MEMORY_ACCESS_TYPE (stmt_info) == VMAT_GATHER_SCATTER) + && vect_mem_access_type (stmt_info, node) == VMAT_GATHER_SCATTER) { unsigned int pairs = CEIL (count, 2); ops->pred_ops += sve_issue->gather_scatter_pair_pred_ops * pairs; @@ -17319,7 +17321,7 @@ aarch64_stp_sequence_cost (unsigned int count, vect_cost_for_stmt kind, unsigned aarch64_vector_costs::add_stmt_cost (int count, vect_cost_for_stmt kind, - stmt_vec_info stmt_info, slp_tree, + stmt_vec_info stmt_info, slp_tree node, tree vectype, int misalign, vect_cost_model_location where) { @@ -17363,13 +17365,14 @@ aarch64_vector_costs::add_stmt_cost (int count, vect_cost_for_stmt kind, if (vectype && m_vec_flags) stmt_cost = aarch64_detect_vector_stmt_subtype (m_vinfo, kind, - stmt_info, vectype, - where, stmt_cost); + stmt_info, node, + vectype, where, + stmt_cost); /* Check if we've seen an SVE gather/scatter operation and which size. */ if (kind == scalar_load && aarch64_sve_mode_p (TYPE_MODE (vectype)) - && STMT_VINFO_MEMORY_ACCESS_TYPE (stmt_info) == VMAT_GATHER_SCATTER) + && vect_mem_access_type (stmt_info, node) == VMAT_GATHER_SCATTER) { const sve_vec_cost *sve_costs = aarch64_tune_params.vec_costs->sve; if (sve_costs) @@ -17418,7 +17421,7 @@ aarch64_vector_costs::add_stmt_cost (int count, vect_cost_for_stmt kind, { /* Account for any extra "embedded" costs that apply additively to the base cost calculated above. */ - stmt_cost = aarch64_adjust_stmt_cost (m_vinfo, kind, stmt_info, + stmt_cost = aarch64_adjust_stmt_cost (m_vinfo, kind, stmt_info, node, vectype, m_vec_flags, stmt_cost); /* If we're recording a nonzero vector loop body cost for the @@ -17429,7 +17432,7 @@ aarch64_vector_costs::add_stmt_cost (int count, vect_cost_for_stmt kind, && (!LOOP_VINFO_LOOP (loop_vinfo)->inner || in_inner_loop_p) && stmt_cost != 0) for (auto &ops : m_ops) - count_ops (count, kind, stmt_info, &ops); + count_ops (count, kind, stmt_info, node, &ops); /* If we're applying the SVE vs. Advanced SIMD unrolling heuristic, estimate the number of statements in the unrolled Advanced SIMD diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index 2775d873ca42436fb6b6789ca8102c03e2540b4f..eafab59fdf53e570ebbacebbec5533fcd3dff509 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -2720,6 +2720,17 @@ vect_is_reduction (stmt_vec_info stmt_info) return STMT_VINFO_REDUC_IDX (stmt_info) >= 0; } +/* Returns the memory acccess type being used to vectorize the statement. If SLP + this is read from NODE, otherwise it's read from the STMT_VINFO. */ + +inline vect_memory_access_type +vect_mem_access_type (stmt_vec_info stmt_info, slp_tree node) +{ + if (node) + return SLP_TREE_MEMORY_ACCESS_TYPE (node); + else + return STMT_VINFO_MEMORY_ACCESS_TYPE (stmt_info); +} /* If STMT_INFO describes a reduction, return the vect_reduction_type of the reduction it describes, otherwise return -1. */ inline int