summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit12ac8f0352630502d56840bb9cb53ae7f9254eb8 (patch)
tree8f7a109319e36275dc25f9db4dbf58ee9c9dd4e1 /llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp
parent042ce2d8f1a36478bf30872a12a8855255f131ca (diff)
downloadbcm5719-llvm-12ac8f0352630502d56840bb9cb53ae7f9254eb8.tar.gz
bcm5719-llvm-12ac8f0352630502d56840bb9cb53ae7f9254eb8.zip
Update debug information when breaking anti-dependencies. rdar://7759363
llvm-svn: 105300
Diffstat (limited to 'llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp')
-rw-r--r--llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp b/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp
index 4008a6a63cf..84b226b3d0f 100644
--- a/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp
+++ b/llvm/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
OpenPOWER on IntegriCloud