This is an archive of the discontinued LLVM Phabricator instance.

[AsmPrinter][DwarfDebug] Skip vars with fragments in different location kinds
ClosedPublic

Authored by fdeazeve on Sep 6 2023, 10:27 AM.

Details

Summary

The AsmPrinter currently assumes that a Debug Variable will have all of its
fragments with the same "kind" of location (i.e. all in the stack or all in
entry values). This is not enforced by the verifier, so it needs to be handled
properly. Until we do so, we conservatively drop one of the fragments.

Diff Detail

Event Timeline

fdeazeve created this revision.Sep 6 2023, 10:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 6 2023, 10:27 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
fdeazeve requested review of this revision.Sep 6 2023, 10:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 6 2023, 10:27 AM

@scott.linder This is a patch I'd like to submit in the same area where your other patches are (https://reviews.llvm.org/D158675)
I don't mind rebasing if you think they will be merged soon!

fdeazeve added a project: debug-info.
aprantl accepted this revision.Sep 6 2023, 11:09 AM
This revision is now accepted and ready to land.Sep 6 2023, 11:09 AM

@scott.linder This is a patch I'd like to submit in the same area where your other patches are (https://reviews.llvm.org/D158675)
I don't mind rebasing if you think they will be merged soon!

I'm just running some final tests on our CI, and hopefully all goes well and they land today. Otherwise, I am also happy to rebase after you!

@scott.linder This is a patch I'd like to submit in the same area where your other patches are (https://reviews.llvm.org/D158675)
I don't mind rebasing if you think they will be merged soon!

I'm just running some final tests on our CI, and hopefully all goes well and they land today. Otherwise, I am also happy to rebase after you!

Awesome! I don't mind waiting an extra day or so! :)

@scott.linder This is a patch I'd like to submit in the same area where your other patches are (https://reviews.llvm.org/D158675)
I don't mind rebasing if you think they will be merged soon!

I'm just running some final tests on our CI, and hopefully all goes well and they land today. Otherwise, I am also happy to rebase after you!

Awesome! I don't mind waiting an extra day or so! :)

Thank you for waiting, and sorry it took through the weekend; I was out unexpectedly on Friday.

I just landed the series, ending with 43331461954939032a03621998c30ac90299ad40

Hopefully there are no regressions and it sticks, in which case you should be good to rebase now!

@scott.linder This is a patch I'd like to submit in the same area where your other patches are (https://reviews.llvm.org/D158675)
I don't mind rebasing if you think they will be merged soon!

I'm just running some final tests on our CI, and hopefully all goes well and they land today. Otherwise, I am also happy to rebase after you!

Awesome! I don't mind waiting an extra day or so! :)

Thank you for waiting, and sorry it took through the weekend; I was out unexpectedly on Friday.

I just landed the series, ending with 43331461954939032a03621998c30ac90299ad40

Hopefully there are no regressions and it sticks, in which case you should be good to rebase now!

All good, thank you so much for driving this!

This revision was landed with ongoing or failed builds.Sep 12 2023, 8:09 AM
This revision was automatically updated to reflect the committed changes.

Probably worth a FIXME and a bug filed about supporting different location kinds? (like, really - we can't describe a variable as being partly in memory, and partly in a register? That doesn't sound right to me... I'd have thought we would've had support for that a while ago, but I don't follow the variable location parts of DWARF in as much detail, so maybe it is)

Probably worth a FIXME and a bug filed about supporting different location kinds? (like, really - we can't describe a variable as being partly in memory, and partly in a register? That doesn't sound right to me... I'd have thought we would've had support for that a while ago, but I don't follow the variable location parts of DWARF in as much detail, so maybe it is)

The whole support for entry-value registers being stored in the MF side-table is new, and this multi-location scenario is something I had not anticipated. We'll get there though! But I agree that a FIXME comment is worth it!