]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Avoid non-unified nodes on the topological sorting for PTA solving
authorRichard Biener <rguenther@suse.de>
Tue, 14 Mar 2023 13:39:32 +0000 (14:39 +0100)
committerRichard Biener <rguenther@suse.de>
Wed, 19 Apr 2023 12:14:14 +0000 (14:14 +0200)
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.

gcc/tree-ssa-structalias.cc

index fa3a2e4e1f9195901dde1a63c3711347c3ca0f32..8976cc9c2f87c61575ff49c0cdddcde51a0284fc 100644 (file)
@@ -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);