Revert part of r91101 which was causing an infinite loop in the self-hosting

build bots.

llvm-svn: 91113
This commit is contained in:
Bill Wendling 2009-12-11 10:43:41 +00:00
parent d73da0fbb9
commit 895f84dd62

View File

@ -457,11 +457,16 @@ MachineBasicBlock::BranchesToLandingPad(const MachineBasicBlock *MBB) const {
SmallSet<const MachineBasicBlock*, 32> Visited;
const MachineBasicBlock *CurMBB = MBB;
while (!CurMBB->isLandingPad()) {
if (CurMBB->succ_size() != 1)
while (!Visited.count(CurMBB) && !CurMBB->isLandingPad()) {
if (CurMBB->size() != 1 || CurMBB->succ_empty() || CurMBB->succ_size() != 1)
break;
if (!Visited.insert(CurMBB)) break;
const TargetInstrInfo *TII =
CurMBB->getParent()->getTarget().getInstrInfo();
if (!TII->isUnpredicatedTerminator(CurMBB->begin()))
break;
Visited.insert(CurMBB);
CurMBB = *CurMBB->succ_begin();
}