[llvm-bugs] [Bug 45889] New: [DebugInfo] Bloated dwarf for single location variable in nested scope
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue May 12 12:41:31 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=45889
Bug ID: 45889
Summary: [DebugInfo] Bloated dwarf for single location variable
in nested scope
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Common Code Generator Code
Assignee: unassignedbugs at nondot.org
Reporter: orlando.hyams at sony.com
CC: llvm-bugs at lists.llvm.org
Created attachment 23476
--> https://bugs.llvm.org/attachment.cgi?id=23476&action=edit
XFAIL llvm-lit test
We get bloated dwarf for a variable location in a nested scope if it also has a
location tracked outside of that scope. I've attached a test case which fails
with llvm built at 72edb7986a8 (12th May 2020).
$ llc -start-after=livedebugvalues --filetype=obj test.mir -o - |
llvm-dwarfdump -
...
DW_TAG_lexical_block
DW_AT_low_pc (0x0000000000000002)
DW_AT_high_pc (0x0000000000000003)
DW_TAG_variable
DW_AT_location (0x00000000:
[0x0000000000000000, 0x0000000000000002): DW_OP_reg5 RDI
[0x0000000000000002, 0x0000000000000003): DW_OP_reg0 RAX)
DW_AT_name ("local")
...
Despite the fact that we have a location (DW_OP_reg0 RAX) which covers the
entire lexical block [0x0000000000000002, 0x0000000000000003) in which the
variable lives, we emit a location list. I think we could emit this instead:
DW_TAG_lexical_block
DW_AT_low_pc (0x0000000000000002)
DW_AT_high_pc (0x0000000000000003)
DW_TAG_variable
DW_AT_location (DW_OP_reg0 RAX)
DW_AT_name ("local")
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200512/7ab3a1ac/attachment.html>
More information about the llvm-bugs
mailing list