diff options
author | Devang Patel <dpatel@apple.com> | 2011-06-02 21:26:52 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-06-02 21:26:52 +0000 |
commit | f02a376fbc2ce1f4bc160986874be6e39d7b9685 (patch) | |
tree | a3d3b10b602316a854da508d09645c41938b26cd /llvm/lib/CodeGen/CriticalAntiDepBreaker.cpp | |
parent | f0759ef2719e6161cdb85717a2ae5f3b5fe0bad7 (diff) | |
download | bcm5719-llvm-f02a376fbc2ce1f4bc160986874be6e39d7b9685.tar.gz bcm5719-llvm-f02a376fbc2ce1f4bc160986874be6e39d7b9685.zip |
Update DBG_VALUEs while breaking anti dependencies.
llvm-svn: 132487
Diffstat (limited to 'llvm/lib/CodeGen/CriticalAntiDepBreaker.cpp')
-rw-r--r-- | llvm/lib/CodeGen/CriticalAntiDepBreaker.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/CriticalAntiDepBreaker.cpp b/llvm/lib/CodeGen/CriticalAntiDepBreaker.cpp index f79598de1d9..51d984ffac0 100644 --- a/llvm/lib/CodeGen/CriticalAntiDepBreaker.cpp +++ b/llvm/lib/CodeGen/CriticalAntiDepBreaker.cpp @@ -421,7 +421,8 @@ unsigned CriticalAntiDepBreaker:: BreakAntiDependencies(const std::vector<SUnit>& SUnits, MachineBasicBlock::iterator Begin, MachineBasicBlock::iterator End, - unsigned InsertPosIndex) { + unsigned InsertPosIndex, + DbgValueVector &DbgValues) { // The code below assumes that there is at least one instruction, // so just duck out immediately if the block is empty. if (SUnits.empty()) return 0; @@ -628,14 +629,10 @@ BreakAntiDependencies(const std::vector<SUnit>& SUnits, // as well. const SUnit *SU = MISUnitMap[Q->second->getParent()]; if (!SU) continue; - 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); - } + for (DbgValueVector::iterator DVI = DbgValues.begin(), + DVE = DbgValues.end(); DVI != DVE; ++DVI) + if (DVI->second == Q->second->getParent()) + UpdateDbgValue(DVI->first, AntiDepReg, NewReg); } // We just went back in time and modified history; the |