diff options
author | Devang Patel <dpatel@apple.com> | 2011-07-07 17:45:33 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-07-07 17:45:33 +0000 |
commit | bf8cc60d1b4a4c4ba3013c6b6f77b98854817f6d (patch) | |
tree | 7e1131c5367cd8c1abbc4c8b1778c20ad12e7bc3 /llvm/lib/CodeGen/MachineInstr.cpp | |
parent | c46e3ce58c791a7e57930de053a097997a9622bf (diff) | |
download | bcm5719-llvm-bf8cc60d1b4a4c4ba3013c6b6f77b98854817f6d.tar.gz bcm5719-llvm-bf8cc60d1b4a4c4ba3013c6b6f77b98854817f6d.zip |
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".
llvm-svn: 134620
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineInstr.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index f490713e720..143a29b08a1 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/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; } |