This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] Ensure dead store elimination can mark an operand value as undefined
ClosedPublic

Authored by chrisjackson on Mar 27 2020, 8:10 AM.

Details

Summary

See Bugzilla https://bugs.llvm.org/show_bug.cgi?id=45080. Dead Store Elimination was failing to mark a value as undefined, instead producing an empty dbg.value.

This patch replaces the salvageDebugInfo() call with a salvageDebugInfoOrMarkUndef() call. If these two variants are replaced by a single function, we can eliminate the cause of this bug and prevent the same mistake in future.

Diff Detail

Event Timeline

chrisjackson created this revision.Mar 27 2020, 8:10 AM
aprantl accepted this revision.Mar 27 2020, 8:43 AM

LGTM!

This revision is now accepted and ready to land.Mar 27 2020, 8:43 AM
vsk accepted this revision.Mar 27 2020, 9:54 AM

Thanks, lgtm, +1 for the proposal to hide/delete salvageDebugInfo.