Message ID | 20230424213011.528181-1-apinski@marvell.com |
---|---|
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 b10csp3015928vqo; Mon, 24 Apr 2023 14:31:58 -0700 (PDT) X-Google-Smtp-Source: AKy350ZTRHDRYMGLCX6tuuUkigIffPjNaQ37AaxG23TSZQ3fzxxP9C8gIcJ3mDeIBYfUrH+YvJrL X-Received: by 2002:a17:907:7845:b0:957:12b7:30b0 with SMTP id lb5-20020a170907784500b0095712b730b0mr11580928ejc.18.1682371918629; Mon, 24 Apr 2023 14:31:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682371918; cv=none; d=google.com; s=arc-20160816; b=AOnLCpZE1EkYY8f7Xo+F2W9N24Ui7JHhYK/0sCPQQDXUA9TTzVecBR+i7uiA1hpGU8 VvUURtFVynzoC32MIQriKT1tHwDnqJPCl4EePRHn3/Bi4nzVWKDIV99DnRaXCkUnaiqZ SAoTRsDV/mKC6ua7w3y/oc53F3/I0EfJBat/E4ISKd6PSzsyHS+JFLAQzgArCP9P9lVL iQjhjz5ElQfyuY1sFtqA8M8e5JisIA2Zpe+XqdTGgxlspKLqHxVARxNvRK43t0X4G3qS uEJ3Mdy30ha9OCjdViB323lWtgYOQg9Ag/8Ds9vp8pcq4r7wfnoWU1Yo1jPpetth6reo 4RVQ== 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=eFTVE7LE0kQsYjMHAldVlMiuP2WeDvA/4JloH2iQNE4=; b=N800SrIC0PMfEtKNPtyL+vWPr1yaOMOLKAUeR8cbozIXEqvyYZzSrKr1SkmFkM9TfX SznHwroE8gMGB8OMpf1FsE/L3PNUuWpcZrUMJIo7eyQk0kyZqg13zH24zFfqZ3+8Dsgf m4bf5tin/Z9RWEGkAJpJMGhzoc7kpZY1wHGEgL8r4cThLbuHiby9aRM4jf6JA9psKwTe LaAwOWBlFWVgK9GtdXMxm58LMBI5XnRIEng2n8EaAOJyse4Oodlodf8bCK33pegdugLF wv2fpDpKCCKJmlTRdv8b/QC1gsQXv0BodwZzYbRzntk1N+dBYhTJCkfN5Vj/3Mvmsx22 /sVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=dqRpWSeG; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id qo20-20020a170907213400b0094e5b84ddb8si9611031ejb.351.2023.04.24.14.31.58 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 14:31:58 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=dqRpWSeG; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 8C8193853803 for <ouuuleilei@gmail.com>; Mon, 24 Apr 2023 21:31:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8C8193853803 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682371869; bh=eFTVE7LE0kQsYjMHAldVlMiuP2WeDvA/4JloH2iQNE4=; h=To:CC:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=dqRpWSeG72zTc84etZZxzGJhwCHDqGVHOdv4Q2ygKMjKGYchAKwCs8MHx/0pZHgMM d0j3uKvAre2ys5PKvAT2WzpcN0sHKmfKfmKsrMb8u7Q9vEnjqMny4WegXRZytvmO1M Gy+nvTmpgFIVFhJVz/hKrqShvqY7wd0MMdKqldWQ= 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 741913858D32 for <gcc-patches@gcc.gnu.org>; Mon, 24 Apr 2023 21:30:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 741913858D32 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 33OKnSI0010728 for <gcc-patches@gcc.gnu.org>; Mon, 24 Apr 2023 14:30:22 -0700 Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3q4f3p7pyj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for <gcc-patches@gcc.gnu.org>; Mon, 24 Apr 2023 14:30:22 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Mon, 24 Apr 2023 14:30:20 -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, 24 Apr 2023 14:30:20 -0700 Received: from vpnclient.wrightpinski.org.com (unknown [10.69.242.187]) by maili.marvell.com (Postfix) with ESMTP id CE1293F70CE; Mon, 24 Apr 2023 14:30:18 -0700 (PDT) To: <gcc-patches@gcc.gnu.org> CC: Andrew Pinski <apinski@marvell.com> Subject: [PATCH 0/7] Some more phiopt cleanups and double minmax to match Date: Mon, 24 Apr 2023 14:30:04 -0700 Message-ID: <20230424213011.528181-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-ORIG-GUID: 9ATdUnfrLDgcWpLH8ucIc34zwB70hpJv X-Proofpoint-GUID: 9ATdUnfrLDgcWpLH8ucIc34zwB70hpJv 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-24_11,2023-04-21_01,2023-02-09_01 X-Spam-Status: No, score=-8.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, 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?1764094816810435767?= X-GMAIL-MSGID: =?utf-8?q?1764094816810435767?= |
Series |
Some more phiopt cleanups and double minmax to match
|
|
Message
Andrew Pinski
April 24, 2023, 9:30 p.m. UTC
The first 3 patches of this patch series is about some more phiopt cleanups dealing with the worker functions being folded into now the ::execute functions. The last 4 are allowing diamond based min/max optimization to be done in match instead of manually in phiopt. Note I have not removed minmax_replacement yet as there is a few missing patterns from match still. Those will be implemented in the next couple of weeks. Andrew Pinski (7): PHIOPT: Split out store elimination from phiopt PHIOPT: Rename tree_ssa_phiopt_worker to pass_phiopt::execute PHIOPT: Move store_elim_worker into pass_cselim::execute MIN/MAX should be treated similar as comparisons for trapping PHIOPT: Allow MIN/MAX to have up to 2 MIN/MAX expressions for early phiopt MATCH: Factor out code that for min max detection with constants MATCH: Add patterns from phiopt's minmax_replacement gcc/fold-const.cc | 43 ++ gcc/fold-const.h | 3 + gcc/match.pd | 45 +- gcc/rtlanal.cc | 3 + gcc/testsuite/gcc.dg/tree-ssa/minmax-16.c | 10 +- gcc/testsuite/gcc.dg/tree-ssa/split-path-1.c | 3 +- gcc/tree-eh.cc | 3 + gcc/tree-ssa-phiopt.cc | 579 ++++++++++--------- 8 files changed, 394 insertions(+), 295 deletions(-)