[PATCH] D79571: [DebugInfo][DWARF] Emit a single location instead of a location list

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 7 11:20:24 PDT 2020


vsk added a reviewer: probinson.
vsk added a comment.

This is really nice.



================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1541
+    if (&*I == LScopeEnd)
+      return false;
+
----------------
aprantl wrote:
> Does this do the right thing if the scope is "interrupted" by another scope within MBB?
Hm, are you describing a situation like this, where all the code is fit into one MBB?

```
{
  dbg_value "x"
  {
    dbg_value "y"
    ...
  }
}
```

If the inner scope is an inlined frame, I think it'd be ok for the location of 'x' to be valid throughout, since the debugger shouldn't consider 'x' in scope. If its a nested {} scope, 'x' should still be visible within it.

So I think this is ok. Might be good to add tests for this, though.


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

https://reviews.llvm.org/D79571





More information about the llvm-commits mailing list