mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-23 13:50:11 +00:00
[InstrRef] Add debug hint for not reachable blocks from entry (#77725)
Those not reachable blocks was not analyzed by LiveDebugValues and may raise out of bound access to VarLocs as case in #77441.
This commit is contained in:
parent
f892cc36fd
commit
52613396a6
@ -2403,8 +2403,15 @@ bool InstrRefBasedLDV::mlocJoin(
|
||||
llvm::sort(BlockOrders, Cmp);
|
||||
|
||||
// Skip entry block.
|
||||
if (BlockOrders.size() == 0)
|
||||
if (BlockOrders.size() == 0) {
|
||||
// FIXME: We don't use assert here to prevent instr-ref-unreachable.mir
|
||||
// failing.
|
||||
LLVM_DEBUG(if (!MBB.isEntryBlock()) dbgs()
|
||||
<< "Found not reachable block " << MBB.getFullName()
|
||||
<< " from entry which may lead out of "
|
||||
"bound access to VarLocs\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Step through all machine locations, look at each predecessor and test
|
||||
// whether we can eliminate redundant PHIs.
|
||||
|
Loading…
Reference in New Issue
Block a user