[Assignment Tracking][20/*] Account for assignment tracking in DSE
authorOCHyams <orlando.hyams@sony.com>
Tue, 15 Nov 2022 13:38:03 +0000 (13:38 +0000)
committerOCHyams <orlando.hyams@sony.com>
Tue, 15 Nov 2022 13:42:56 +0000 (13:42 +0000)
commitbfa7f6241251589b0c8ba8d203347cf63a8dc298
treeb6520ef82033858cdf34e56d78e1f7b2e24305b0
parent376d0469b917a889139f23e199a5d52c87c7a5bb
[Assignment Tracking][20/*] Account for assignment tracking in DSE

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

DeadStoreElimmination shortens stores that are shadowed by later stores such
that the overlapping part of the earlier store is omitted. Insert an unlinked
dbg.assign intrinsic with a variable fragment that describes the omitted part
to signal that that fragment of the variable has a stale value in memory.

Reviewed By: jmorse

Differential Revision: https://reviews.llvm.org/D133315
llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
llvm/test/DebugInfo/Generic/assignment-tracking/dse/dse-after-memcpyopt-merge.ll [new file with mode: 0644]
llvm/test/DebugInfo/Generic/assignment-tracking/dse/shorten.ll [new file with mode: 0644]