[llvm-commits] [llvm] r134620 - /llvm/trunk/lib/CodeGen/MachineInstr.cpp

Devang Patel dpatel at apple.com
Thu Jul 7 10:45:33 PDT 2011


Author: dpatel
Date: Thu Jul  7 12:45:33 2011
New Revision: 134620

URL: http://llvm.org/viewvc/llvm-project?rev=134620&view=rev
Log:
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". 

Modified:
    llvm/trunk/lib/CodeGen/MachineInstr.cpp

Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=134620&r1=134619&r2=134620&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Thu Jul  7 12:45:33 2011
@@ -802,6 +802,11 @@
         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;
 }
 





More information about the llvm-commits mailing list