aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2024-01-11 18:24:21 +0000
committerDimitry Andric <dim@FreeBSD.org>2024-01-11 18:24:21 +0000
commit950076cd18f3fa9d789b4add9d405898efff09a5 (patch)
tree2454649366290c6292cc2d94dde042f71bc1e144 /llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
parentaca2e42c67292825f835f094eb0c4df5ce6013db (diff)
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
index 9037f752dc4f..cfc8c28b99e5 100644
--- a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
+++ b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
@@ -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.