[PATCH] D62196: [LiveDebugValues] Close range for previous variable's location when deducing new variable's location

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 22 08:52:14 PDT 2019


aprantl added inline comments.


================
Comment at: lib/CodeGen/LiveDebugValues.cpp:436
+
+    // Close previous variable's location range.
+    DebugVariable V(DMI->getDebugVariable(),
----------------
jmorse wrote:
> NikolaPrica wrote:
> > aprantl wrote:
> > >  previous variable's -> this variable's previous
> > > 
> > > Does this do the right thing for two fragments of the same variable where one of them has a longer live range than the other? Or is this a non-issue here?
> > I think it does the right thing. It does the same thing as `transferDebugValue`. Variable's locations are related to pair of DILocalVariable and DILocation thus this closes DILocalVariable location with matching DILocation.
> NB: as it stands, I don't believe LiveDebugValues handles fragments at all, which I've written up in https://bugs.llvm.org/show_bug.cgi?id=41979
> 
> (Thus this patch neither helps nor harms fragment handling).
Huh.

> It does the same thing as transferDebugValue.

Looks like this is correct and LiveDebugValues can't propagate more than the last fragment of a variable. Unfortunate, but it does simplify the code. Carry on.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62196/new/

https://reviews.llvm.org/D62196





More information about the llvm-commits mailing list