return end();
iterator InsertPt = FirstNonPHI;
- if (isa<LandingPadInst>(InsertPt)) ++InsertPt;
+ if (InsertPt->isEHPad()) ++InsertPt;
return InsertPt;
}
}
}
+bool BasicBlock::canSplitPredecessors() const {
+ const Instruction *FirstNonPHI = getFirstNonPHI();
+ if (isa<LandingPadInst>(FirstNonPHI))
+ return true;
+ // This is perhaps a little conservative because constructs like
+ // CleanupBlockInst are pretty easy to split. However, SplitBlockPredecessors
+ // cannot handle such things just yet.
+ if (FirstNonPHI->isEHPad())
+ return false;
+ return true;
+}
/// This splits a basic block into two at the specified
/// instruction. Note that all instructions BEFORE the specified iterator stay