diff options
author | Evan Cheng <evan.cheng@apple.com> | 2010-04-26 18:37:21 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2010-04-26 18:37:21 +0000 |
commit | 6fa7636e614cbf0a19d374e169791a774281e8d3 (patch) | |
tree | bfcec20b1652f642f9653a56de491d983b042932 /lib/CodeGen/LiveIntervalAnalysis.cpp | |
parent | f74e25f60c8c63b819ff603cb4c3c18424dc87a7 (diff) | |
download | external_llvm-6fa7636e614cbf0a19d374e169791a774281e8d3.zip external_llvm-6fa7636e614cbf0a19d374e169791a774281e8d3.tar.gz external_llvm-6fa7636e614cbf0a19d374e169791a774281e8d3.tar.bz2 |
Re-enable 102323 with fix: do not update dbg_value's with incorrect frame indices when the live interval are being re-materialized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102361 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r-- | lib/CodeGen/LiveIntervalAnalysis.cpp | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index 3e37417..bd8a54c 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -1296,28 +1296,25 @@ rewriteInstructionsForSpills(const LiveInterval &li, bool TrySplit, MachineOperand &O = ri.getOperand(); ++ri; if (MI->isDebugValue()) { -#if 0 - // Disabled temporarily. // Modify DBG_VALUE now that the value is in a spill slot. - uint64_t Offset = MI->getOperand(1).getImm(); - const MDNode *MDPtr = MI->getOperand(2).getMetadata(); - DebugLoc DL = MI->getDebugLoc(); - MachineInstr *NewDV = tii_->emitFrameIndexDebugValue(*mf_, Slot, Offset, - MDPtr, DL); - if (NewDV) { - DEBUG(dbgs() << "Modifying debug info due to spill:" << "\t" << *MI); - ReplaceMachineInstrInMaps(MI, NewDV); - MachineBasicBlock *MBB = MI->getParent(); - MBB->insert(MBB->erase(MI), NewDV); - } else { -#endif - DEBUG(dbgs() << "Removing debug info due to spill:" << "\t" << *MI); - RemoveMachineInstrFromMaps(MI); - vrm.RemoveMachineInstrFromMaps(MI); - MI->eraseFromParent(); -#if 0 + if (Slot == VirtRegMap::NO_STACK_SLOT) { + 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, + Offset, MDPtr, DL)) { + DEBUG(dbgs() << "Modifying debug info due to spill:" << "\t" << *MI); + ReplaceMachineInstrInMaps(MI, NewDV); + MachineBasicBlock *MBB = MI->getParent(); + MBB->insert(MBB->erase(MI), NewDV); + continue; + } } -#endif + + DEBUG(dbgs() << "Removing debug info due to spill:" << "\t" << *MI); + RemoveMachineInstrFromMaps(MI); + vrm.RemoveMachineInstrFromMaps(MI); + MI->eraseFromParent(); continue; } assert(!O.isImplicit() && "Spilling register that's used as implicit use?"); |