mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-26 05:25:47 +00:00
Transfer implicit ops when forming load multiple and return instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117151 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -416,6 +416,10 @@ public:
|
|||||||
///
|
///
|
||||||
bool allDefsAreDead() const;
|
bool allDefsAreDead() const;
|
||||||
|
|
||||||
|
/// copyImplicitOps - Copy implicit register operands from specified
|
||||||
|
/// instruction to this instruction.
|
||||||
|
void copyImplicitOps(const MachineInstr *MI);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Debugging support
|
// Debugging support
|
||||||
//
|
//
|
||||||
|
@@ -680,7 +680,7 @@ bool SimpleRegisterCoalescing::ReMaterializeTrivialDef(LiveInterval &SrcInt,
|
|||||||
RemoveCopyFlag(MO.getReg(), CopyMI);
|
RemoveCopyFlag(MO.getReg(), CopyMI);
|
||||||
}
|
}
|
||||||
|
|
||||||
TransferImplicitOps(CopyMI, NewMI);
|
NewMI->copyImplicitOps(CopyMI);
|
||||||
li_->ReplaceMachineInstrInMaps(CopyMI, NewMI);
|
li_->ReplaceMachineInstrInMaps(CopyMI, NewMI);
|
||||||
CopyMI->eraseFromParent();
|
CopyMI->eraseFromParent();
|
||||||
ReMatCopies.insert(CopyMI);
|
ReMatCopies.insert(CopyMI);
|
||||||
|
@@ -1196,6 +1196,7 @@ bool ARMLoadStoreOpt::MergeReturnIntoLDM(MachineBasicBlock &MBB) {
|
|||||||
unsigned NewOpc = isThumb2 ? ARM::t2LDM_RET : ARM::LDM_RET;
|
unsigned NewOpc = isThumb2 ? ARM::t2LDM_RET : ARM::LDM_RET;
|
||||||
PrevMI->setDesc(TII->get(NewOpc));
|
PrevMI->setDesc(TII->get(NewOpc));
|
||||||
MO.setReg(ARM::PC);
|
MO.setReg(ARM::PC);
|
||||||
|
PrevMI->copyImplicitOps(&*MBBI);
|
||||||
MBB.erase(MBBI);
|
MBB.erase(MBBI);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user