Revert the avoid threading circular paths commit.
authorAldy Hernandez <aldyh@redhat.com>
Thu, 21 Oct 2021 11:18:49 +0000 (13:18 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Thu, 21 Oct 2021 11:18:49 +0000 (13:18 +0200)
I've tested this patch on the wrong tree, and picked up the test changes
in a pending patch, without which this patch is no longer obvious.
Plus, it causes a regression in an invalid test I've recommended we remove.

I'm reverting this patch until the dependencies are reviewed.

Sorry for the noise.

gcc/ChangeLog:

* tree-ssa-threadbackward.c
(back_threader::maybe_register_path): Remove circular paths check.

gcc/tree-ssa-threadbackward.c

index 38913b0..d94e3b9 100644 (file)
@@ -140,10 +140,6 @@ back_threader::maybe_register_path ()
 
   if (taken_edge && taken_edge != UNREACHABLE_EDGE)
     {
-      // Avoid circular paths.
-      if (m_visited_bbs.contains (taken_edge->dest))
-       return UNREACHABLE_EDGE;
-
       bool irreducible = false;
       bool profitable
        = m_profit.profitable_path_p (m_path, m_name, taken_edge, &irreducible);