From patchwork Wed Apr 19 12:13:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 85361 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp339932vqo; Wed, 19 Apr 2023 05:15:08 -0700 (PDT) X-Google-Smtp-Source: AKy350ZUcXTfKYqoQevK+XFc5vfbx5J9eQeDjhwdNS+PQDKOMDdEGFcPtu4dPGWs7XCOTturH2DK X-Received: by 2002:a17:906:16c5:b0:94f:704d:a486 with SMTP id t5-20020a17090616c500b0094f704da486mr10568409ejd.32.1681906508216; Wed, 19 Apr 2023 05:15:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681906508; cv=none; d=google.com; s=arc-20160816; b=pmpFW8eQH1NkhM//C6rGFC83Lcnkot57H7F0GYnRwsV0CHDJdi4NvH46+n0J+I6QE/ rv8sAvX1Pvd4uZ0OTZ4ZcROvbCOS0qXDNMJuk4q1eAQXutOT9ErvGolR+FukkpXv7Ky6 +a9avEWi8JlLfFJLEnjjy2SES0/6mcni0wSBAWlqDNwIlGcvETpo5KNq3b1XCiGt60Yw ExGYWlxKq+/I8pblyOUdM+ZwUkonVkSVk8w4xAj7etffXg6YBuDftDbnEXWaLGGSDI02 9xnSq+IvXc7EXZPBt/2xinj2dMCzy6lhmaoALt1aMnQz92+YeYzuHfwcmNw14mg/vADo ywZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:sender:errors-to:reply-to:from:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mime-version:user-agent:subject:to:date:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=oGsfZH0AKCz44d4ON6Oyid3Rqfg/CKK7i35XJ3lSI90=; b=c6fVeNzJWfrPfK3EaRc37z/7r/SD8jo99OvzkfvZHNJIgu5z3cIngTCgKQX1DCJ5VX 93CLZ/R6h3jihYDzPjsopVeKaxhRTbpARFUstLcbMASMMW7jII0JIg1zDDaJeF006Kbw OJuWRD4uwezZkwfuoS+Ywk3WYpJkSO8RF+6MRMwDzkUzkqD/TbDAK6UwFBHXvlCYKLAX dU7X/GXoXNjO7Xqti7tCdk8AlEgHAWxaPllNKBAFD60uXDW8t2DehwQ9FB43BL9Mewfc DhlcT7A813JmnAZdvLdGi3Q5vXsq9kufpZ3iJrmdenR371omrdRupM3FI5Q0gbasgx3K Zhpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=ltH7DACq; 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 eu20-20020a170907299400b009529bfc0c2csi4043763ejc.215.2023.04.19.05.15.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Apr 2023 05:15:08 -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=ltH7DACq; 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 656C83857019 for ; Wed, 19 Apr 2023 12:14:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 656C83857019 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681906478; bh=oGsfZH0AKCz44d4ON6Oyid3Rqfg/CKK7i35XJ3lSI90=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=ltH7DACq8ZQybZ5fU6VE0nzpdO2lnqMUlbIR1lu6/zJzvTUfKE27BmBugvQvwvp9U K1ZLFwEtH16PsG3nH1R4H+D08HzJBZ9pS40ThFdsX5u4QgFe3cfC3x1KMhzQZqAOod FiGtkRJbpNruDeL+x37BAWg17/W+cfvYMNbk1h1s= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id AAB43385843A for ; Wed, 19 Apr 2023 12:13:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AAB43385843A Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id DA8ED2198E for ; Wed, 19 Apr 2023 12:13:52 +0000 (UTC) Received: from wotan.suse.de (wotan.suse.de [10.160.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id CE94E2C141 for ; Wed, 19 Apr 2023 12:13:52 +0000 (UTC) Date: Wed, 19 Apr 2023 12:13:52 +0000 (UTC) To: gcc-patches@gcc.gnu.org Subject: [PATCH 1/4] Avoid non-unified nodes on the topological sorting for PTA solving User-Agent: Alpine 2.22 (LSU 394 2020-01-19) MIME-Version: 1.0 X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, MISSING_MID, SPF_HELO_NONE, SPF_PASS, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Richard Biener via Gcc-patches From: Richard Biener Reply-To: Richard Biener Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" Message-Id: <20230419121438.656C83857019@sourceware.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763606798663767665?= X-GMAIL-MSGID: =?utf-8?q?1763606798663767665?= Since we do not update successor edges when merging nodes we have to deal with this in the users. The following avoids putting those on the topo order vector. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. * tree-ssa-structalias.cc (topo_visit): Look at the real destination of edges. --- gcc/tree-ssa-structalias.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/tree-ssa-structalias.cc b/gcc/tree-ssa-structalias.cc index fa3a2e4e1f9..8976cc9c2f8 100644 --- a/gcc/tree-ssa-structalias.cc +++ b/gcc/tree-ssa-structalias.cc @@ -1632,8 +1632,9 @@ topo_visit (constraint_graph_t graph, struct topo_info *ti, if (graph->succs[n]) EXECUTE_IF_SET_IN_BITMAP (graph->succs[n], 0, j, bi) { - if (!bitmap_bit_p (ti->visited, j)) - topo_visit (graph, ti, j); + unsigned k = find (j); + if (!bitmap_bit_p (ti->visited, k)) + topo_visit (graph, ti, k); } ti->topo_order.safe_push (n); From patchwork Wed Apr 19 12:14:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 85362 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp340263vqo; Wed, 19 Apr 2023 05:15:34 -0700 (PDT) X-Google-Smtp-Source: AKy350akVyxtLd1B/v9Geux50fiVXisd5Y3oytCkTq948Qa8S+WWxgNMdwL0kwWVJDdmwRiJdj/t X-Received: by 2002:a17:906:eb14:b0:94a:653b:ba41 with SMTP id mb20-20020a170906eb1400b0094a653bba41mr2646246ejb.15.1681906534513; Wed, 19 Apr 2023 05:15:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681906534; cv=none; d=google.com; s=arc-20160816; b=QA7QD3QRzc0WzUOu2bENlAMTjvXAEzViPM1Fj3PFGbITWGN6EatVlCwHhcpjg4HYC6 0eRLCcnbiuFKbPdpdqmpkHAWf1O2tUp33SFlsVvFsxDDNx/WILOVvHxXCi6pxrGpKP5G AVKSpI9EZlHQK3Q8pLmigJedBF3mWQMgOkehri/VXSmq/EZ19/R+B1I94k6lz5dB7otr cv4ASTDc0fjw6U3u+ArW/DbpfsSMfyqs/xKSHqOX0BnBdSsUsXGtsxDDPEE1LBpBqaKe X9jMZtpJgsPBJ1KoZZSWloY5VkTQWH/voVbqDpRVVMFauxr8+2oSkvpCmGF/dWligQXG yAtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:sender:errors-to:reply-to:from:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mime-version:user-agent:subject:to:date:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=FUl9nYAPfC0WbFN7edG6o8ZrPMrgf3WoneoeBf+S1Y8=; b=NHvr0NEzW1HvG3tHuzOfUL4/8c8xD01lys7LSwX2ZySvW+GUW3Yv7OITF34to2mcMT ED7GkGidAM9rK1gzKRZZLGUCyDJ+nJad5i2DY+XvSx9gQgFVJqHPPQt+pTbok3eEMQIK bq9byEi5dx0f/q2sx6PZEfBQe1BIgbfPB8LQXbFUN4lKbLD3Fi0xUilkW6QHtAY0II+8 pQZe+MrNaI7HwtjGdRghwcZh+Muq9B61Gmwd5Z+EXw4XeMD1zuEm56HpvoKHdEtLaBQJ FLl07s0xM2szlH/c/3rHB4ik1DwWNqN6+NckfmCK0dRzFcgxWxVrbyZofThctVLQ6/aY jooA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=wo9x7apT; 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 up37-20020a170907cca500b0094f3b71946dsi8623917ejc.870.2023.04.19.05.15.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Apr 2023 05:15:34 -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=wo9x7apT; 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 C3DBE3853800 for ; Wed, 19 Apr 2023 12:14:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C3DBE3853800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681906493; bh=FUl9nYAPfC0WbFN7edG6o8ZrPMrgf3WoneoeBf+S1Y8=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=wo9x7apTgRjWdUUrPfUXmhQ7TCCbw3/TiC9/cezM0JYp/GjxlAF3RP5kwdQptLFiJ SZ2imkYftDJznCWY2Ea1GoAse2HezpGzCLXY53TeXlispIzpAvk1qm2scdEOcu5Vgj fex8G8Q00V/B+zDdAgkqxvuJnKrajm3bCX9gbnto= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id 99FDA385843A for ; Wed, 19 Apr 2023 12:14:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 99FDA385843A Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id C6F892198E for ; Wed, 19 Apr 2023 12:14:08 +0000 (UTC) Received: from wotan.suse.de (wotan.suse.de [10.160.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id AE6AE2C141 for ; Wed, 19 Apr 2023 12:14:08 +0000 (UTC) Date: Wed, 19 Apr 2023 12:14:08 +0000 (UTC) To: gcc-patches@gcc.gnu.org Subject: [PATCH 2/4] Remove senseless store in do_sd_constraint User-Agent: Alpine 2.22 (LSU 394 2020-01-19) MIME-Version: 1.0 X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, MISSING_MID, SPF_HELO_NONE, SPF_PASS, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Richard Biener via Gcc-patches From: Richard Biener Reply-To: Richard Biener Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" Message-Id: <20230419121453.C3DBE3853800@sourceware.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763606826425963577?= X-GMAIL-MSGID: =?utf-8?q?1763606826425963577?= Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. * tree-ssa-structalias.cc (do_sd_constraint): Do not write to the LHS varinfo solution member. --- gcc/tree-ssa-structalias.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gcc/tree-ssa-structalias.cc b/gcc/tree-ssa-structalias.cc index 8976cc9c2f8..89027ab573d 100644 --- a/gcc/tree-ssa-structalias.cc +++ b/gcc/tree-ssa-structalias.cc @@ -1724,10 +1724,7 @@ do_sd_constraint (constraint_graph_t graph, constraint_t c, done: /* If the LHS solution changed, mark the var as changed. */ if (flag) - { - get_varinfo (lhs)->solution = sol; - bitmap_set_bit (changed, lhs); - } + bitmap_set_bit (changed, lhs); } /* Process a constraint C that represents *(x + off) = y using DELTA From patchwork Wed Apr 19 12:14:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 85363 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp340663vqo; Wed, 19 Apr 2023 05:16:03 -0700 (PDT) X-Google-Smtp-Source: AKy350YuxxUY1fGHWjuZSV+ZvrRfI8zDKNb6qrhEhUHlbbgc/0zbANCn5Wocy4Sl36RoZpudiLPQ X-Received: by 2002:aa7:d98f:0:b0:506:a663:5c1b with SMTP id u15-20020aa7d98f000000b00506a6635c1bmr5365474eds.18.1681906563370; Wed, 19 Apr 2023 05:16:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681906563; cv=none; d=google.com; s=arc-20160816; b=CuIsVnd7UJN4Q+92PpYV0oJL8S7BztVLQGqBOxggCgi/TWLA06OE9s/xuNH0Sccn3K xzLVejN39fMPRthr0iP/vNscTY2cy80XJB+AVtRB1xoKhmsiUYkknoKKX7C/cJeUFJC8 ly+aATw5gp6sB30q5lxefLNmQ1ALqWIOI1iuYwM3ATiHexhNUcFTaaHfZadjyhWuzWaN 7Vd4GLnyTHkas6cJJx6BiHqew7OuPAhkE7bolTyQzASxtqT54b8bAU9fUlRwaghALq9r myzq+wM17QlWt1dlMEkZEPFRUo8z7JrJoBeQ7xMlXxKwE/NPxxzRvPnxzP9MNc8cRVmw +bGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:sender:errors-to:reply-to:from:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mime-version:user-agent:subject:to:date:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=EWJO7h69uX6zTgVb49XapzFpUaeHop+JBnnhAQQOMig=; b=oJ1/gpM6I50DPqUODGdug/3eUTFfojpG4Ut/oTnxjkZHJOX2UFuaWfT24G6VRPukMA qYGKNPNq3SxxaNFCDs+OoqkiKjOEbV/VTn+1DOksG0bJTv9Aja7NEOrlZwthBo4u97nh qd19U+6jEvVdof1knTK0AWC0dtUw/m2BTlgQFdHtsgOaSA4EDcqp/PmzXVbSaWKBFYAT 3JhYGrWey2badHNCwFug/YL06G0lnpqAHmmMDngrFTDR2bETqyiNrJujs+fOTP2ZIXMu wT7p3vMHCfGNuUfdwqaPCTSawQsO26O3L7q+Wk0XMpjlmAUmLTg/ZUDfObdu0+FGkv0Y 9jjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=e5NmoeGF; 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 a7-20020aa7cf07000000b00506bea09a35si3532405edy.433.2023.04.19.05.16.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Apr 2023 05:16:03 -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=e5NmoeGF; 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 78B90385696B for ; Wed, 19 Apr 2023 12:15:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 78B90385696B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681906522; bh=EWJO7h69uX6zTgVb49XapzFpUaeHop+JBnnhAQQOMig=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=e5NmoeGF4gIBOE/eAo+zfJ0Vdhj1K9nxmIS3X9QwQ2XAJJLR8nVMeGJAE5dWTmT04 n6Y7sLLbu1EF4/6VuyZcblH3O64/D75ZSzUwJBQFKCzrl1gmNbE1LPbcqh7fcLkkOL eUYqt776QioOVp4seVWfjljxkto2XRBgr+qVXn9Q= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 6FFEE3857034 for ; Wed, 19 Apr 2023 12:14:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6FFEE3857034 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id A7ED62199B for ; Wed, 19 Apr 2023 12:14:24 +0000 (UTC) Received: from wotan.suse.de (wotan.suse.de [10.160.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 9D88D2C141 for ; Wed, 19 Apr 2023 12:14:24 +0000 (UTC) Date: Wed, 19 Apr 2023 12:14:24 +0000 (UTC) To: gcc-patches@gcc.gnu.org Subject: [PATCH 3/4] Fix do_sd_constraint escape special casing User-Agent: Alpine 2.22 (LSU 394 2020-01-19) MIME-Version: 1.0 X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, MISSING_MID, SPF_HELO_NONE, SPF_PASS, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Richard Biener via Gcc-patches From: Richard Biener Reply-To: Richard Biener Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" Message-Id: <20230419121522.78B90385696B@sourceware.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763606856432322073?= X-GMAIL-MSGID: =?utf-8?q?1763606856432322073?= The following fixes the escape special casing to test the proper variable IDs. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. * tree-ssa-structalias.cc (do_sd_constraint): Fixup escape special casing. --- gcc/tree-ssa-structalias.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/tree-ssa-structalias.cc b/gcc/tree-ssa-structalias.cc index 89027ab573d..4f350bfbfc0 100644 --- a/gcc/tree-ssa-structalias.cc +++ b/gcc/tree-ssa-structalias.cc @@ -1706,7 +1706,7 @@ do_sd_constraint (constraint_graph_t graph, constraint_t c, flag |= bitmap_ior_into (sol, get_varinfo (t)->solution); /* Merging the solution from ESCAPED needlessly increases the set. Use ESCAPED as representative instead. */ - else if (v->id == escaped_id) + else if (t == find (escaped_id)) flag |= bitmap_set_bit (sol, escaped_id); else if (v->may_have_pointers && add_graph_edge (graph, lhs, t)) From patchwork Wed Apr 19 12:14:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 85364 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp341230vqo; Wed, 19 Apr 2023 05:16:47 -0700 (PDT) X-Google-Smtp-Source: AKy350Z/uyp0rypOlFSRRupMGdTVUdJWQCkcIMA+29veh/KpotCWps4G5wf0Hp6uSLvdQ5Y4qgJ2 X-Received: by 2002:a17:906:cc53:b0:94a:7716:e649 with SMTP id mm19-20020a170906cc5300b0094a7716e649mr13677633ejb.13.1681906607311; Wed, 19 Apr 2023 05:16:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681906607; cv=none; d=google.com; s=arc-20160816; b=jV3kH4k+hGAuuoo6iaCoZBQbCL8uUy+S1JQc7zy9VHltYqshDYT1sTlKjW3Nm1QWbT 2C8KNL/TvBneuB3Te5eewcJo/zbU/h4kh9qDDAWSt2uZhrKFV2GUz1D5cvJN52MX6X8H vjkeyGivWKHYjy16KfV+t+Pd13WoyKo7b9ROLRsB3cFVyGVxwp8klFUJ1KFHc4znx2IB Kxs6p5wm6oe82gO9CuPd0eWVZDzLFj2NSuT/3Ejq2HJ28g6TwoOmxevX7sfT/tTdsjKV 6rbkjNHmNn/v02yXt8UFImgjeVn7I9AzGuQyaJjnOXbc+lIVh3orUsxfWzAWmvB0QqPG sY/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:sender:errors-to:reply-to:from:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mime-version:user-agent:subject:to:date:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=CYw4tywIz/zjPGxu4Y0LrubUHk2XXora0prhIoX//Q4=; b=geeBfJImiDaDK7o/yrkMwo3/tBVnzPhO5QqLk0/YyzRi0lwQDv0ApIDSFHWtp/33Mw dHY+43YFhO70bUl4NNDUNbYsGyHzULET1lb0x5KoklatoBF0l0VY+C/KcvecEhm164de HBfmfgyPRd1v3a6FU3kvP08u1ier6EHr/GBmkR5eunRTF3gIpDrvL4aS/KwzLR5VG3DO S9hSsSX+8zmcpUll9gjKxrxl62hUuRvTNZkRH2Z6qqMLFjt62cQUSo+A3PNX5/E35q5a KXBXBjKkHFoyaw03t3tZKlLd61o5VLUosw1w+yFkHeSalGdhe0KUlrcq7Vx0Ikt2kfSP yiwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=xRohdb71; 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 j23-20020aa7de97000000b0050477dfb22bsi17154672edv.565.2023.04.19.05.16.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Apr 2023 05:16:47 -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=xRohdb71; 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 C45363857038 for ; Wed, 19 Apr 2023 12:16:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C45363857038 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681906579; bh=CYw4tywIz/zjPGxu4Y0LrubUHk2XXora0prhIoX//Q4=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=xRohdb71oZBjcj5Oud/gSSCNe8Z0YoOq3Fvj2ASl2DtPq+SZ2dJ5YanqTn1OtNNTu kKIJ6SUJOFmMgj1XTF8/bP5NxyVcWh0EJ0eKp5y90426xA+HRZpKET4sNNjrtoYdmD aPX67RLz6D97sJNa0ibYyvr+xEMacAFVTVD0w+MQ= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id B6A643856969 for ; Wed, 19 Apr 2023 12:14:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B6A643856969 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id ADFEA219A0 for ; Wed, 19 Apr 2023 12:14:37 +0000 (UTC) Received: from wotan.suse.de (wotan.suse.de [10.160.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 945802C141 for ; Wed, 19 Apr 2023 12:14:37 +0000 (UTC) Date: Wed, 19 Apr 2023 12:14:37 +0000 (UTC) To: gcc-patches@gcc.gnu.org Subject: [PATCH 4/4] Remove special-cased edges when solving copies User-Agent: Alpine 2.22 (LSU 394 2020-01-19) MIME-Version: 1.0 X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, MISSING_MID, SPF_HELO_NONE, SPF_PASS, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Richard Biener via Gcc-patches From: Richard Biener Reply-To: Richard Biener Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" Message-Id: <20230419121619.C45363857038@sourceware.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763606902914580172?= X-GMAIL-MSGID: =?utf-8?q?1763606902914580172?= The following makes sure to remove the copy edges we ignore or need to special-case only once. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. * tree-ssa-structalias.cc (solve_graph): Remove self-copy edges, remove edges from escaped after special-casing them. --- gcc/tree-ssa-structalias.cc | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/gcc/tree-ssa-structalias.cc b/gcc/tree-ssa-structalias.cc index 4f350bfbfc0..39c342fae41 100644 --- a/gcc/tree-ssa-structalias.cc +++ b/gcc/tree-ssa-structalias.cc @@ -2873,19 +2873,22 @@ solve_graph (constraint_graph_t graph) } /* Don't try to propagate to ourselves. */ if (to == i) - continue; - - bitmap tmp = get_varinfo (to)->solution; - bool flag = false; - - /* If we propagate from ESCAPED use ESCAPED as - placeholder. */ + { + to_remove = j; + continue; + } + /* Early node unification can lead to edges from + escaped - remove them. */ if (i == eff_escaped_id) - flag = bitmap_set_bit (tmp, escaped_id); - else - flag = bitmap_ior_into (tmp, pts); + { + to_remove = j; + if (bitmap_set_bit (get_varinfo (to)->solution, + escaped_id)) + bitmap_set_bit (changed, to); + continue; + } - if (flag) + if (bitmap_ior_into (get_varinfo (to)->solution, pts)) bitmap_set_bit (changed, to); } if (to_remove != ~0U)