aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR
diff options
context:
space:
mode:
authorStephen Tozer <stephen.tozer@sony.com>2025-04-02 10:08:29 +0100
committerStephen Tozer <stephen.tozer@sony.com>2025-06-04 14:54:21 +0100
commit4b42b6285a1d483d837bb6bd27693280167dfd3f (patch)
treeb087b1f7dabc747617ced58e331686a9186950e6 /llvm/lib/IR
parentb59c88835fd3f642b3c95331913e0565fb89a7b1 (diff)
downloadllvm-users/SLTozer/debug-ssa-updater.zip
llvm-users/SLTozer/debug-ssa-updater.tar.gz
llvm-users/SLTozer/debug-ssa-updater.tar.bz2
Add DebugSSAUpdater class to track debug value livenessusers/SLTozer/debug-ssa-updater
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')
-rw-r--r--llvm/lib/IR/DebugInfoMetadata.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/IR/DebugInfoMetadata.cpp b/llvm/lib/IR/DebugInfoMetadata.cpp
index 473114b..58c1195 100644
--- a/llvm/lib/IR/DebugInfoMetadata.cpp
+++ b/llvm/lib/IR/DebugInfoMetadata.cpp
@@ -63,6 +63,10 @@ DebugVariableAggregate::DebugVariableAggregate(const DbgVariableIntrinsic *DVI)
: DebugVariable(DVI->getVariable(), std::nullopt,
DVI->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)