aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/Local.cpp
diff options
context:
space:
mode:
authorOCHyams <orlando.hyams@sony.com>2022-11-15 10:52:45 +0000
committerOCHyams <orlando.hyams@sony.com>2022-11-15 11:11:57 +0000
commit0946e463e8649896654b0dd39193db76a5789e11 (patch)
tree623ae46fd11fb5d3d9627afd986d4d87e0ffaa3f /llvm/lib/Transforms/Utils/Local.cpp
parent896271dbea18be695c2322321c1112999b4ada4f (diff)
downloadllvm-0946e463e8649896654b0dd39193db76a5789e11.zip
llvm-0946e463e8649896654b0dd39193db76a5789e11.tar.gz
llvm-0946e463e8649896654b0dd39193db76a5789e11.tar.bz2
[Assignment Tracking][12/*] Account for assignment tracking in mem2reg
The Assignment Tracking debug-info feature is outlined in this RFC: https://discourse.llvm.org/t/ rfc-assignment-tracking-a-better-way-of-specifying-variable-locations-in-ir The changes for assignment tracking in mem2reg don't require much of a deviation from existing behaviour. dbg.assign intrinsics linked to an alloca are treated much in the same way as dbg.declare users of an alloca, except that we don't insert dbg.value intrinsics to describe assignments when there is already a dbg.assign intrinsic present, e.g. one linked to a store that is going to be removed. Reviewed By: jmorse Differential Revision: https://reviews.llvm.org/D133295
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/Local.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp
index bef22ff..a68d834 100644
--- a/llvm/lib/Transforms/Utils/Local.cpp
+++ b/llvm/lib/Transforms/Utils/Local.cpp
@@ -1499,7 +1499,7 @@ static bool valueCoversEntireFragment(Type *ValTy, DbgVariableIntrinsic *DII) {
/// that has an associated llvm.dbg.declare or llvm.dbg.addr intrinsic.
void llvm::ConvertDebugDeclareToDebugValue(DbgVariableIntrinsic *DII,
StoreInst *SI, DIBuilder &Builder) {
- assert(DII->isAddressOfVariable());
+ assert(DII->isAddressOfVariable() || isa<DbgAssignIntrinsic>(DII));
auto *DIVar = DII->getVariable();
assert(DIVar && "Missing variable");
auto *DIExpr = DII->getExpression();