diff options
author | Richard Biener <rguenther@suse.de> | 2024-05-27 13:50:14 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2024-05-27 14:58:25 +0200 |
commit | 07cdba6294756af350198fbb01ea8c8efeac54dd (patch) | |
tree | c94a3f3a1eaa16d95049ab66e06d7d872c913371 /gcc | |
parent | f9fbb47987efc8b5261e4cc36613c928a8693493 (diff) | |
download | gcc-07cdba6294756af350198fbb01ea8c8efeac54dd.zip gcc-07cdba6294756af350198fbb01ea8c8efeac54dd.tar.gz gcc-07cdba6294756af350198fbb01ea8c8efeac54dd.tar.bz2 |
Fix points-to SCC collapsing bug
When points-to analysis finds SCCs it marks the wrong node as being
part of a found cycle. It only wants to mark the node it collapses
to but marked the entry node found rather than the one it collapses
to. This causes fallout in the patch for PR115236 but generally
weakens the points-to solution by collapsing too many nodes. Note
that this fix might slow down points-to solving.
* tree-ssa-structalias.cc (scc_visit): Mark the node we
collapse to as being in a component.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/tree-ssa-structalias.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree-ssa-structalias.cc b/gcc/tree-ssa-structalias.cc index a39b36c..f93c5df 100644 --- a/gcc/tree-ssa-structalias.cc +++ b/gcc/tree-ssa-structalias.cc @@ -1534,8 +1534,10 @@ scc_visit (constraint_graph_t graph, class scc_info *si, unsigned int n) graph->indirect_cycles[i - FIRST_REF_NODE] = lowest_node; } } + bitmap_set_bit (si->deleted, lowest_node); } - bitmap_set_bit (si->deleted, n); + else + bitmap_set_bit (si->deleted, n); } else si->scc_stack.safe_push (n); |