This is an archive of the discontinued LLVM Phabricator instance.

[Assignment Tracking][SelectionDAG] Fix dereferencing nullptr location from dbg.declare
ClosedPublic

Authored by Orlando on Apr 13 2023, 2:04 AM.

Details

Summary

Debug intrinsics sometimes end up with empty metadata location operands. The debug intrinsic interfaces return nullptr when retrieving location operand in this case.

When assignment tracking is not enabled a dbg.declare with a nullptr location operand is skipped. Do the same when assignment tracking is enabled (a nullptr address component of a dbg.assign is already handled correctly.

N.B. my "empty metadata is the same as poison" patch stack (D140902) hasn't landed yet as I'm focussing on assignment tracking for now.

Diff Detail

Event Timeline

Orlando created this revision.Apr 13 2023, 2:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 13 2023, 2:04 AM
Orlando requested review of this revision.Apr 13 2023, 2:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 13 2023, 2:04 AM
jmorse accepted this revision.Apr 13 2023, 3:51 AM

LGTM

This revision is now accepted and ready to land.Apr 13 2023, 3:51 AM