Message ID | ork02dfpbv.fsf@lxoliva.fsfla.org |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1219572wrt; Mon, 26 Dec 2022 20:23:38 -0800 (PST) X-Google-Smtp-Source: AMrXdXvC/4SJVS2oUEAzYAqePiqrWevVzykejZLOk5UTkGph9x9TNjXBLIWEeBf3jfjPhVPrp9K1 X-Received: by 2002:a05:6402:104d:b0:486:ac69:b9e4 with SMTP id e13-20020a056402104d00b00486ac69b9e4mr1442888edu.4.1672115018846; Mon, 26 Dec 2022 20:23:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672115018; cv=none; d=google.com; s=arc-20160816; b=P1dHWR2GEq3OfSfEL65pnyEHfVZy6mFvT8JKZoOdNh58iBM7LkDP4lpKO63i3YxQ1T dz2P3BVNhfTFffWZW0+0E8OOsKTL2YhxsN7/oeiTzeXmT9YfGg7qc8bRXQXn7Bcbct0G qHUh9mm6Nk6cv3yGiI8xvP3oZbZNBTKq+2HTz65AvC/hDxgx/wHyJzLEURMpZwEokP3f GMy4201/wK++omfAN9de9Sz0Iel1oiZcnoBm6x+OrPOh1TRobd/cAGejGo7jslys7Ov6 LlOpnKX95JXQk9MBfqijwbDO3w1XsB7XIG5lXVjZWu1K/nYuuLWlTWjCWtfJpzE/IqoL uUrw== 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:mime-version :user-agent:message-id:in-reply-to:date:references:organization :subject:to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=HjgLGbTwZlo/mdqI6jJwSYzhxqZ9P9dfpykfpRfmxro=; b=KO8CX50CfYChhMglCw0F6qYxF8H22lYtRAy/B73f6Pm/pbbHJe9aWiKy4eOzeALLtC xHj1SbWCJwNofq6D6UhqUgkkCJ59zfVUVmLGXyJUZ47hsc40b5eSUOz36l9AMCdEep9W hMpRUqmulCZ7+Q+D2ygpXi37JPehZarmOCwT/PYuPOObb0eV+1graheXO3OnKaLwoDD0 iS2wCrJva694+DQJE1+NVPlg6oeL+Q2AYAT47IEV73PU3cEtX+hoepjjd6KYfndyNKkK V7rrrP3hqXops0KAKpFszJ3hpzdazEZvU8J6PYaGlE09e7qK43iL6wNkvKfF7S4o6ZJn sOug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Fyrzl8Yd; 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 (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id b23-20020aa7cd17000000b00461c3758704si8955116edw.36.2022.12.26.20.23.38 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Dec 2022 20:23:38 -0800 (PST) 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=Fyrzl8Yd; 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 D22FE3858C2D for <ouuuleilei@gmail.com>; Tue, 27 Dec 2022 04:23:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D22FE3858C2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1672115017; bh=HjgLGbTwZlo/mdqI6jJwSYzhxqZ9P9dfpykfpRfmxro=; h=To:Subject:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=Fyrzl8Ydy7IC0GyhC+FPLSZG1Rb6bxTm1CnTUHCgI6wLPeie5X0Mod76j/WZwKHRx jTLl+pEzUXGSt8eEkwO6U9Vm1W5iDp0oKqlHNpR42ut3onVuME1wJcl7FEr60dcQU8 rQHBQdOTIzzpJqoVx0yQnJ81hDrBiu/mE2Nvy8GY= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from rock.gnat.com (rock.gnat.com [IPv6:2620:20:4000:0:a9e:1ff:fe9b:1d1]) by sourceware.org (Postfix) with ESMTPS id 1CACB3858416 for <gcc-patches@gcc.gnu.org>; Tue, 27 Dec 2022 04:22:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1CACB3858416 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id D71A21162AC; Mon, 26 Dec 2022 23:22:36 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at gnat.com Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id cLbmacll-P3P; Mon, 26 Dec 2022 23:22:36 -0500 (EST) Received: from free.home (tron.gnat.com [IPv6:2620:20:4000:0:46a8:42ff:fe0e:e294]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPS id 9EAB01162AB; Mon, 26 Dec 2022 23:22:36 -0500 (EST) Received: from livre (livre.home [172.31.160.2]) by free.home (8.15.2/8.15.2) with ESMTPS id 2BR4MSad712153 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 27 Dec 2022 01:22:28 -0300 To: gcc-patches@gcc.gnu.org Subject: [05/13] ssa-loop-niter: skip caching of null operands Organization: Free thinker, does not speak for AdaCore References: <or5ydxh4l4.fsf@lxoliva.fsfla.org> Date: Tue, 27 Dec 2022 01:22:28 -0300 In-Reply-To: <or5ydxh4l4.fsf@lxoliva.fsfla.org> (Alexandre Oliva's message of "Tue, 27 Dec 2022 01:07:35 -0300") Message-ID: <ork02dfpbv.fsf@lxoliva.fsfla.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.84 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, 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.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: Alexandre Oliva via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Alexandre Oliva <oliva@adacore.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?1753339678323714773?= X-GMAIL-MSGID: =?utf-8?q?1753339678323714773?= |
Series |
[01/13] scoped tables: insert before further lookups
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Alexandre Oliva
Dec. 27, 2022, 4:22 a.m. UTC
When a TREE_OPERAND is NULL, do not cache it. Regstrapped on x86_64-linux-gnu. Ok to install? for gcc/ChangeLog * tree-ssa-loop-niter.cc (expand_simple_operands): Refrain from caching NULL TREE_OPERANDs. --- gcc/tree-ssa-loop-niter.cc | 2 ++ 1 file changed, 2 insertions(+)
Comments
On 12/26/22 21:22, Alexandre Oliva via Gcc-patches wrote: > > When a TREE_OPERAND is NULL, do not cache it. > > Regstrapped on x86_64-linux-gnu. Ok to install? > > > for gcc/ChangeLog > > * tree-ssa-loop-niter.cc (expand_simple_operands): Refrain > from caching NULL TREE_OPERANDs. I must admit some curiosity about the NULL operand though. Do you recall what kind of node had a NULL operand and whether or not that was a valid state or not? I just want to make sure this isn't just papering over a deeper issue. jeff
Hello, Jeff, On Dec 27, 2022, Jeff Law <jeffreyalaw@gmail.com> wrote: >> * tree-ssa-loop-niter.cc (expand_simple_operands): Refrain >> from caching NULL TREE_OPERANDs. > I must admit some curiosity about the NULL operand though. Do you > recall what kind of node had a NULL operand and whether or not that > was a valid state or not? I'm pretty sure the case I hit was a CALL_EXPR. Thanks for the reviews! Happy GNU Year!
diff --git a/gcc/tree-ssa-loop-niter.cc b/gcc/tree-ssa-loop-niter.cc index fece876099c16..17645648326e8 100644 --- a/gcc/tree-ssa-loop-niter.cc +++ b/gcc/tree-ssa-loop-niter.cc @@ -2325,6 +2325,8 @@ expand_simple_operations (tree expr, tree stop, hash_map<tree, tree> &cache) for (i = 0; i < n; i++) { e = TREE_OPERAND (expr, i); + if (!e) + continue; /* SCEV analysis feeds us with a proper expression graph matching the SSA graph. Avoid turning it into a tree here, thus handle tree sharing