Fix a few more places that should use MBB::getLastNonDebugInstr().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123408 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen
2011-01-13 22:47:43 +00:00
parent 0fba714359
commit f7ca976e74
3 changed files with 3 additions and 3 deletions

View File

@@ -1351,7 +1351,7 @@ namespace {
bool ARMLoadStoreOpt::MergeReturnIntoLDM(MachineBasicBlock &MBB) { bool ARMLoadStoreOpt::MergeReturnIntoLDM(MachineBasicBlock &MBB) {
if (MBB.empty()) return false; if (MBB.empty()) return false;
MachineBasicBlock::iterator MBBI = prior(MBB.end()); MachineBasicBlock::iterator MBBI = MBB.getLastNonDebugInstr();
if (MBBI != MBB.begin() && if (MBBI != MBB.begin() &&
(MBBI->getOpcode() == ARM::BX_RET || (MBBI->getOpcode() == ARM::BX_RET ||
MBBI->getOpcode() == ARM::tBX_RET || MBBI->getOpcode() == ARM::tBX_RET ||

View File

@@ -769,7 +769,7 @@ void X86FrameLowering::emitEpilogue(MachineFunction &MF,
RetOpcode == X86::TCRETURNmi64) { RetOpcode == X86::TCRETURNmi64) {
bool isMem = RetOpcode == X86::TCRETURNmi || RetOpcode == X86::TCRETURNmi64; bool isMem = RetOpcode == X86::TCRETURNmi || RetOpcode == X86::TCRETURNmi64;
// Tail call return: adjust the stack pointer and jump to callee. // Tail call return: adjust the stack pointer and jump to callee.
MBBI = MBB.getFirstTerminator(); MBBI = MBB.getLastNonDebugInstr();
MachineOperand &JumpTarget = MBBI->getOperand(0); MachineOperand &JumpTarget = MBBI->getOperand(0);
MachineOperand &StackAdjust = MBBI->getOperand(isMem ? 5 : 1); MachineOperand &StackAdjust = MBBI->getOperand(isMem ? 5 : 1);
assert(StackAdjust.isImm() && "Expecting immediate value."); assert(StackAdjust.isImm() && "Expecting immediate value.");

View File

@@ -208,7 +208,7 @@ void XCoreFrameLowering::emitPrologue(MachineFunction &MF) const {
void XCoreFrameLowering::emitEpilogue(MachineFunction &MF, void XCoreFrameLowering::emitEpilogue(MachineFunction &MF,
MachineBasicBlock &MBB) const { MachineBasicBlock &MBB) const {
MachineFrameInfo *MFI = MF.getFrameInfo(); MachineFrameInfo *MFI = MF.getFrameInfo();
MachineBasicBlock::iterator MBBI = prior(MBB.end()); MachineBasicBlock::iterator MBBI = MBB.getLastNonDebugInstr();
const XCoreInstrInfo &TII = const XCoreInstrInfo &TII =
*static_cast<const XCoreInstrInfo*>(MF.getTarget().getInstrInfo()); *static_cast<const XCoreInstrInfo*>(MF.getTarget().getInstrInfo());
DebugLoc dl = MBBI->getDebugLoc(); DebugLoc dl = MBBI->getDebugLoc();