summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-06-02 19:05:13 +0000
committerDevang Patel <dpatel@apple.com>2010-06-02 19:05:13 +0000
commitc2254f6b981c845846063764eaaed0d5f9fc8efd (patch)
treef8f62f866438cd2b9e3a8102ef4864e9cfd70afe /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parent2d35a9e810cb21451c10c506f2c6ddb2ad6cf0fc (diff)
downloadbcm5719-llvm-c2254f6b981c845846063764eaaed0d5f9fc8efd.tar.gz
bcm5719-llvm-c2254f6b981c845846063764eaaed0d5f9fc8efd.zip
Skip identical instruction while calculating DBG_VALUE range.
llvm-svn: 105340
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 4a88545266b..eca94cb0a1e 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud