DebugLocLists with no entries: any idea how to generate a testcase?
aprantl at apple.com
Wed May 27 18:39:13 PDT 2015
Empty debug loc lists can happen if there is more than one DBG_VALUE for a variable, but none of them can be represented in DWARF or they are all for vregs that were never materialized. Your patch only covers the latter case. You can catch both cases by checking for an empty list in buildLocationList, I guess.
I also noticed this while testing out llvm-dsymutil and filed
<rdar://problem/20543424> Clang is emitting empty location list
as a reminder to investigate this but didn’t get a chance to follow up on this so far.
You could try building a synthetic test case that e.g., has a variable in an SSE register, which (I think) we can’t represent in DWARF.
I would be happy with just the assertion, too. Until we have a machine IR ;-) these test cases will always be very brittle and bitrot quickly.
> On May 27, 2015, at 5:51 PM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote:
> I've noticed there are debug loc lists with no entries sometimes
> in my heap profiling workload (a linker dump of `-flto -g`). It
> seems to happen when *all* the locations correspond to `%noreg`.
> This patch adds an assertion (which fires on my big workload,
> but not in any of our tests), and adds a likely fix that's
> commented out.
> Does anyone know how to generate this kind of thing, or should I
> just start compiling things to see if I can make it happen on my
> own? (I've tried reducing my workload, but I'm having trouble
> getting very far with it.)
More information about the llvm-commits