This is an archive of the discontinued LLVM Phabricator instance.

[Assignment Tracking] Ignore zero-sized fragments
ClosedPublic

Authored by Orlando on Apr 3 2023, 4:22 AM.

Details

Summary

Such dbg.assigns will occur if you write zero-sized memcpys (see https://reviews.llvm.org/D146987#4240016). I figure this is safer to handle this in AssignmentTrackingAnalysis (back end) rather than AssignmentTrackingPass (declare-to-assign) in case it is possible to reproduce this as a result of optimisations.

Diff Detail

Event Timeline

Orlando created this revision.Apr 3 2023, 4:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 3 2023, 4:22 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
Orlando requested review of this revision.Apr 3 2023, 4:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 3 2023, 4:22 AM
jmorse accepted this revision.Apr 3 2023, 4:32 AM

LGTM, although I feel like this is the kind of thing that we should design-out of the compiler, by adding an assertion in fragment creation that you're not creating a zero sized fragment. Seems like this is a reasonable patch for now though.

This revision is now accepted and ready to land.Apr 3 2023, 4:32 AM
uabelho added a subscriber: uabelho.Apr 3 2023, 5:01 AM
This revision was automatically updated to reflect the committed changes.