[llvm] [DFAJumpThreading] Avoid exploring the paths that never come back (PR #85505)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 16 01:54:42 PDT 2024


================
@@ -575,6 +582,12 @@ struct AllSwitchPaths {
 
     Visited.insert(BB);
 
+    // Stop if we have reached the BB out of loop, since its successors have no
+    // impact on the DFA.
+    // TODO: Do we need to stop exploring if BB is the outer loop of the switch?
----------------
nikic wrote:

I think so. Would that cause any test changes?

https://github.com/llvm/llvm-project/pull/85505


More information about the llvm-commits mailing list