Message ID | 20240806212714.308434-1-quic_apinski@quicinc.com |
---|---|
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 68338385DDC7 for <patchwork@sourceware.org>; Tue, 6 Aug 2024 21:28:02 +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 2B2643858C33 for <gcc-patches@gcc.gnu.org>; Tue, 6 Aug 2024 21:27:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2B2643858C33 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 2B2643858C33 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=1722979650; cv=none; b=u8Qs+s/lkcZpjpMuPCtIgauVnEhzTJfiUhzF9ICDCPhtx1SPJ6XD5SyHRns6bnbFb+ooxk+nKtzYM/747caWFwTAqeVqZ1q5I4tmMAy6hM5B+KG1M0YKV84zCMB7aw+AEKOABjinDFKQpdnxqXFLGJv8dduPuu36bSFbGL7i+Rs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722979650; c=relaxed/simple; bh=CwWhe3kMq80xXx4MOw1w7RXKnFrJ6kD7CTnXy13iAiw=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=uaEvpZELGUIeZYTBKyPzFS6h3GXyfg2IKYc8OU4mpkx7rg0lC6JjhD9C1KLODAG6TSUJNlVml9CyRQvX24pCmZMq81ajJWmjDFFdkHNaZRjPswoDP/oTPboQ4DW3vp4drxFAYi2SCiZNC8qLc61mPAb1KnfdRAfO5YMwE3m1OQg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 476H6bAQ015691 for <gcc-patches@gcc.gnu.org>; Tue, 6 Aug 2024 21:27:26 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=QYbar/c49z+XKKYCHkFhYb VEesKjKA6Vmltr2A6H9B8=; b=XIbc9P7zFO0jesB6OIAOTPFE84ajv0TSiueORk IB+laAbaGP9yDbzZU2A1mz5CDlnfNEOmTjuSIFFHPoWUeyA3ODYhZBP5wN8yxHS2 wSMRS+LU3UALjow1RzbQSLA4H43l/z4hio6XH1FK99KagGoi4Z18VfP75hMI9bdW TNUmIA5Uc+2EzjnBDCjgS64enSHbiL+GUs6sBchE7LjAG1w51+xUGD19nDxKneG/ /jdWA+YbtPVqsecnRZRzucTqCewlOLzlO1ff+d/pmCciKraBfiN1hy7m+CKwVYYu 0RFJiH0rSNBQv+t0bqVcJHj19osfY18c+z6dlOzqnYPoC4iw== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 40sc4y8r5n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <gcc-patches@gcc.gnu.org>; Tue, 06 Aug 2024 21:27:26 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA05.qualcomm.com (8.17.1.19/8.17.1.19) with ESMTPS id 476LRPJ5008576 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <gcc-patches@gcc.gnu.org>; Tue, 6 Aug 2024 21:27:25 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; Tue, 6 Aug 2024 14:27:24 -0700 From: Andrew Pinski <quic_apinski@quicinc.com> To: <gcc-patches@gcc.gnu.org> CC: Andrew Pinski <quic_apinski@quicinc.com> Subject: [PATCH 0/5] some small ranger op table cleanup Date: Tue, 6 Aug 2024 14:27:09 -0700 Message-ID: <20240806212714.308434-1-quic_apinski@quicinc.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) 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-ORIG-GUID: bUB64d3uEKorbolp-UetdEfGziMmoG2Y X-Proofpoint-GUID: bUB64d3uEKorbolp-UetdEfGziMmoG2Y X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-08-06_17,2024-08-06_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 suspectscore=0 mlxscore=0 malwarescore=0 mlxlogscore=723 phishscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2407110000 definitions=main-2408060150 X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_NONE, TXREP 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 |
some small ranger op table cleanup
|
|
Message
Andrew Pinski
Aug. 6, 2024, 9:27 p.m. UTC
This is a set of 5 small cleanups for the ranger op table. I noticed it after was pointed out an uninitialized warning sometimes happens for it. We should use final classes a lot more, even if it just used for documentation that you can't use it as a base class. Also local instances should really be in an anonymous namespaces but they were missing. Note there is some unused classes/instances I noticed after putting them in an anonymous namespace so I `#if 0`ed then. Should we just remove them instead? They were the pointer related ops which was just added too. Andrew Pinski (5): range: Make range_op_table class final range: Make range_op_table a true singleton class [PR116209] ranger: constify range_op_table class ranger: Make some classes local to the TU ranger: Fix LTO uninitialized variable warning about m_range_tree gcc/range-op-float.cc | 27 +++++++++++++++++++-------- gcc/range-op-ptr.cc | 20 +++++++++++++++----- gcc/range-op.cc | 19 ++++++++++++++----- gcc/range-op.h | 16 +++++++++++----- 4 files changed, 59 insertions(+), 23 deletions(-)
Comments
On 8/6/24 17:27, Andrew Pinski wrote: > This is a set of 5 small cleanups for the ranger op table. > I noticed it after was pointed out an uninitialized warning > sometimes happens for it. We should use final classes a lot more, > even if it just used for documentation that you can't use it as a > base class. Also local instances should really be in an anonymous > namespaces but they were missing. > > Note there is some unused classes/instances I noticed after putting > them in an anonymous namespace so I `#if 0`ed then. Should we just > remove them instead? They were the pointer related ops which was just > added too. > > Andrew Pinski (5): > range: Make range_op_table class final > range: Make range_op_table a true singleton class [PR116209] > ranger: constify range_op_table class > ranger: Make some classes local to the TU > ranger: Fix LTO uninitialized variable warning about m_range_tree > > gcc/range-op-float.cc | 27 +++++++++++++++++++-------- > gcc/range-op-ptr.cc | 20 +++++++++++++++----- > gcc/range-op.cc | 19 ++++++++++++++----- > gcc/range-op.h | 16 +++++++++++----- > 4 files changed, 59 insertions(+), 23 deletions(-) > I'm fine with all these. Regarding patch 4 with the unused pointer entries, I think they should be deleted. I believe they are subsumed by operator_min/operator_max/operator_and/operator_or versions of fold_range which take a prange operand. Ie the code in pointer_min_max_operator::wi_fold () is basically the same as operator_max::fold_range (prange &r, ...) which is what is currently called for pointers. I think its a remnant of the previous version before prange and dispatch came along. Thanks Andrew