mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 00:32:55 +00:00
I had a senior moment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37433 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
febca3499e
commit
c53ef58a35
@ -444,10 +444,11 @@ bool IfConverter::AnalyzeBlocks(MachineFunction &MF,
|
|||||||
/// isNextBlock - Returns true either if ToBB the next block after BB or
|
/// isNextBlock - Returns true either if ToBB the next block after BB or
|
||||||
/// that all the intervening blocks are empty.
|
/// that all the intervening blocks are empty.
|
||||||
static bool isNextBlock(MachineBasicBlock *BB, MachineBasicBlock *ToBB) {
|
static bool isNextBlock(MachineBasicBlock *BB, MachineBasicBlock *ToBB) {
|
||||||
MachineFunction *MF = BB->getParent();
|
|
||||||
MachineFunction::iterator I = BB;
|
MachineFunction::iterator I = BB;
|
||||||
while (++I != MF->end() && I != MachineFunction::iterator(ToBB))
|
MachineFunction::iterator TI = ToBB;
|
||||||
if (!I->empty())
|
MachineFunction::iterator E = BB->getParent()->end();
|
||||||
|
while (++I != TI)
|
||||||
|
if (I == E || !I->empty())
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user