1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

I had a senior moment.

llvm-svn: 37433
This commit is contained in:
Evan Cheng 2007-06-05 07:05:25 +00:00
parent 09b12fef98
commit d495b2f9b9

View File

@ -444,10 +444,11 @@ bool IfConverter::AnalyzeBlocks(MachineFunction &MF,
/// isNextBlock - Returns true either if ToBB the next block after BB or
/// that all the intervening blocks are empty.
static bool isNextBlock(MachineBasicBlock *BB, MachineBasicBlock *ToBB) {
MachineFunction *MF = BB->getParent();
MachineFunction::iterator I = BB;
while (++I != MF->end() && I != MachineFunction::iterator(ToBB))
if (!I->empty())
MachineFunction::iterator TI = ToBB;
MachineFunction::iterator E = BB->getParent()->end();
while (++I != TI)
if (I == E || !I->empty())
return false;
return true;
}