[PATCH] D14308: [SimplifyCFG] Extend SimplifyResume to handle phi of trivial landing pad.
    Philip Reames via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Nov  3 15:45:24 PST 2015
    
    
  
reames added inline comments.
================
Comment at: lib/Transforms/Utils/SimplifyCFG.cpp:2959
@@ +2958,3 @@
+    // can not delete it because it has other dependents.
+    if (!PhiLPInst || TrivialBB->getUniqueSuccessor() == BB) {
+      // Blocks that will be deleted should also be removed from the phi node.
----------------
This is at the wrong point.  We should be checking that the terminator is a unconditional branch before considering the basic block trivial.
http://reviews.llvm.org/D14308
    
    
More information about the llvm-commits
mailing list