This is an archive of the discontinued LLVM Phabricator instance.

[Assignment Tracking][SelectionDAG] Downgrade dbg.assigns to dbg.values if assignment tracking is not enabled
ClosedPublic

Authored by Orlando on Apr 13 2023, 3:37 AM.

Details

Summary

We shouldn't be able to reach this code path from source code but this provides a better fail-safe than asserting. The result of the downgrade is a degraded debugging experience, but it is better than nothing.

Diff Detail

Event Timeline

Orlando created this revision.Apr 13 2023, 3:37 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 13 2023, 3:37 AM
Orlando requested review of this revision.Apr 13 2023, 3:37 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 13 2023, 3:37 AM
jmorse requested changes to this revision.Apr 13 2023, 3:56 AM

The test wants a triple, plus I have a question about the checks.

llvm/test/DebugInfo/assignment-tracking/X86/assignment-tracking-not-enabled.ll
2–3

I think the triple needs to present on the command line or in the ll file, otherwise we'll hit buildbots that support x86 but where it isn't the default triple, and we'll get different output.

5–7

What would the debug-info output look like with AT, and do we need to CHECK-NOT it?

This revision now requires changes to proceed.Apr 13 2023, 3:56 AM
Orlando added inline comments.Apr 13 2023, 3:59 AM
llvm/test/DebugInfo/assignment-tracking/X86/assignment-tracking-not-enabled.ll
2–3

Good spot, thanks.

5–7

The variable would be stuffed into the side-table since it is always stack-homed. I will add some CHECK-NOTs for that.

Orlando updated this revision to Diff 514541.Apr 18 2023, 12:39 AM
Orlando marked 2 inline comments as done.

+ Address review comments

jmorse accepted this revision.Apr 18 2023, 4:38 AM

LGTM

This revision is now accepted and ready to land.Apr 18 2023, 4:38 AM
This revision was landed with ongoing or failed builds.Apr 18 2023, 5:04 AM
This revision was automatically updated to reflect the committed changes.