aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/AggressiveAntiDepBreaker.cpp
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2010-06-01 23:48:44 +0000
committerJim Grosbach <grosbach@apple.com>2010-06-01 23:48:44 +0000
commit20caa1c63307ea36d44818e0d0cc6cd4307c294b (patch)
treeab66b6eac855458a7cd4e681e0a5b0185dd91562 /lib/CodeGen/AggressiveAntiDepBreaker.cpp
parentd7518ce08f6cdf96710d568c0564b5658a0ebe81 (diff)
downloadexternal_llvm-20caa1c63307ea36d44818e0d0cc6cd4307c294b.zip
external_llvm-20caa1c63307ea36d44818e0d0cc6cd4307c294b.tar.gz
external_llvm-20caa1c63307ea36d44818e0d0cc6cd4307c294b.tar.bz2
Update debug information when breaking anti-dependencies. rdar://7759363
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105300 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AggressiveAntiDepBreaker.cpp')
-rw-r--r--lib/CodeGen/AggressiveAntiDepBreaker.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/CodeGen/AggressiveAntiDepBreaker.cpp b/lib/CodeGen/AggressiveAntiDepBreaker.cpp
index 4008a6a..84b226b 100644
--- a/lib/CodeGen/AggressiveAntiDepBreaker.cpp
+++ b/lib/CodeGen/AggressiveAntiDepBreaker.cpp
@@ -905,6 +905,18 @@ unsigned AggressiveAntiDepBreaker::BreakAntiDependencies(
AggressiveAntiDepState::RegisterReference>::iterator
Q = Range.first, QE = Range.second; Q != QE; ++Q) {
Q->second.Operand->setReg(NewReg);
+ // If the SU for the instruction being updated has debug
+ // information related to the anti-dependency register, make
+ // sure to update that as well.
+ const SUnit *SU = MISUnitMap[Q->second.Operand->getParent()];
+ for (unsigned i = 0, e = SU->DbgInstrList.size() ; i < e ; ++i) {
+ MachineInstr *DI = SU->DbgInstrList[i];
+ assert (DI->getNumOperands()==3 && DI->getOperand(0).isReg() &&
+ DI->getOperand(0).getReg()
+ && "Non register dbg_value attached to SUnit!");
+ if (DI->getOperand(0).getReg() == AntiDepReg)
+ DI->getOperand(0).setReg(NewReg);
+ }
}
// We just went back in time and modified history; the