[PATCH] D16839: [SimplifyCFG] Fix for "endless" loop after dead code removal (Alternative toD16251)

Akira Hatanaka via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 3 09:22:30 PST 2016

ahatanak accepted this revision.
ahatanak added a comment.
This revision is now accepted and ready to land.

LGTM with a few nits.

Comment at: lib/Transforms/Utils/SimplifyCFG.cpp:514
@@ -512,2 +513,3 @@
     // Initialize
-    DFT.push_back(V);
+    if (Visited.insert(V).second)
+      DFT.push_back(V);
You can just insert the value without checking the boolean value (the boolean value should always be true here).

Comment at: test/Transforms/SimplifyCFG/InfLoop.ll:171
@@ +170,2 @@
+  ret void
Can this test be smaller?


More information about the llvm-commits mailing list