Message ID | 20230417221740.251864-1-apinski@marvell.com |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2435635vqo; Mon, 17 Apr 2023 15:18:48 -0700 (PDT) X-Google-Smtp-Source: AKy350bnI9ILC67zbIPlR7LOi5Q5/pPwZDwTDc47bm+UFaxwMzsuA17nMHNPOirvMPoZ4vlPegVI X-Received: by 2002:a17:906:3d31:b0:94d:8b66:46d1 with SMTP id l17-20020a1709063d3100b0094d8b6646d1mr8231923ejf.6.1681769928403; Mon, 17 Apr 2023 15:18:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681769928; cv=none; d=google.com; s=arc-20160816; b=b0jWSn8ANLiW4skvZK3hi979aFmqW1UxBSDBePvf+zUvC/eT84e+G+uZY69cREeoDz i81ACreJ46v4Id+Ht7ke16MPWGl28bH263FUBXLYqGRFwvP/BJ68gdz4MB61rTAgDAzd L6YS7YipLkVaxn46yPZ1M6/nOgxtMKTROYe0wyJof5XbbU4UbMSxOH2tifTkPgkGglIG J1HgLH6L8dIfm7cBdamHkgwJVkAjBNB/h268MyuhTk8RnqccMdfSdUJN5S/0M4zTk526 PfSHKPsd9obTCWvfX4sWltBt0vDXIYVdtz7DELQUDigaJ0xDpB+KOdTK30/vwQoFk/lU x2+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=ezFgVU1W45UwSgLyTIkxrkfN16DBSdwyBzgLS0xnaEY=; b=huJZacSGzl/zBOM5JZTYw+I8yILoww6rZmx0owKVMEiaQu4POnj3KVX/bFA2zIJ4ej uX+mc0/NkYm1g77kMOF6YrTq/W3mPBDxGRtYKfAQ3+JuPgU1KnzvpcGAY+hVa6FoY52W MUyGn+LAO8kkeYTzKzTvZqdy9oFJfvyFmNqwZnlJWqnwlhASoWHdrc0Acjk6MwpjVpSA jyyo6kFixDJMTrmA8rs3Z3MPW9xyruX/q/mEvX9l170w8F44iqulcUJoJ3c5sCLc/ed2 ndQdOurK3Q2RbJladMt+k1ONTInXbmnHdBrlRL55pjk5RfmQRXmPGgP6DeYWKkjZYfnN RyUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=FhQxt1tP; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id gj36-20020a170907742400b0094e61ea185dsi2562789ejc.433.2023.04.17.15.18.48 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 15:18:48 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=FhQxt1tP; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 691393857038 for <ouuuleilei@gmail.com>; Mon, 17 Apr 2023 22:18:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 691393857038 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681769919; bh=ezFgVU1W45UwSgLyTIkxrkfN16DBSdwyBzgLS0xnaEY=; h=To:CC:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=FhQxt1tPE8jpBf4HLbDEN25YzDmED1yNzxgqmqhrbqIHrn8PdiKatdujgqBaGP7hX pc5rppMYkh0xx1AOiwoFTYK09UUd/quqWt1n/mQuymEWAd8U6DGpLKvlOjczr7OXjB nY6QVtkszzx8BsLmJddDW86qd+RJaEOL7j38f000= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by sourceware.org (Postfix) with ESMTPS id D931A3858C50 for <gcc-patches@gcc.gnu.org>; Mon, 17 Apr 2023 22:17:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D931A3858C50 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33HM1MGU005254 for <gcc-patches@gcc.gnu.org>; Mon, 17 Apr 2023 15:17:52 -0700 Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3pyuenm7bw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for <gcc-patches@gcc.gnu.org>; Mon, 17 Apr 2023 15:17:52 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Mon, 17 Apr 2023 15:17:50 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Mon, 17 Apr 2023 15:17:50 -0700 Received: from vpnclient.wrightpinski.org.com (unknown [10.69.242.187]) by maili.marvell.com (Postfix) with ESMTP id AC3B95B6946; Mon, 17 Apr 2023 15:17:49 -0700 (PDT) To: <gcc-patches@gcc.gnu.org> CC: Andrew Pinski <apinski@marvell.com> Subject: [PATCH 1/2] PHIOPT: small cleanup in match_simplify_replacement Date: Mon, 17 Apr 2023 15:17:39 -0700 Message-ID: <20230417221740.251864-1-apinski@marvell.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: XjRdGVwY5F3aUCLvmbuV8K4jbD-Z26zr X-Proofpoint-ORIG-GUID: XjRdGVwY5F3aUCLvmbuV8K4jbD-Z26zr X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-17_14,2023-04-17_01,2023-02-09_01 X-Spam-Status: No, score=-14.6 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, 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.29 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> From: Andrew Pinski via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Andrew Pinski <apinski@marvell.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763463584362284547?= X-GMAIL-MSGID: =?utf-8?q?1763463584362284547?= |
Series |
[1/2] PHIOPT: small cleanup in match_simplify_replacement
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Andrew Pinski
April 17, 2023, 10:17 p.m. UTC
We know that the statement we are moving is already have a SSA_NAME on the lhs so we don't need to check that and can also just call reset_flow_sensitive_info with the name we already got. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. gcc/ChangeLog: * tree-ssa-phiopt.cc (match_simplify_replacement): Simplify code that does the movement slightly. --- gcc/tree-ssa-phiopt.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
Comments
On Tue, Apr 18, 2023 at 12:18 AM Andrew Pinski via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > We know that the statement we are moving is already > have a SSA_NAME on the lhs so we don't need to > check that and can also just call reset_flow_sensitive_info > with the name we already got. > > OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. OK. > gcc/ChangeLog: > > * tree-ssa-phiopt.cc (match_simplify_replacement): > Simplify code that does the movement slightly. > --- > gcc/tree-ssa-phiopt.cc | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/gcc/tree-ssa-phiopt.cc b/gcc/tree-ssa-phiopt.cc > index 16acd2f1894..4ddb4d5db90 100644 > --- a/gcc/tree-ssa-phiopt.cc > +++ b/gcc/tree-ssa-phiopt.cc > @@ -1094,11 +1094,10 @@ match_simplify_replacement (basic_block cond_bb, basic_block middle_bb, > > tree name = gimple_get_lhs (stmt_to_move); > // Mark the name to be renamed if there is one. > - if (name && TREE_CODE (name) == SSA_NAME) > - bitmap_set_bit (inserted_exprs, SSA_NAME_VERSION (name)); > + bitmap_set_bit (inserted_exprs, SSA_NAME_VERSION (name)); > gimple_stmt_iterator gsi1 = gsi_for_stmt (stmt_to_move); > gsi_move_before (&gsi1, &gsi); > - reset_flow_sensitive_info (gimple_assign_lhs (stmt_to_move)); > + reset_flow_sensitive_info (name); > } > > replace_phi_edge_with_variable (cond_bb, e1, phi, result, inserted_exprs); > -- > 2.31.1 >
diff --git a/gcc/tree-ssa-phiopt.cc b/gcc/tree-ssa-phiopt.cc index 16acd2f1894..4ddb4d5db90 100644 --- a/gcc/tree-ssa-phiopt.cc +++ b/gcc/tree-ssa-phiopt.cc @@ -1094,11 +1094,10 @@ match_simplify_replacement (basic_block cond_bb, basic_block middle_bb, tree name = gimple_get_lhs (stmt_to_move); // Mark the name to be renamed if there is one. - if (name && TREE_CODE (name) == SSA_NAME) - bitmap_set_bit (inserted_exprs, SSA_NAME_VERSION (name)); + bitmap_set_bit (inserted_exprs, SSA_NAME_VERSION (name)); gimple_stmt_iterator gsi1 = gsi_for_stmt (stmt_to_move); gsi_move_before (&gsi1, &gsi); - reset_flow_sensitive_info (gimple_assign_lhs (stmt_to_move)); + reset_flow_sensitive_info (name); } replace_phi_edge_with_variable (cond_bb, e1, phi, result, inserted_exprs);