mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-17 00:27:31 +00:00
- Really preserve dbg_value instructions when the register is spilled.
- Also, update dbg_value is the value is being re-matted from a frame slot, e.g. fixed slots for arguments. llvm-svn: 102565
This commit is contained in:
parent
84e3ddd87c
commit
4137a14e18
@ -1297,11 +1297,12 @@ rewriteInstructionsForSpills(const LiveInterval &li, bool TrySplit,
|
||||
++ri;
|
||||
if (MI->isDebugValue()) {
|
||||
// Modify DBG_VALUE now that the value is in a spill slot.
|
||||
if (Slot == VirtRegMap::NO_STACK_SLOT) {
|
||||
if (Slot != VirtRegMap::MAX_STACK_SLOT || isLoadSS) {
|
||||
uint64_t Offset = MI->getOperand(1).getImm();
|
||||
const MDNode *MDPtr = MI->getOperand(2).getMetadata();
|
||||
DebugLoc DL = MI->getDebugLoc();
|
||||
if (MachineInstr *NewDV = tii_->emitFrameIndexDebugValue(*mf_, Slot,
|
||||
int FI = isLoadSS ? LdSlot : (int)Slot;
|
||||
if (MachineInstr *NewDV = tii_->emitFrameIndexDebugValue(*mf_, FI,
|
||||
Offset, MDPtr, DL)) {
|
||||
DEBUG(dbgs() << "Modifying debug info due to spill:" << "\t" << *MI);
|
||||
ReplaceMachineInstrInMaps(MI, NewDV);
|
||||
|
Loading…
Reference in New Issue
Block a user