mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-28 23:43:50 +00:00
Add ARM specific emitFrameIndexDebugValue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102324 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
962021bc7f
commit
62b50656ce
@ -816,6 +816,16 @@ loadRegFromStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator I,
|
||||
}
|
||||
}
|
||||
|
||||
MachineInstr*
|
||||
ARMBaseInstrInfo::emitFrameIndexDebugValue(MachineFunction &MF,
|
||||
unsigned FrameIx, uint64_t Offset,
|
||||
const MDNode *MDPtr,
|
||||
DebugLoc DL) const {
|
||||
MachineInstrBuilder MIB = BuildMI(MF, DL, get(ARM::DBG_VALUE))
|
||||
.addFrameIndex(FrameIx).addImm(0).addImm(Offset).addMetadata(MDPtr);
|
||||
return &*MIB;
|
||||
}
|
||||
|
||||
MachineInstr *ARMBaseInstrInfo::
|
||||
foldMemoryOperandImpl(MachineFunction &MF, MachineInstr *MI,
|
||||
const SmallVectorImpl<unsigned> &Ops, int FI) const {
|
||||
|
@ -269,6 +269,12 @@ public:
|
||||
unsigned DestReg, int FrameIndex,
|
||||
const TargetRegisterClass *RC) const;
|
||||
|
||||
virtual MachineInstr *emitFrameIndexDebugValue(MachineFunction &MF,
|
||||
unsigned FrameIx,
|
||||
uint64_t Offset,
|
||||
const MDNode *MDPtr,
|
||||
DebugLoc DL) const;
|
||||
|
||||
virtual bool canFoldMemoryOperand(const MachineInstr *MI,
|
||||
const SmallVectorImpl<unsigned> &Ops) const;
|
||||
|
||||
|
@ -1183,6 +1183,13 @@ ARMBaseRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II,
|
||||
SPAdj = 0;
|
||||
Offset += SPAdj;
|
||||
|
||||
// Special handling of dbg_value instructions.
|
||||
if (MI.isDebugValue()) {
|
||||
MI.getOperand(i). ChangeToRegister(FrameReg, false /*isDef*/);
|
||||
MI.getOperand(i+1).ChangeToImmediate(Offset);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Modify MI as necessary to handle as much of 'Offset' as possible
|
||||
bool Done = false;
|
||||
if (!AFI->isThumbFunction())
|
||||
|
Loading…
Reference in New Issue
Block a user