[PATCH] D79571: [DebugInfo][DWARF] Emit a single location instead of a location list
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 7 13:02:16 PDT 2020
aprantl added inline comments.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1541
+ if (&*I == LScopeEnd)
+ return false;
+
----------------
vsk wrote:
> 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.
I was thinking about
```
MBB:
insn 1 # scope A
insn 2 # scope A
insn 3 # completely unrelated scope B, instruction was moved here by a transformation
insn 4 # scope A
...
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79571/new/
https://reviews.llvm.org/D79571
More information about the llvm-commits
mailing list