From patchwork Thu Sep 5 05:10:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 97117 Return-Path: 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 62009384F4BF for ; Thu, 5 Sep 2024 05:10:59 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by sourceware.org (Postfix) with ESMTPS id A003A3860C34 for ; Thu, 5 Sep 2024 05:10:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A003A3860C34 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=quicinc.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A003A3860C34 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725513033; cv=none; b=bhAbW5HjX6E1RWUpnkeevUQqAM/z8xuM7JWRfsMWTVUNednPWTZFcX0ggQzs5tqRRV9AIezqr1pPJ5Xz0hjQLmbJzDU4FoBzaXmV4TpNr3Uydd3q5yWLAsRxZ6h+FVjpfZr62nybARqsN48ruIjsMTZUtDKVO/Gf2rkPkVHuJTI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725513033; c=relaxed/simple; bh=o73GDbR8IOlgnqLY+1+8iWgLVO83SRlV7UNTTabksjA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Mjpd9mRVe90WeNFRQRLT9ITFnz6xGk4MNfb23tDT7dlWZTU1to3TnuNL6bOs6v8iFxv0MR5cf9CWSx4yx1cEGNdasfraaQWYM1RLXGdRNGt859Nw948zWYqNGkaqbX9GkbernlkGHSH/2Sp1wC49A8J4fukIANJeTlrwWxFr/Gk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 484LfC7n001190 for ; Thu, 5 Sep 2024 05:10:31 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=qcppdkim1; bh=/36BwgIrMCLw+vvfH1SIOb mNQPKLoAI7xGNrn1lWaqQ=; b=iEIFnDXyHvSuMH2G0vMAD+POyHK7MRHT51Rd6X OTPMfh0JQEfuaZRUZNJKvEBNldaIPofzN7sVIUOnwaM0MYJNyWolNwTfYSxtqA5U teN36fqE4jePTejKvKLryH8QcmgGOE0ZVaARoxiQf5zW5cqRUn9HTwAyoMRe1jj9 XOGXRADF/dEgRZc99zbENFANgJNS6wHbBReMmke1qg2wAiEwNL4+qDjm4ztM5Cfl vmcor181KwXgwOGaFHG8v6p+jdej6dFdTUFxvFh+EZp3PumoKAQExzxAI4Z7jujV O8vT4T/bYieQx8h9qPMY4e68e66LjWO1AKbZ1AFojA7ln3PQ== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 41drqe749j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 05 Sep 2024 05:10:30 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA05.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 4855AMJQ024480 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 5 Sep 2024 05:10:22 GMT Received: from hu-apinski-lv.qualcomm.com (10.49.16.6) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Wed, 4 Sep 2024 22:10:22 -0700 From: Andrew Pinski To: CC: Andrew Pinski Subject: [PATCH] aarch64: Use is_attribute_namespace_p and get_attribute_name inside aarch64_lookup_shared_state_flags [PR116598] Date: Wed, 4 Sep 2024 22:10:10 -0700 Message-ID: <20240905051010.3490388-1-quic_apinski@quicinc.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01a.na.qualcomm.com (10.47.209.196) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: p_rAFgSLA-MQukOq161Pv7xDgEDea7aB X-Proofpoint-ORIG-GUID: p_rAFgSLA-MQukOq161Pv7xDgEDea7aB X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-05_04,2024-09-04_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 mlxscore=0 phishscore=0 adultscore=0 suspectscore=0 priorityscore=1501 clxscore=1015 impostorscore=0 spamscore=0 mlxlogscore=694 bulkscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2407110000 definitions=main-2409050036 X-Spam-Status: No, score=-13.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE 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~patchwork=sourceware.org@gcc.gnu.org The code in aarch64_lookup_shared_state_flags all C++11 attributes on the function type had a namespace associated with them. But with the addition of reproducible/unsequenced, this is not true. This fixes the issue by using is_attribute_namespace_p instead of manually figuring out the namespace is named "arm" and uses get_attribute_name instead of manually grabbing the attribute name. Built and tested for aarch64-linux-gnu. gcc/ChangeLog: PR target/116598 * config/aarch64/aarch64.cc (aarch64_lookup_shared_state_flags): Use is_attribute_namespace_p and get_attribute_name instead of manually grabbing the namespace and name of the attribute. Signed-off-by: Andrew Pinski --- gcc/config/aarch64/aarch64.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc index 27e24ba70ab..6a3f1a23a9f 100644 --- a/gcc/config/aarch64/aarch64.cc +++ b/gcc/config/aarch64/aarch64.cc @@ -594,14 +594,10 @@ aarch64_lookup_shared_state_flags (tree attrs, const char *state_name) { for (tree attr = attrs; attr; attr = TREE_CHAIN (attr)) { - if (!cxx11_attribute_p (attr)) + if (!is_attribute_namespace_p ("arm", attr)) continue; - auto ns = IDENTIFIER_POINTER (TREE_PURPOSE (TREE_PURPOSE (attr))); - if (strcmp (ns, "arm") != 0) - continue; - - auto attr_name = IDENTIFIER_POINTER (TREE_VALUE (TREE_PURPOSE (attr))); + auto attr_name = IDENTIFIER_POINTER (get_attribute_name (attr)); auto flags = aarch64_attribute_shared_state_flags (attr_name); if (!flags) continue;