From patchwork Thu Oct 10 15:22:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 1995510 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=CHm684E6; 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 4XPYS94m1wz1xsc for ; Fri, 11 Oct 2024 02:23:37 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B28503857024 for ; Thu, 10 Oct 2024 15:23:35 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by sourceware.org (Postfix) with ESMTPS id 777333857BB9 for ; Thu, 10 Oct 2024 15:23:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 777333857BB9 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 777333857BB9 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728573799; cv=none; b=QcUvaWAgOlv4UUjg5Xeoc7wHkV/xT4+RRxKDicabbl/KVSLNYZFZK30sYpdjgCl51WBB3mTpbdgerVVaqUxcoUT1xW72wdNt/YKLkKZv+b0crevzqzWc4xCcR9BsGAQQ8D21v22NK936TjLqmgzm7FNo7SwFHMhfQnuxHMK4q7g= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728573799; c=relaxed/simple; bh=YFVqRN9lX5O14L4eWiJKQ0sSZVj+b5PPiCcJL71O/is=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=VsRU6QrOEvglgO7i1Zazmy5dK2U4M6D6akLCFmKwloJ34xvMbFwgxWG9FBll5CcItrcVVxvwzPleNHEe2tVUpDsYAHxIrUFLkuksWtxLRA61h5g1p6ivOFKcKchC+NVH1wJiVBN3g/Ieb88Gw0jA/isX2w6KMaIf3H4LFw8Pk0A= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49ADqT1l029116 for ; Thu, 10 Oct 2024 15:23:14 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=C5OQW5pFB4xOIds+zoSAQw yVXzRxpgRXf6Iv5Jr2pVo=; b=CHm684E6NjycUEOOpEaK2U7VBihDEmAsCyfXdQ lueFE2DO9KfXZfDk7Qx+VYsEIZ1ctDESXKKKvzzVALfKmGqxo/AjBNUeAM/6+w7R Ci8LKZH9fFg2YFM95ootYstUBYt9+Xozi9mVskgIBdlL8PusK/wOhGufbK0EOrOk 3KAZbiBRFpFw3eZUq1ZIgoOEBPV2ZpLoyAZpA3uaIiSFn/5tnaYQ31X250qBMWcV wOiFlOutADpArsk9+zyQxDiv2kEo0xFSL8n4oaSZnFRp2gAIsrKPFFX+jiwPQa0f iVLjUExV+BtUcsfWpkdE3ZFxX1XGcZTthYT2JnxqxJCVzZ+w== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 426g6n89e2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 10 Oct 2024 15:23:13 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA04.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 49AFNDER024432 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 10 Oct 2024 15:23:13 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; Thu, 10 Oct 2024 08:23:12 -0700 From: Andrew Pinski To: CC: Andrew Pinski Subject: [PATCH] phiopt: Remove candorest variable return instead Date: Thu, 10 Oct 2024 08:22:57 -0700 Message-ID: <20241010152257.3309752-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: nalasex01c.na.qualcomm.com (10.47.97.35) 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: zAMAsYjhSgCwG7O3zKieAK0mQpg74S_6 X-Proofpoint-GUID: zAMAsYjhSgCwG7O3zKieAK0mQpg74S_6 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 suspectscore=0 lowpriorityscore=0 bulkscore=0 adultscore=0 impostorscore=0 mlxlogscore=919 mlxscore=0 spamscore=0 phishscore=0 malwarescore=0 clxscore=1015 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2410100102 X-Spam-Status: No, score=-14.0 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 After r15-3560-gb081e6c860eb9688d24365d39, the setting of candorest with the break can just change to a return since this is inside a lambda now. Bootstrapped and tested on x86_64-linux-gnu. gcc/ChangeLog: * tree-ssa-phiopt.cc (pass_phiopt::execute): Remove candorest and return instead of setting candorest. Signed-off-by: Andrew Pinski --- gcc/tree-ssa-phiopt.cc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/gcc/tree-ssa-phiopt.cc b/gcc/tree-ssa-phiopt.cc index 43b65b362a3..f3ee3a80c0f 100644 --- a/gcc/tree-ssa-phiopt.cc +++ b/gcc/tree-ssa-phiopt.cc @@ -4322,7 +4322,6 @@ pass_phiopt::execute (function *) } gimple_stmt_iterator gsi; - bool candorest = true; /* Check that we're looking for nested phis. */ basic_block merge = diamond_p ? EDGE_SUCC (bb2, 0)->dest : bb2; @@ -4338,15 +4337,11 @@ pass_phiopt::execute (function *) tree arg1 = gimple_phi_arg_def (phi, e2->dest_idx); if (value_replacement (bb, bb1, e1, e2, phi, arg0, arg1) == 2) { - candorest = false; cfgchanged = true; - break; + return; } } - if (!candorest) - return; - gphi *phi = single_non_singleton_phi_for_edges (phis, e1, e2); if (!phi) return;