diff options
author | Stephen Tozer <stephen.tozer@sony.com> | 2025-09-16 11:22:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-16 11:22:02 +0100 |
commit | 3946c5061d708b1e7604db63e9b604cb0fce7dd6 (patch) | |
tree | 8e2582c4b942368c3a2c89cb627356482ea4fc55 /llvm/lib/IR/DebugInfoMetadata.cpp | |
parent | 3a5cc953dce0e142e935335a4cdbc5821ddf6d11 (diff) | |
download | llvm-3946c5061d708b1e7604db63e9b604cb0fce7dd6.zip llvm-3946c5061d708b1e7604db63e9b604cb0fce7dd6.tar.gz llvm-3946c5061d708b1e7604db63e9b604cb0fce7dd6.tar.bz2 |
Add DebugSSAUpdater class to track debug value liveness (#135349)
This patch adds a class that uses SSA construction, with debug values as
definitions, to determine whether and which debug values for a
particular variable are live at each point in an IR function. This will
be used by the IR reader of llvm-debuginfo-analyzer to compute variable
ranges and coverage, although it may be applicable to other debug info
IR analyses.
Diffstat (limited to 'llvm/lib/IR/DebugInfoMetadata.cpp')
-rw-r--r-- | llvm/lib/IR/DebugInfoMetadata.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/IR/DebugInfoMetadata.cpp b/llvm/lib/IR/DebugInfoMetadata.cpp index 96065ed..1ededb9e7 100644 --- a/llvm/lib/IR/DebugInfoMetadata.cpp +++ b/llvm/lib/IR/DebugInfoMetadata.cpp @@ -54,6 +54,10 @@ DebugVariable::DebugVariable(const DbgVariableRecord *DVR) Fragment(DVR->getExpression()->getFragmentInfo()), InlinedAt(DVR->getDebugLoc().getInlinedAt()) {} +DebugVariableAggregate::DebugVariableAggregate(const DbgVariableRecord *DVR) + : DebugVariable(DVR->getVariable(), std::nullopt, + DVR->getDebugLoc()->getInlinedAt()) {} + DILocation::DILocation(LLVMContext &C, StorageType Storage, unsigned Line, unsigned Column, uint64_t AtomGroup, uint8_t AtomRank, ArrayRef<Metadata *> MDs, bool ImplicitCode) |