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

Alexey Samsonov samsonov at google.com
Tue May 20 11:45:29 PDT 2014


Thanks for the review! Submitted as r209225.

================
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);
----------------
David Blaikie wrote:
> 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.
This shouldn't be a behavior change, we're slightly changing the assumptions about which instructions can be used for tracking the location of a variable (but this would result in the same labels and .debug_loc contents). Anyway, watching the bots.

http://reviews.llvm.org/D3597






More information about the llvm-commits mailing list