This is an archive of the discontinued LLVM Phabricator instance.

LiveDebugValues: Fix another crash related to unreachable blocks
ClosedPublic

Authored by aprantl on Aug 8 2022, 5:03 PM.

Details

Summary

This is a follow-up patch to D130999. In the test, the MIR contains an unreachable MBB but the code attempts to look it up in MLocs. This patch fixes this issue by checking for the default-constructed value.

Diff Detail

Event Timeline

aprantl created this revision.Aug 8 2022, 5:03 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 8 2022, 5:03 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
aprantl requested review of this revision.Aug 8 2022, 5:03 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 8 2022, 5:03 PM
jryans accepted this revision.Aug 9 2022, 2:10 AM
jryans added a subscriber: jryans.

Thanks for the fix, looks good to me! 😄

This revision is now accepted and ready to land.Aug 9 2022, 2:10 AM
jmorse accepted this revision.Aug 9 2022, 2:44 AM

Fix and test LGTM, much appreciated.

An alternative might be to identify unreachable blocks in depthFirstVLocAndEmit's EjectBlock lambda, and not do any work for them. It might be non-trivial to identify unreachable blocks, so this fix is fine.

This revision was landed with ongoing or failed builds.Aug 9 2022, 10:36 AM
This revision was automatically updated to reflect the committed changes.