[llvm-branch-commits] [llvm-branch] r91114 - /llvm/branches/Apple/Zoidberg/lib/CodeGen/MachineBasicBlock.cpp
Bill Wendling
isanbard at gmail.com
Fri Dec 11 02:44:23 PST 2009
Author: void
Date: Fri Dec 11 04:44:23 2009
New Revision: 91114
URL: http://llvm.org/viewvc/llvm-project?rev=91114&view=rev
Log:
$ svn merge -c 91113 https://llvm.org/svn/llvm-project/llvm/trunk
--- Merging r91113 into '.':
U lib/CodeGen/MachineBasicBlock.cpp
Modified:
llvm/branches/Apple/Zoidberg/lib/CodeGen/MachineBasicBlock.cpp
Modified: llvm/branches/Apple/Zoidberg/lib/CodeGen/MachineBasicBlock.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Zoidberg/lib/CodeGen/MachineBasicBlock.cpp?rev=91114&r1=91113&r2=91114&view=diff
==============================================================================
--- llvm/branches/Apple/Zoidberg/lib/CodeGen/MachineBasicBlock.cpp (original)
+++ llvm/branches/Apple/Zoidberg/lib/CodeGen/MachineBasicBlock.cpp Fri Dec 11 04:44:23 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-branch-commits
mailing list