summaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MIRParser/MIRParser.cpp
diff options
context:
space:
mode:
authorJeremy Morse <jeremy.morse@sony.com>2023-01-20 14:14:39 +0000
committerJeremy Morse <jeremy.morse@sony.com>2023-01-20 14:47:11 +0000
commit9f8544713ad8e57fb74cbfce3fbc7fff523e549f (patch)
treede08914a5da4340ab9c48402ba16ed87d1d13dd8 /llvm/lib/CodeGen/MIRParser/MIRParser.cpp
parentbdf30603f28f5a97a63350e575e1b5cef052e7d0 (diff)
[DebugInfo] Store instr-ref mode of MachineFunction in member
Add a flag state (and a MIR key) to MachineFunctions indicating whether they contain instruction referencing debug-info or not. Whether DBG_VALUEs or DBG_INSTR_REFs are used needs to be determined by LiveDebugValues at least, and using the current optimisation level as a proxy is proving unreliable. Test updates are purely adding the flag to tests, in a couple of cases it involves separating out VarLocBasedLDV/InstrRefBasedLDV tests into separate files, as they can no longer share the same input. Differential Revision: https://reviews.llvm.org/D141387
Diffstat (limited to 'llvm/lib/CodeGen/MIRParser/MIRParser.cpp')
-rw-r--r--llvm/lib/CodeGen/MIRParser/MIRParser.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MIRParser/MIRParser.cpp b/llvm/lib/CodeGen/MIRParser/MIRParser.cpp
index f13116e169f3..a20c2bfe6c0f 100644
--- a/llvm/lib/CodeGen/MIRParser/MIRParser.cpp
+++ b/llvm/lib/CodeGen/MIRParser/MIRParser.cpp
@@ -443,6 +443,9 @@ void MIRParserImpl::setupDebugValueTracking(
MF.makeDebugValueSubstitution({Sub.SrcInst, Sub.SrcOp},
{Sub.DstInst, Sub.DstOp}, Sub.Subreg);
}
+
+ // Flag for whether we're supposed to be using DBG_INSTR_REF.
+ MF.setUseDebugInstrRef(YamlMF.UseDebugInstrRef);
}
bool