This is an archive of the discontinued LLVM Phabricator instance.

[DWARF][FIX] Handle the use of multiple registers gracefully
ClosedPublic

Authored by jdoerfert on Apr 13 2022, 12:50 PM.

Details

Summary

Certain applications crashed for us with the AMDGPU backend. While this
is not a proper fix it allows us to compile the code for now. I left a
TODO for someone that understands DWARF.

I used a reproducer that has way too much debug info but I am unsure how
to get rid of it reasonably.

Diff Detail

Event Timeline

jdoerfert created this revision.Apr 13 2022, 12:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 13 2022, 12:50 PM
jdoerfert requested review of this revision.Apr 13 2022, 12:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 13 2022, 12:50 PM
Herald added subscribers: sstefan1, wdng. · View Herald Transcript
arsenm added inline comments.
llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
335

Maybe add a debug print?

arsenm added inline comments.Apr 13 2022, 1:07 PM
llvm/test/CodeGen/AMDGPU/dwarf-multi-register-use-crash.ll
2

Should specify an -mcpu. Is it worth checking binary output too (maybe if this actually was handled?)

109

Can you try to cut this down some?

jdoerfert updated this revision to Diff 422943.Apr 14 2022, 1:02 PM
jdoerfert marked an inline comment as done.

Address comments

arsenm accepted this revision.Apr 14 2022, 6:16 PM
arsenm added inline comments.
llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
337

Missing newline

This revision is now accepted and ready to land.Apr 14 2022, 6:16 PM
This revision was landed with ongoing or failed builds.Apr 15 2022, 11:44 AM
This revision was automatically updated to reflect the committed changes.