Fix LDV InstrRefBasedImpl to not crash when encountering unreachable MBBs.
authorAdrian Prantl <aprantl@apple.com>
Tue, 2 Aug 2022 17:27:45 +0000 (10:27 -0700)
committerAdrian Prantl <aprantl@apple.com>
Wed, 3 Aug 2022 20:05:05 +0000 (13:05 -0700)
commit905f2d1ecbcb5c390fbbbc5218be76a654b55cbb
tree0b23469f27c74914d4f393d76b0ce304d6d6bd65
parentc5ccb78ade8136134e0ca9dde64de97f913f0f8c
Fix LDV InstrRefBasedImpl to not crash when encountering unreachable MBBs.

The testcase was delta-reduced from an LTO build with sanitizer
coverage and the MIR tail duplication pass caused a machine basic
block to become unreachable in MIR. This caused the MBB to be invisible
to the reverse post-order traversal used to initialize the MBB <->
RPONumber lookup tables.

rdar://97226240

Differential Revision: https://reviews.llvm.org/D130999
llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
llvm/test/DebugInfo/MIR/X86/ldv_unreachable_blocks.mir [new file with mode: 0644]