This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Move DebugLoc Copy into CompressInstEmitter
ClosedPublic

Authored by lenary on Sep 12 2019, 4:54 AM.

Details

Summary

This copy ensures that debug location information is kept for
compressed instructions. There are places where both compressInstruction and
uncompressInstruction are called that were not doing this copy, discarding some
debug info.

This change merely moves the copy into the generated file, so you cannot forget
to copy the location over when compressing or uncompressing.

Diff Detail

Event Timeline

lenary created this revision.Sep 12 2019, 4:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 12 2019, 4:54 AM
lenary updated this revision to Diff 219888.Sep 12 2019, 4:57 AM
  • Update Location Copy Code
luismarques requested changes to this revision.Sep 22 2019, 8:29 AM

You could add a test that shows the change; no debug loc before, and debug loc after the patch.

This revision now requires changes to proceed.Sep 22 2019, 8:29 AM
lenary updated this revision to Diff 232875.Dec 9 2019, 9:26 AM

Rebased and added a test to ensure debug info is preserved.

The test doesn't actually fail without this patch, but this ensures it won't
fail in future.

This revision is now accepted and ready to land.Dec 11 2019, 5:25 AM
This revision was automatically updated to reflect the committed changes.