[PATCH] D142882: [Assignment Tracking][SROA] Delete dbg.assigns linked to rewritten stores
Orlando Cazalet-Hyams via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 30 03:15:33 PST 2023
Orlando created this revision.
Orlando added reviewers: jmorse, StephenTozer, jryans.
Orlando added a project: debug-info.
Herald added a subscriber: hiraditya.
Herald added a project: All.
Orlando requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
AggLoadStoreRewriter splits aggregate loads and stores into scalars (before the alloca is split up). The new stores and debug intrinsics are already wired up correctly - we just need to also delete the dbg.assign that is linked to the split to-be-deleted store too.
https://reviews.llvm.org/D142882
Files:
llvm/lib/Transforms/Scalar/SROA.cpp
llvm/test/DebugInfo/Generic/assignment-tracking/sroa/complex.ll
Index: llvm/test/DebugInfo/Generic/assignment-tracking/sroa/complex.ll
===================================================================
--- llvm/test/DebugInfo/Generic/assignment-tracking/sroa/complex.ll
+++ llvm/test/DebugInfo/Generic/assignment-tracking/sroa/complex.ll
@@ -1,4 +1,5 @@
-; RUN: opt -passes=sroa -S -o - %s | FileCheck %s
+; RUN: opt -passes=sroa -S -o - %s \
+; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg"
;
;; Based on llvm/test/DebugInfo/ARM/sroa-complex.ll
;; generated from:
Index: llvm/lib/Transforms/Scalar/SROA.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/SROA.cpp
+++ llvm/lib/Transforms/Scalar/SROA.cpp
@@ -3799,6 +3799,9 @@
getAdjustedAlignment(&SI, 0), DL, IRB);
Splitter.emitSplitOps(V->getType(), V, V->getName() + ".fca");
Visited.erase(&SI);
+ // The stores replacing SI each have markers describing fragments of the
+ // assignment so delete the assignment markers linked to SI.
+ at::deleteAssignmentMarkers(&SI);
SI.eraseFromParent();
return true;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142882.493262.patch
Type: text/x-patch
Size: 1131 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230130/ab856317/attachment.bin>
More information about the llvm-commits
mailing list