From patchwork Wed Apr 19 13:43: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: 85413 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp400180vqo; Wed, 19 Apr 2023 06:44:06 -0700 (PDT) X-Google-Smtp-Source: AKy350akg5aLBpP/vDasiJN+7enQ05wPKAjTINJj+tepG5Rn4cBM93KbmGGLvWNi5pFThVKf0zbi X-Received: by 2002:a17:906:3bca:b0:94e:e0b7:96d5 with SMTP id v10-20020a1709063bca00b0094ee0b796d5mr15492784ejf.50.1681911846400; Wed, 19 Apr 2023 06:44:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681911846; cv=none; d=google.com; s=arc-20160816; b=a1HbF/QIuPdqCz/+o4EEFeg1WxpluexG7yaBiyZjKV6Sl54V5uHgmLpKeEqF9HhyZh f1PWr1jQDjNS6EanQTpjx9UMfnpTWsBCMGsTDDE9cqHmvNVbxgOomkBVYoeyJNuKxYVS sM/Stg9i0QdAhBkrjk6MxXNL4o6ZmOhmXYFF44BViCW+9WVW9qSc7+nk6n/cF5ctxfEP enadlDa5gAcxQ9xeEjGWeeCOo3S+zNITWDp1rWBgLDkyvoNuE6PsHmVeKatduEYK5qxm 8ehvwQLQRt6OHlUhKbuxYiA+XFq4Kt+cGxD7E26PwKcr1XBxVb01KrK3PDfa19h8XJgo Wvdw== 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=xB4aPeu1W39Qc36I89EjZJMq7RmMlkFglc4jfm6HvNc=; b=oOWVRs4mDI3RsFHYPQAxY1rZAXMGuQKxju0boCSsy8duGAng3PmSUbUPj39bVhJE9q gDdeBEnYj7OtE7aL6lee86blFjQsv66LgoeE7HDA9N1gq8Ak54uUQNeHVCce8I9OsQZ9 uraLQIl1iKt7s3ClRm0d9h3NPBO1U34+tSJQpDWe8UwuHY2XOU2Wqw5sp9NZi4vPRK+I vBSUM1Rj4wEeaeofGXVhxCan6Zt1ciEwgnzvw2bUQ1A/+wwV4f2YuvWN4uCkbano0a64 4IPoYiaVxhBsUVjK+DZIQOE2UO4zUCFxHNGgjjpUAfqJzkt7gZyqTckrW9pLpOQfl+5V vV8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Na+WrJqo; 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 ex24-20020a170907955800b0094f3b3b5e96si8416403ejc.782.2023.04.19.06.44.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Apr 2023 06:44:06 -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=Na+WrJqo; 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 315BD3857022 for ; Wed, 19 Apr 2023 13:43:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 315BD3857022 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681911832; bh=xB4aPeu1W39Qc36I89EjZJMq7RmMlkFglc4jfm6HvNc=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=Na+WrJqozW9x3aBq5BlUIDUt7+fE9vmwfwdbpHGo3pp9ZihZgCclmz18AlbZEF7Hr 0W8dZVE8iH432eyG39igBVzbXZ5LB1CVjNQCiN7IRIjQdTpbZuPVzh4ieLoSrAvpnX UdZT9qPz/U+co/2sill2hqA1M0Eh8+8Dh4pRXGtU= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id 148DD385843A for ; Wed, 19 Apr 2023 13:43:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 148DD385843A Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 42E1C1FD8D for ; Wed, 19 Apr 2023 13:43: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 38B6F2C141 for ; Wed, 19 Apr 2023 13:43:08 +0000 (UTC) Date: Wed, 19 Apr 2023 13:43:08 +0000 (UTC) To: gcc-patches@gcc.gnu.org Subject: [PATCH 2/2] Use solve_add_graph_edge in more places 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: <20230419134352.315BD3857022@sourceware.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763612396218440177?= X-GMAIL-MSGID: =?utf-8?q?1763612396218440177?= The following makes sure to use solve_add_graph_edge and honoring special-cases, especially edges from escaped, in the remaining places the solver adds edges. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. * tree-ssa-structalias.cc (do_ds_constraint): Use solve_add_graph_edge. --- gcc/tree-ssa-structalias.cc | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/gcc/tree-ssa-structalias.cc b/gcc/tree-ssa-structalias.cc index 84c625d53e5..47808a3d813 100644 --- a/gcc/tree-ssa-structalias.cc +++ b/gcc/tree-ssa-structalias.cc @@ -1767,11 +1767,8 @@ do_ds_constraint (constraint_t c, bitmap delta, bitmap *expanded_delta) if (bitmap_bit_p (delta, anything_id)) { unsigned t = find (storedanything_id); - if (add_graph_edge (graph, t, rhs)) - { - if (bitmap_ior_into (get_varinfo (t)->solution, sol)) - bitmap_set_bit (changed, t); - } + if (solve_add_graph_edge (graph, t, rhs)) + bitmap_set_bit (changed, t); return; } @@ -1825,8 +1822,8 @@ do_ds_constraint (constraint_t c, bitmap delta, bitmap *expanded_delta) break; t = find (v->id); - if (add_graph_edge (graph, t, rhs) - && bitmap_ior_into (get_varinfo (t)->solution, sol)) + + if (solve_add_graph_edge (graph, t, rhs)) bitmap_set_bit (changed, t); }