[20/22] Don't try to reduce NG from dominators

Message ID 20231004123921.634024-21-j@lambda.is
State Unresolved
Headers
Series [01/22] Add condition coverage profiling |

Checks

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

Commit Message

Jørgen Kvalsvik Oct. 4, 2023, 12:39 p.m. UTC
  The presence of gotos already makes this iffy, but it is already not
necessary as reducing by refining the G should cover it.
---
 gcc/tree-profile.cc | 19 -------------------
 1 file changed, 19 deletions(-)
  

Patch

diff --git a/gcc/tree-profile.cc b/gcc/tree-profile.cc
index f329be84ad2..d1d7265cd1c 100644
--- a/gcc/tree-profile.cc
+++ b/gcc/tree-profile.cc
@@ -788,25 +788,6 @@  isolate_expression (conds_ctx &ctx, basic_block p, vec<basic_block>& out)
 	gcc_assert (bitmap_count_bits (expr) > 2);
 	bitmap_copy (prev, expr);
 
-	const unsigned NGlen = NG.length ();
-	for (unsigned i = 0; i != NGlen - 1; i++)
-	{
-	    for (unsigned j = i+1; j != NGlen; j++)
-	    {
-		basic_block b = nearest_common_dominator (CDI_DOMINATORS, NG[i], NG[j]);
-		if (ctx.index_map[b->index] > ctx.index_map[p->index])
-		{
-		    bitmap_clear_bit (expr, NG[i]->index);
-		    bitmap_clear_bit (expr, NG[j]->index);
-		    bitmap_set_bit (expr, b->index);
-		    NG.safe_push (b);
-		}
-	    }
-	}
-	for (unsigned i = 0; i != NG.length (); i++)
-	    if (!bitmap_bit_p (expr, NG[i]->index))
-		NG.unordered_remove (i--);
-
 	bitmap_copy (expr, reachable);
 	for (const basic_block neighbor : NG)
 	{