[PATCH] Rewrite calculateDbgValueHistory to make it (hopefully) more transparent.

David Blaikie dblaikie at gmail.com
Fri May 16 16:09:22 PDT 2014

Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1271
@@ -1270,3 +1270,3 @@
                      << "\t" << *Begin << "\t" << *End << "\n");
-        if (End->isDebugValue())
+        if (End->isDebugValue() && End->getDebugVariable() == DV)
           SLabel = getLabelBeforeInsn(End);
Alexey Samsonov wrote:
> David Blaikie wrote:
> > What's the reason for these extra conditions? (the getDebugVariable() == DV checks here and below)
> After this change, the location range for the variable DV:
> 1) starts at a DBG_VALUE instruction for DV
> 2) ends at another instruction. In particular, it can be DBG_VALUE instruction for some other variable.
Not to hold up the submission of this patch, but I can't quite grasp your explanation here.

Are you suggesting that this change (this particular part of your patch, or the patch in general) is changing behavior? It'd be helpful to keep the behavior change separate, if possible.


More information about the llvm-commits mailing list