mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-02 20:38:34 +00:00
Revert part of r91101 which was causing an infinite loop in the self-hosting
build bots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91113 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
be1ce0a867
commit
a288b2f43a
@ -457,11 +457,16 @@ MachineBasicBlock::BranchesToLandingPad(const MachineBasicBlock *MBB) const {
|
|||||||
SmallSet<const MachineBasicBlock*, 32> Visited;
|
SmallSet<const MachineBasicBlock*, 32> Visited;
|
||||||
const MachineBasicBlock *CurMBB = MBB;
|
const MachineBasicBlock *CurMBB = MBB;
|
||||||
|
|
||||||
while (!CurMBB->isLandingPad()) {
|
while (!Visited.count(CurMBB) && !CurMBB->isLandingPad()) {
|
||||||
if (CurMBB->succ_size() != 1)
|
if (CurMBB->size() != 1 || CurMBB->succ_empty() || CurMBB->succ_size() != 1)
|
||||||
break;
|
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();
|
CurMBB = *CurMBB->succ_begin();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user