This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] retainedTypes should not have subprograms
ClosedPublic

Authored by ellis on Oct 11 2021, 5:54 PM.

Details

Summary

After D80369, the retainedTypes in CU's should not have any
subprograms so we should not handle that case when emitting debug info.

Diff Detail

Event Timeline

ellis created this revision.Oct 11 2021, 5:54 PM
ellis updated this revision to Diff 378846.Oct 11 2021, 6:28 PM

Fix tests

ellis added a comment.Oct 12 2021, 5:46 PM

I found this while looking through the callsites to getOrCreateSubprogramDIE(). I was thinking of adding an assert to check that retainedTypes don't include SPs but it seems there are a lot of tests that do this.

ellis published this revision for review.Oct 12 2021, 5:47 PM
ellis added a project: debug-info.
Herald added a project: Restricted Project. · View Herald TranscriptOct 12 2021, 5:47 PM

This looks reasonable to me.

The call_site entries still point to the right subprograms after this patch, right?

ellis added a comment.Oct 13 2021, 9:01 AM

This looks reasonable to me.

The call_site entries still point to the right subprograms after this patch, right?

Yep, just tested a basic program.

extern int foo();
int bar() { return foo() + 1; }
djtodoro added inline comments.Oct 14 2021, 1:20 AM
llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-orr-moves.mir
75 ↗(On Diff #378846)

retainedTypes: !3 - this should be removed completely, so we do not leave any ambiguity

78 ↗(On Diff #378846)

and then remove this

ellis updated this revision to Diff 379797.Oct 14 2021, 12:06 PM

Remove empty retainedTypes: from tests.

djtodoro accepted this revision.Oct 15 2021, 12:43 AM
This revision is now accepted and ready to land.Oct 15 2021, 12:43 AM
This revision was landed with ongoing or failed builds.Oct 15 2021, 9:42 AM
This revision was automatically updated to reflect the committed changes.