From patchwork Fri Sep 20 04:01:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 1987624 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=d+Zg9KPU; 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 4X8zH635MZz1xrD for ; Fri, 20 Sep 2024 14:02:08 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 194A53858C3A for ; Fri, 20 Sep 2024 04:02:06 +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 BCE163858D29 for ; Fri, 20 Sep 2024 04:01:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BCE163858D29 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 BCE163858D29 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=1726804905; cv=none; b=nxXEZp3U7C1H5CMfjNzMySA6V9b+RJGQiTmIFvAlxpFAkgG96Q/ZSL1B+NmHd6ItpZzl4aALB1C5BTRS+/3AynaGYwt4V1D0qFOrX+jLSsAc98rnF6NB8++k9plD2GA7cmKjK33TQB7RiVu5Z17hyIz/HocMQVqyMKai3NeiE6M= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1726804905; c=relaxed/simple; bh=N+Yk8fsh3IkaQlw3xw1cId+cywelV4RcwQv8PJipluI=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=ohBizJ5roIOXGT/alU1xXJhBrCg8ezvp+cnZRV16yvK/XM8cG1Pft71dBUSg66EI5tuNhZv0oaa8Pe5LF8q5Gri9C3ED52Xhfk9lfcLf0fuOe7dUG9i6uFyv4ZX1SqhgKSd2HdaBEG8aWxKCkhWVa0fa4cpR6o31/lhO5Q4v300= 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 48JJ3qG5018228 for ; Fri, 20 Sep 2024 04:01:42 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=sivc4c8nvBJANazGjLcqE7 3SjvCSfV6u139ffovbBjE=; b=d+Zg9KPUphWMRv4wxLERuB6uPHS/YY11bH/Xyh pNf9YzScryS+lNa9Ju16R4Y7ZTLJGA0Gh5V5TM3HToL6wWyLY2bUSP5D2am/Bm5z 3RZYwRT5TcQ+lfwxKkAAV4v463hOPckCWszOoWbxGZ8/KfyCvmV3mMe2//Jwi1+y 26K0YCa8mwv+4iKj8oxupvWnaxJXdlDyjgEiugR0g9CUxuJMvVi3yAIxVHDFDIdV PIPn379j1XMajxsH4IQ7SkHG70JRdW3OfpODNN4Ev8P1NDwh6yDeu56cBVLEhRNZ o7Zo/l1wBYpLpFgrD2o5gZm/ZVNnSyA4r4dAa0p1twxRVs8w== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 41n4j6yrdh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 20 Sep 2024 04:01:41 +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 48K41e7W010160 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 20 Sep 2024 04:01:40 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, 19 Sep 2024 21:01:40 -0700 From: Andrew Pinski To: CC: Andrew Pinski Subject: [PATCH] Remove PHI_RESULT_PTR and change some PHI_RESULT to be gimple_phi_result [PR116643] Date: Thu, 19 Sep 2024 21:01:28 -0700 Message-ID: <20240920040128.3286537-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: CJj4alNSI0_afYcnuCP8EkqVW-yTx31z X-Proofpoint-GUID: CJj4alNSI0_afYcnuCP8EkqVW-yTx31z 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 phishscore=0 mlxlogscore=729 mlxscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 clxscore=1015 adultscore=0 suspectscore=0 lowpriorityscore=0 spamscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2408220000 definitions=main-2409200025 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 There was only a few uses PHI_RESULT_PTR so lets remove it and use gimple_phi_result_ptr or gimple_phi_result directly instead. Since I was modifying ssa-iterators.h for the use of PHI_RESULT_PTR, change the use of PHI_RESULT there to be gimple_phi_result instead. This also removes one extra indirection that was done for PHI_RESULT so stage2 building should be slightly faster. Bootstrapped and tested on x86_64-linux-gnu. PR middle-end/116643 gcc/ChangeLog: * ssa-iterators.h (single_phi_def): Use gimple_phi_result instead of PHI_RESULT. (op_iter_init_phidef): Use gimple_phi_result/gimple_phi_result_ptr instead of PHI_RESULT/PHI_RESULT_PTR. * tree-ssa-operands.h (PHI_RESULT_PTR): Remove. (PHI_RESULT): Use gimple_phi_result directly. (SET_PHI_RESULT): Use gimple_phi_result_ptr directly. Signed-off-by: Andrew Pinski --- gcc/ssa-iterators.h | 6 +++--- gcc/tree-ssa-operands.h | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/gcc/ssa-iterators.h b/gcc/ssa-iterators.h index b7b01fd018a..e0e555cc472 100644 --- a/gcc/ssa-iterators.h +++ b/gcc/ssa-iterators.h @@ -768,7 +768,7 @@ num_ssa_operands (gimple *stmt, int flags) inline tree single_phi_def (gphi *stmt, int flags) { - tree def = PHI_RESULT (stmt); + tree def = gimple_phi_result (stmt); if ((flags & SSA_OP_DEF) && is_gimple_reg (def)) return def; if ((flags & SSA_OP_VIRTUAL_DEFS) && !is_gimple_reg (def)) @@ -811,7 +811,7 @@ op_iter_init_phiuse (ssa_op_iter *ptr, gphi *phi, int flags) inline def_operand_p op_iter_init_phidef (ssa_op_iter *ptr, gphi *phi, int flags) { - tree phi_def = PHI_RESULT (phi); + tree phi_def = gimple_phi_result (phi); int comp; clear_and_done_ssa_iter (ptr); @@ -833,7 +833,7 @@ op_iter_init_phidef (ssa_op_iter *ptr, gphi *phi, int flags) /* The first call to op_iter_next_def will terminate the iterator since all the fields are NULL. Simply return the result here as the first and therefore only result. */ - return PHI_RESULT_PTR (phi); + return gimple_phi_result_ptr (phi); } /* Return true is IMM has reached the end of the immediate use stmt list. */ diff --git a/gcc/tree-ssa-operands.h b/gcc/tree-ssa-operands.h index 8072932564a..b6534f18c66 100644 --- a/gcc/tree-ssa-operands.h +++ b/gcc/tree-ssa-operands.h @@ -72,9 +72,8 @@ struct GTY(()) ssa_operands { #define USE_OP_PTR(OP) (&((OP)->use_ptr)) #define USE_OP(OP) (USE_FROM_PTR (USE_OP_PTR (OP))) -#define PHI_RESULT_PTR(PHI) gimple_phi_result_ptr (PHI) -#define PHI_RESULT(PHI) DEF_FROM_PTR (PHI_RESULT_PTR (PHI)) -#define SET_PHI_RESULT(PHI, V) SET_DEF (PHI_RESULT_PTR (PHI), (V)) +#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))) */