diff options
author | Devang Patel <dpatel@apple.com> | 2010-06-02 19:05:13 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-06-02 19:05:13 +0000 |
commit | 354eb7ea968f35a9e8628b8036a69f48a66e1ff9 (patch) | |
tree | 614dee63f52d1ff9735dfd8b68207d1b47979d17 | |
parent | 91a74da036d3a9442953ae1de3e797a50da4ccf0 (diff) | |
download | external_llvm-354eb7ea968f35a9e8628b8036a69f48a66e1ff9.zip external_llvm-354eb7ea968f35a9e8628b8036a69f48a66e1ff9.tar.gz external_llvm-354eb7ea968f35a9e8628b8036a69f48a66e1ff9.tar.bz2 |
Skip identical instruction while calculating DBG_VALUE range.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105340 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 4a88545..eca94cb 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -2180,12 +2180,15 @@ void DwarfDebug::collectVariableInfo(const MachineFunction *MF) { if (Processed.count(DV) != 0) continue; + const MachineInstr *PrevMI = MInsn; for (SmallVector<const MachineInstr *, 8>::iterator MI = I+1, ME = DbgValues.end(); MI != ME; ++MI) { const MDNode *Var = (*MI)->getOperand((*MI)->getNumOperands()-1).getMetadata(); - if (Var == DV && isDbgValueInDefinedReg(*MI)) + if (Var == DV && isDbgValueInDefinedReg(*MI) && + !PrevMI->isIdenticalTo(*MI)) MultipleValues.push_back(*MI); + PrevMI = *MI; } DbgScope *Scope = findDbgScope(MInsn); |