This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo][SelectionDAG] Do not drop dbg intrinsics with empty metadata locs
ClosedPublic

Authored by Orlando on May 17 2023, 3:53 AM.

Details

Summary

Without this patch SelectionDAG silently drops dbg.values using !{} operands.

Related to https://discourse.llvm.org/t/auto-undef-debug-uses-of-a-deleted-value

This causes assignment-tracking to behaviour to match non-assignment-tracking behaviour after a recent change (see D140990).

Diff Detail

Event Timeline

Orlando created this revision.May 17 2023, 3:53 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 17 2023, 3:53 AM
Orlando requested review of this revision.May 17 2023, 3:53 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 17 2023, 3:53 AM
jmorse accepted this revision.May 17 2023, 4:01 AM

LGTM, what's the behaviour with AT at the moment, they're just ignored?

This revision is now accepted and ready to land.May 17 2023, 4:01 AM
Orlando added a comment.EditedMay 17 2023, 4:11 AM

Thanks. Yep they are dropped, causing locations terminated by the dbg.value to no longer be terminated; incorrectly extending coverage of the preceding variable location. (EDIT: That's the behaviour without this patch, to be clear).