From patchwork Mon Sep 23 03:47:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 1988386 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=quicinc.com header.i=@quicinc.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=irQEHdzO; 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 4XBpr62KdCz1xsM for ; Mon, 23 Sep 2024 13:48:34 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5A9893858288 for ; Mon, 23 Sep 2024 03:48:32 +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 7ED373858D20 for ; Mon, 23 Sep 2024 03:48:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7ED373858D20 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 7ED373858D20 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=1727063287; cv=none; b=YaDxnRwOrQ34ju/d2J5BTW0jXQz4q27RKnrQYn6rhQtDsf+kgTWP4gu2hg1eEBZ+zHwuglDIcQSdKl6HX8dZEaOzn6VekwChlhu7fnPxx39Qqhy862DbLfVbYKDBEZaaThaKMWRa2xvOS0XHbCHVzrzEHKgBUViIkbRUFCGau2g= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1727063287; c=relaxed/simple; bh=6srqaDmomg2usolxZjOBlv1Fa/M0d6LTcIxqcej2tEM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=jX0ft2pBNzE5OE6tEHjJa+6yKe+I6nwSQFNa29nEXy/eaSlTWXD43K/D4JbAlwKTgWHzOXvKB4+rb/3ZASluw/T5a9+jcyijGLgwU/yMwR++RPRL+g6Q8xEZTGvc3yfckyAc4WIaLOeluqs9y+hP23x+Bz1NNOaHNJiBGCnC2oQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 48MNVQgQ020265 for ; Mon, 23 Sep 2024 03:48:05 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=c4AgvMVOxUyxFR4TNW/9+X K+GLgYygayyX87obFCyKc=; b=irQEHdzOEFHQjrW/fXoSGMSXxiulSgW8i+okZc s6sGWikcKxHaVGbuFboIq28+lvOt2xNz2CrquwuQnTClwL5U7uQ7Vxi9IsNCyM8t qYuSQ6YCCrtenbIGRJGU9XWm5ZNkMPNevZHDvM69amcyWhgGVmNq126rRC2oZiMB 2NP+Bur9wS6j/fwf8EpVMmQzu1zMbaNp6HfAK99OfoSaAsVlpQPBXPILMp9FzjER JyCcq3XO9+bEA8Xg4sGvedySrhj73Y27E4txZAVj2N1rNfMMooYrIVsaq0VqsUoR rI3Du0kBxPIUmihUsuZ8tZDcoK2O12MSghREpb6QHKtKc9ng== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 41sn5bknxb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 23 Sep 2024 03:48:04 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA01.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 48N3m3Px007680 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 23 Sep 2024 03:48:03 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; Sun, 22 Sep 2024 20:48:03 -0700 From: Andrew Pinski To: CC: Andrew Pinski Subject: [PATCH 1/3] Remove commented out PHI_ARG_DEF macro defition Date: Sun, 22 Sep 2024 20:47:48 -0700 Message-ID: <20240923034750.718980-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-ORIG-GUID: ZiUgigJMcyHhvOOHVqluevzq8cW0Ih8Z X-Proofpoint-GUID: ZiUgigJMcyHhvOOHVqluevzq8cW0Ih8Z 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-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 suspectscore=0 adultscore=0 impostorscore=0 malwarescore=0 mlxlogscore=859 spamscore=0 mlxscore=0 priorityscore=1501 bulkscore=0 phishscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2408220000 definitions=main-2409230026 X-Spam-Status: No, score=-13.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org This was commented out since r0-125500-g80560f9521f81a and a new defition was added at the same time. Let's remove the commented out version. gcc/ChangeLog: * tree-ssa-operands.h (PHI_ARG_DEF): Remove definition. Signed-off-by: Andrew Pinski --- gcc/tree-ssa-operands.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/gcc/tree-ssa-operands.h b/gcc/tree-ssa-operands.h index b6534f18c66..f368d5b59f8 100644 --- a/gcc/tree-ssa-operands.h +++ b/gcc/tree-ssa-operands.h @@ -74,9 +74,6 @@ struct GTY(()) ssa_operands { #define PHI_RESULT(PHI) gimple_phi_result (PHI) #define SET_PHI_RESULT(PHI, V) SET_DEF (gimple_phi_result_ptr (PHI), (V)) -/* -#define PHI_ARG_DEF(PHI, I) USE_FROM_PTR (PHI_ARG_DEF_PTR ((PHI), (I))) -*/ #define PHI_ARG_DEF_PTR(PHI, I) gimple_phi_arg_imm_use_ptr ((PHI), (I)) #define PHI_ARG_DEF(PHI, I) gimple_phi_arg_def ((PHI), (I)) #define SET_PHI_ARG_DEF(PHI, I, V) \ From patchwork Mon Sep 23 03:47:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 1988384 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=quicinc.com header.i=@quicinc.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=eqGYpDUQ; 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 4XBpr436yBz1xsM for ; Mon, 23 Sep 2024 13:48:34 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7F17A385842C for ; Mon, 23 Sep 2024 03:48:32 +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 BB6073858D35 for ; Mon, 23 Sep 2024 03:48:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BB6073858D35 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 BB6073858D35 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=1727063287; cv=none; b=gLWGQWaS+EfMVPlnOgr3NpcKQBi0bqU6GRODpibgts6YDQbwQ2vxNJXMQ/T8am1A1ThPO3NZcPE0lZ8AQvqja7WqJ8YyO6ceXGTqxc6C+TFdTN7rHsG6feuJTwWVS1tSq07ZqQJCsTT5Azi0AXAVcxrXkDfs7H3+YmDJnlpmCGo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1727063287; c=relaxed/simple; bh=0KpwVOdazOxjCNCv8E1kXDTOSTtPbPWu1EFfPyUcHBM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=kzoAre6EzEDpfxU9h3gHTsimzqtfxHcpWSI0jkugvKWa8gH0cPjjpAymt63gdHvoU0+6TLMlI1GVwvA6HI49ua0DGKxhfDVYWHi/rpX69ehgL8G0pLruU3/HShLUvnoz4CqhaLAvPFebK1l0QCqqx7dNsgC71J8bup9JEizlmTc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 48MMhJSg003198 for ; Mon, 23 Sep 2024 03:48:05 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= UodFb/exq2tY2YDl/Ptb0E84UKqPc/a/3WbtU0PujT4=; b=eqGYpDUQFNCTvu12 2Nnt7tGhM3jydKwGsCmd9ADxJfrq+np2n8b5Qe+glpboK9lneSzYryxxG79paPCo C7+KpH+wgDxmnro2b9RBhgfUZn6yaUWhjrkLymF5ODpr6EjG2ZvefZG3AYK9QyJI AVFUbfCGWpxE6VTfh2uiIH6vS9x3z8wbp3ANV6e+i9PCPKABnhPydYfSn4qQMuTe P3UHh6RVdGZUTSt+R8+ZsIzLVakbGzvBl09wEFREx6sLMvBNu1CWJ6ZHHLcuHKDv 1fpscOUq0xI56g4bzMgVlBHaPa0H7m85Trsh4e+jOVNBr7Ip9vUBN3qLInqaHkKb PCPYdA== Received: from nasanppmta02.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 41sph6kmhs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 23 Sep 2024 03:48:05 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA02.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 48N3m3sc026526 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 23 Sep 2024 03:48:03 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; Sun, 22 Sep 2024 20:48:03 -0700 From: Andrew Pinski To: CC: Andrew Pinski Subject: [PATCH 2/3] gimple: Remove custom remove_pointer Date: Sun, 22 Sep 2024 20:47:49 -0700 Message-ID: <20240923034750.718980-2-quic_apinski@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240923034750.718980-1-quic_apinski@quicinc.com> References: <20240923034750.718980-1-quic_apinski@quicinc.com> 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: zHfOccRa54jO0y8ahP28QCVf2HDNOUHl X-Proofpoint-ORIG-GUID: zHfOccRa54jO0y8ahP28QCVf2HDNOUHl 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-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 impostorscore=0 bulkscore=0 spamscore=0 clxscore=1015 mlxlogscore=715 mlxscore=0 adultscore=0 phishscore=0 suspectscore=0 priorityscore=1501 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2408220000 definitions=main-2409230026 X-Spam-Status: No, score=-13.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org Since r11-2700-g22dc89f8073cd0, type_traits has been included via system.h so we don't need a custom version for gimple.h. Note a small C++14 cleanup is to use remove_pointer_t directly here instead of remove_pointer::type. bootstrapped and tested on x86_64-linux-gnu gcc/ChangeLog: * gimple.h (remove_pointer): Remove. (GIMPLE_CHECK2): Use std::remove_pointer instead of custom one. Signed-off-by: Andrew Pinski --- gcc/gimple.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/gcc/gimple.h b/gcc/gimple.h index ee986eaf153..4a6e0e97d1e 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -37,10 +37,6 @@ enum gimple_code { extern const char *const gimple_code_name[]; extern const unsigned char gimple_rhs_class_table[]; -/* Strip the outermost pointer, from tr1/type_traits. */ -template struct remove_pointer { typedef T type; }; -template struct remove_pointer { typedef T type; }; - /* Error out if a gimple tuple is addressed incorrectly. */ #if defined ENABLE_GIMPLE_CHECKING #define gcc_gimple_checking_assert(EXPR) gcc_assert (EXPR) @@ -72,7 +68,7 @@ GIMPLE_CHECK2(const gimple *gs, T ret = dyn_cast (gs); if (!ret) gimple_check_failed (gs, file, line, fun, - remove_pointer::type::code_, ERROR_MARK); + std::remove_pointer::type::code_, ERROR_MARK); return ret; } template @@ -91,7 +87,7 @@ GIMPLE_CHECK2(gimple *gs, T ret = dyn_cast (gs); if (!ret) gimple_check_failed (gs, file, line, fun, - remove_pointer::type::code_, ERROR_MARK); + std::remove_pointer::type::code_, ERROR_MARK); return ret; } #else /* not ENABLE_GIMPLE_CHECKING */ From patchwork Mon Sep 23 03:47:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 1988385 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=quicinc.com header.i=@quicinc.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=ZRtbF9IM; 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 4XBpr53k7Pz1xsp for ; Mon, 23 Sep 2024 13:48:37 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 45F1D385840A for ; Mon, 23 Sep 2024 03:48:35 +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 CA9ED3858D39 for ; Mon, 23 Sep 2024 03:48:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CA9ED3858D39 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 CA9ED3858D39 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=1727063287; cv=none; b=D5Bzd4harKGzazWhnHwxyUyDbQbWslsJGx73odd3BWPX5E2ORKb57HXKd1CkiW8gZaV2hYr18PeM1hnDN9OmDkNsW3FkpLcqmXK3Cm1MpcD7ci2ajs5UsB9XVJeYmH1Z5gRn0tOQy2M61RkqpxUa0jliKupHbsz9i9XUjsATqAY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1727063287; c=relaxed/simple; bh=qatwvu4YI5WB4REpORc2LN5WWNZLv1Hs4ddZvHxHzb0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=hHNRoVZRzWAYjV9B1zmGJ1mcgZ5or2ViSXLUCX//P9eqENqQMZXnXQwfvDGhYfLIXAr2LRYBNXPbFwX7T6mGVFb7WenIDUrsWBzDnLRJn+J3ixjEkeoQ7xLBK9h9GIkL1WadIyM3H1j29ZpNCd4v8Rhgq1vmCP+7CqlpmiWchOw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 48MNnQA2011775 for ; Mon, 23 Sep 2024 03:48:05 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= mCP471U26eoqU3hD12MTFnr5JXkTeENo+cal+2RMeNQ=; b=ZRtbF9IMHJuzUCv5 EV/PVwUC5o7Q3rmlTN8MB+OiRCz3SVMmSMlH/r7i1ctIom1NUlFO2R4qdY8FfhQe nzCPB+L0FL0iWvd6J1mQBKTdrzAfzZrc5TvbRWF5kDTzdifziBTieA63pXg52JY7 GW13eYLdI9h8kYn8aXl04Jqy5IRf5KzTZBR05eQg4Yj8mhsKIoC4XAphPDnf/tWT ad3Nqh//7DLWzBmWfouuQ1ejQ9BJEtqPb5BWCRq/D4QrSkS0rmKmPc6ObwR9AwRg /h5ENqwF294hxsWV++kUEcya9Br/1QwAaIPqdO8aoVf3eIIyXZ+1Q1b2ZGDPXovD zelCjw== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 41sph6kmht-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 23 Sep 2024 03:48:05 +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 48N3m4xp013485 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 23 Sep 2024 03:48:04 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; Sun, 22 Sep 2024 20:48:03 -0700 From: Andrew Pinski To: CC: Andrew Pinski Subject: [PATCH 3/3] gimple: Simplify gimple_seq_nondebug_singleton_p Date: Sun, 22 Sep 2024 20:47:50 -0700 Message-ID: <20240923034750.718980-3-quic_apinski@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240923034750.718980-1-quic_apinski@quicinc.com> References: <20240923034750.718980-1-quic_apinski@quicinc.com> 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: VpmF5tV288_mBnlyawBWaz_ueBnzLnuJ X-Proofpoint-ORIG-GUID: VpmF5tV288_mBnlyawBWaz_ueBnzLnuJ 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-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 impostorscore=0 bulkscore=0 spamscore=0 clxscore=1015 mlxlogscore=868 mlxscore=0 adultscore=0 phishscore=0 suspectscore=0 priorityscore=1501 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2408220000 definitions=main-2409230026 X-Spam-Status: No, score=-13.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org The implementation of gimple_seq_nondebug_singleton_p was convoluted on how to determine if the sequence was a singleton (which could contain debug statements). This simplifies the function into two calls. One to get the start after all of the debug statements and then check to see if it is at the one before the end (or there is only debug statements afterwards). Bootstrapped and tested on x86_64-linux-gnu (including ada). gcc/ChangeLog: * gimple-iterator.h (gimple_seq_nondebug_singleton_p): Rewrite to be simplely, gsi_start_nondebug/gsi_one_nondebug_before_end_p. Signed-off-by: Andrew Pinski --- gcc/gimple-iterator.h | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/gcc/gimple-iterator.h b/gcc/gimple-iterator.h index 501f0549d92..97176d639d9 100644 --- a/gcc/gimple-iterator.h +++ b/gcc/gimple-iterator.h @@ -430,28 +430,9 @@ gsi_seq (gimple_stmt_iterator i) inline bool gimple_seq_nondebug_singleton_p (gimple_seq seq) { - gimple_stmt_iterator gsi; - - /* Find a nondebug gimple. */ - gsi.ptr = gimple_seq_first (seq); - gsi.seq = &seq; - gsi.bb = NULL; - while (!gsi_end_p (gsi) - && is_gimple_debug (gsi_stmt (gsi))) - gsi_next (&gsi); - - /* No nondebug gimple found, not a singleton. */ - if (gsi_end_p (gsi)) - return false; - - /* Find a next nondebug gimple. */ - gsi_next (&gsi); - while (!gsi_end_p (gsi) - && is_gimple_debug (gsi_stmt (gsi))) - gsi_next (&gsi); + gimple_stmt_iterator gsi = gsi_start_nondebug (seq); - /* Only a singleton if there's no next nondebug gimple. */ - return gsi_end_p (gsi); + return gsi_one_nondebug_before_end_p (gsi); } #endif /* GCC_GIMPLE_ITERATOR_H */