[llvm-commits] [llvm] r91113 - /llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp
Bill Wendling
isanbard at gmail.com
Fri Dec 11 02:43:42 PST 2009
Author: void
Date: Fri Dec 11 04:43:41 2009
New Revision: 91113
URL: http://llvm.org/viewvc/llvm-project?rev=91113&view=rev
Log:
Revert part of r91101 which was causing an infinite loop in the self-hosting
build bots.
Modified:
llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp
Modified: llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp?rev=91113&r1=91112&r2=91113&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp Fri Dec 11 04:43:41 2009
@@ -457,11 +457,16 @@
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();
}
More information about the llvm-commits
mailing list