+ // We should always be able to fold the entry block of the function into the
+ // single predecessor of the block...
+ assert(cast<BranchInst>(Br)->isUnconditional() && "splitBasicBlock broken!");
+ BasicBlock *CalleeEntry = cast<BranchInst>(Br)->getSuccessor(0);
+ SimplifyCFG(CalleeEntry);
+
+ // Okay, continue the CFG cleanup. It's often the case that there is only a
+ // single return instruction in the callee function. If this is the case,
+ // then we have an unconditional branch from the return block to the 'NewBB'.
+ // Check for this case, and eliminate the branch is possible.
+ SimplifyCFG(NewBB);