aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-07-07 17:45:33 +0000
committerDevang Patel <dpatel@apple.com>2011-07-07 17:45:33 +0000
commit9194c6716be13e2b8d2cf8e45273bf6c79f8b32c (patch)
treeeb182bdc7d5545640792718deae50f5cdda26fed /lib/CodeGen/MachineInstr.cpp
parentf86b76ead71649c58d34e625416008b4fec95eb8 (diff)
downloadexternal_llvm-9194c6716be13e2b8d2cf8e45273bf6c79f8b32c.zip
external_llvm-9194c6716be13e2b8d2cf8e45273bf6c79f8b32c.tar.gz
external_llvm-9194c6716be13e2b8d2cf8e45273bf6c79f8b32c.tar.bz2
If known DebugLocs do not match then two DBG_VALUE machine instructions are not identical. For example,
DBG_VALUE 3.310000e+02, 0, !"ds"; dbg:sse.stepfft.c:138:18 @[ sse.stepfft.c:32:10 ] DBG_VALUE 3.310000e+02, 0, !"ds"; dbg:sse.stepfft.c:138:18 @[ sse.stepfft.c:31:10 ] These two MIs represent identical value, 3.31..., for one variable, ds, but they are not identical because the represent two separate instances of inlined variable "ds". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134620 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineInstr.cpp')
-rw-r--r--lib/CodeGen/MachineInstr.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp
index f490713..143a29b 100644
--- a/lib/CodeGen/MachineInstr.cpp
+++ b/lib/CodeGen/MachineInstr.cpp
@@ -802,6 +802,11 @@ bool MachineInstr::isIdenticalTo(const MachineInstr *Other,
return false;
}
}
+ // If DebugLoc does not match then two dbg.values are not identical.
+ if (isDebugValue())
+ if (!getDebugLoc().isUnknown() && !Other->getDebugLoc().isUnknown()
+ && getDebugLoc() != Other->getDebugLoc())
+ return false;
return true;
}