From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1666) id 87D7438555AC; Wed, 19 Apr 2023 12:15:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 87D7438555AC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681906525; bh=jo5JxrHYvy0kzfpRmizYFy4oTwvhWoNcbIGvMBnPFDo=; h=From:To:Subject:Date:From; b=HYKuPMm6Xo+wYZ3i8ZMwqAZ5bQGee2GFlEA/BlNn2YXUAJzTUVkERjBYaGQSoI3hA ae56LztpOfJYkW31FviJDehkGGcMQYXPBlGC9+u/5aH3DLnIkhoh5GcHmd5M1K1lqz VVcV8uiuHLJfuMFsL9RPE6k1U0rcqIZu1ayQ9Vb8= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Richard Biener To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-72] Avoid non-unified nodes on the topological sorting for PTA solving X-Act-Checkin: gcc X-Git-Author: Richard Biener X-Git-Refname: refs/heads/master X-Git-Oldrev: a243ce2a52a6c62bc0d6be0b756a85dd9c1bceb7 X-Git-Newrev: 7838574b5aca179e347eb972880ea8376a2cc6b5 Message-Id: <20230419121525.87D7438555AC@sourceware.org> Date: Wed, 19 Apr 2023 12:15:25 +0000 (GMT) List-Id: https://gcc.gnu.org/g:7838574b5aca179e347eb972880ea8376a2cc6b5 commit r14-72-g7838574b5aca179e347eb972880ea8376a2cc6b5 Author: Richard Biener Date: Tue Mar 14 14:39:32 2023 +0100 Avoid non-unified nodes on the topological sorting for PTA solving 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. * tree-ssa-structalias.cc (topo_visit): Look at the real destination of edges. Diff: --- 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);