mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
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:
parent
0fba714359
commit
f7ca976e74
@ -1351,7 +1351,7 @@ namespace {
|
||||
bool ARMLoadStoreOpt::MergeReturnIntoLDM(MachineBasicBlock &MBB) {
|
||||
if (MBB.empty()) return false;
|
||||
|
||||
MachineBasicBlock::iterator MBBI = prior(MBB.end());
|
||||
MachineBasicBlock::iterator MBBI = MBB.getLastNonDebugInstr();
|
||||
if (MBBI != MBB.begin() &&
|
||||
(MBBI->getOpcode() == ARM::BX_RET ||
|
||||
MBBI->getOpcode() == ARM::tBX_RET ||
|
||||
|
@ -769,7 +769,7 @@ void X86FrameLowering::emitEpilogue(MachineFunction &MF,
|
||||
RetOpcode == X86::TCRETURNmi64) {
|
||||
bool isMem = RetOpcode == X86::TCRETURNmi || RetOpcode == X86::TCRETURNmi64;
|
||||
// Tail call return: adjust the stack pointer and jump to callee.
|
||||
MBBI = MBB.getFirstTerminator();
|
||||
MBBI = MBB.getLastNonDebugInstr();
|
||||
MachineOperand &JumpTarget = MBBI->getOperand(0);
|
||||
MachineOperand &StackAdjust = MBBI->getOperand(isMem ? 5 : 1);
|
||||
assert(StackAdjust.isImm() && "Expecting immediate value.");
|
||||
|
@ -208,7 +208,7 @@ void XCoreFrameLowering::emitPrologue(MachineFunction &MF) const {
|
||||
void XCoreFrameLowering::emitEpilogue(MachineFunction &MF,
|
||||
MachineBasicBlock &MBB) const {
|
||||
MachineFrameInfo *MFI = MF.getFrameInfo();
|
||||
MachineBasicBlock::iterator MBBI = prior(MBB.end());
|
||||
MachineBasicBlock::iterator MBBI = MBB.getLastNonDebugInstr();
|
||||
const XCoreInstrInfo &TII =
|
||||
*static_cast<const XCoreInstrInfo*>(MF.getTarget().getInstrInfo());
|
||||
DebugLoc dl = MBBI->getDebugLoc();
|
||||
|
Loading…
Reference in New Issue
Block a user