aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorJeremy Morse <jeremy.morse@sony.com>2022-04-06 11:50:51 +0100
committerJeremy Morse <jeremy.morse@sony.com>2022-04-06 11:55:38 +0100
commitfb6596f1ecab652b5b90cf2e395d64112504c1f8 (patch)
treeb2e178b03419634acb3782d7aff857a15039cac3 /llvm/lib/CodeGen/MachineFunction.cpp
parent77c74fd877b27418171693f187b8db865567b8dc (diff)
downloadllvm-fb6596f1ecab652b5b90cf2e395d64112504c1f8.zip
llvm-fb6596f1ecab652b5b90cf2e395d64112504c1f8.tar.gz
llvm-fb6596f1ecab652b5b90cf2e395d64112504c1f8.tar.bz2
[DebugInfo][InstrRef] Avoid a crash from mixed variable location modes
Variable locations now come in two modes, instruction referencing and DBG_VALUE. At -O0 we pick DBG_VALUE to allow fast construction of variable information. Unfortunately, SelectionDAG edits the optimisation level in the presence of opt-bisect-limit, meaning different passes have different views of what variable location mode we should use. That causes assertions when they're mixed. This patch plumbs through a boolean in SelectionDAG from start to instruction emission, so that we don't rely on the current optimisation level for correctness. Differential Revision: https://reviews.llvm.org/D123033
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineFunction.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp
index c2648a3..db91088 100644
--- a/llvm/lib/CodeGen/MachineFunction.cpp
+++ b/llvm/lib/CodeGen/MachineFunction.cpp
@@ -1166,9 +1166,6 @@ void MachineFunction::finalizeDebugInstrRefs() {
MI.getOperand(1).ChangeToRegister(0, false);
};
- if (!useDebugInstrRef())
- return;
-
for (auto &MBB : *this) {
for (auto &MI : MBB) {
if (!MI.isDebugRef() || !MI.getOperand(0).isReg())