mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-22 13:29:44 +00:00
clean this up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97870 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0a7f442314
commit
eea3f7e4ee
@ -204,9 +204,10 @@ bool SparcAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI,
|
|||||||
/// isBlockOnlyReachableByFallthough - Return true if the basic block has
|
/// isBlockOnlyReachableByFallthough - Return true if the basic block has
|
||||||
/// exactly one predecessor and the control transfer mechanism between
|
/// exactly one predecessor and the control transfer mechanism between
|
||||||
/// the predecessor and this block is a fall-through.
|
/// the predecessor and this block is a fall-through.
|
||||||
/// Override AsmPrinter implementation to handle delay slots
|
///
|
||||||
bool SparcAsmPrinter::isBlockOnlyReachableByFallthrough(const MachineBasicBlock *MBB)
|
/// This overrides AsmPrinter's implementation to handle delay slots.
|
||||||
const {
|
bool SparcAsmPrinter::
|
||||||
|
isBlockOnlyReachableByFallthrough(const MachineBasicBlock *MBB) const {
|
||||||
// If this is a landing pad, it isn't a fall through. If it has no preds,
|
// If this is a landing pad, it isn't a fall through. If it has no preds,
|
||||||
// then nothing falls through to it.
|
// then nothing falls through to it.
|
||||||
if (MBB->isLandingPad() || MBB->pred_empty())
|
if (MBB->isLandingPad() || MBB->pred_empty())
|
||||||
@ -224,10 +225,10 @@ bool SparcAsmPrinter::isBlockOnlyReachableByFallthrough(const MachineBasicBlock
|
|||||||
if (!Pred->isLayoutSuccessor(MBB))
|
if (!Pred->isLayoutSuccessor(MBB))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Check if the last terminator is an unconditional branch
|
// Check if the last terminator is an unconditional branch.
|
||||||
MachineBasicBlock::const_iterator I = Pred->end();
|
MachineBasicBlock::const_iterator I = Pred->end();
|
||||||
while( I != Pred->begin() && !(--I)->getDesc().isTerminator() )
|
while (I != Pred->begin() && !(--I)->getDesc().isTerminator())
|
||||||
; /* Noop */
|
; // Noop
|
||||||
return I == Pred->end() || !I->getDesc().isBarrier();
|
return I == Pred->end() || !I->getDesc().isBarrier();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user