[PATCH] D13718: [SimplifyCFG] Extend SimplifyResume to handle phi of trivial landing pad.

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 21 18:47:49 PDT 2015


reames added inline comments.

================
Comment at: lib/Transforms/Utils/SimplifyCFG.cpp:2971
@@ +2970,3 @@
+  // Delete the resume block if all its predecessors have been deleted.
+  if (BB->getParent() && pred_begin(BB) == pred_end(BB)) {
+    BB->eraseFromParent();
----------------
BB->getParent should always be set?  Is this defensive programming (remove it), or a bug (add test case)?


http://reviews.llvm.org/D13718





More information about the llvm-commits mailing list