[1/4] Avoid non-unified nodes on the topological sorting for PTA solving

Message ID 20230419121438.656C83857019@sourceware.org
State Repeat Merge
Headers
Series [1/4] Avoid non-unified nodes on the topological sorting for PTA solving |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Richard Biener April 19, 2023, 12:13 p.m. UTC
  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(-)
  

Patch

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);