Reapply [Assignment Tracking][13/*] Account for assignment tracking in SROA
authorOCHyams <orlando.hyams@sony.com>
Mon, 12 Dec 2022 09:18:59 +0000 (09:18 +0000)
committerOCHyams <orlando.hyams@sony.com>
Tue, 13 Dec 2022 12:52:45 +0000 (12:52 +0000)
commitf354716b052d19b4543617dfe3954503a6827ff8
treef9aecbe17dd29154d231382e5b84f4ba2bacc1ee
parent54e72dd4eb99b8d6012c46ecbdfbbdb457465005
Reapply [Assignment Tracking][13/*] Account for assignment tracking in SROA

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

Split dbg.assign intrinsics into fragments similarly to what SROA already does
for dbg.declares, except that there's many more intrinsics to split. The
function migrateDebugInfo generates new dbg.assigns intrinsic for each part of
a split store.

Reviewed By: jmorse

Differential Revision: https://reviews.llvm.org/D133296
15 files changed:
llvm/lib/Transforms/Scalar/SROA.cpp
llvm/test/DebugInfo/Generic/assignment-tracking/sroa/after-inlining.ll [new file with mode: 0644]
llvm/test/DebugInfo/Generic/assignment-tracking/sroa/alloca-single-slice.ll [new file with mode: 0644]
llvm/test/DebugInfo/Generic/assignment-tracking/sroa/complex.ll [new file with mode: 0644]
llvm/test/DebugInfo/Generic/assignment-tracking/sroa/frag-2.ll [new file with mode: 0644]
llvm/test/DebugInfo/Generic/assignment-tracking/sroa/frag.ll [new file with mode: 0644]
llvm/test/DebugInfo/Generic/assignment-tracking/sroa/id.ll [new file with mode: 0644]
llvm/test/DebugInfo/Generic/assignment-tracking/sroa/memcpy.ll [new file with mode: 0644]
llvm/test/DebugInfo/Generic/assignment-tracking/sroa/memmove-to-from-same-alloca.ll [new file with mode: 0644]
llvm/test/DebugInfo/Generic/assignment-tracking/sroa/rewrite.ll [new file with mode: 0644]
llvm/test/DebugInfo/Generic/assignment-tracking/sroa/store.ll [new file with mode: 0644]
llvm/test/DebugInfo/Generic/assignment-tracking/sroa/unspecified-var-size.ll [new file with mode: 0644]
llvm/test/DebugInfo/Generic/assignment-tracking/sroa/user-memcpy.ll [new file with mode: 0644]
llvm/test/DebugInfo/Generic/assignment-tracking/sroa/vec-1.ll [new file with mode: 0644]
llvm/test/DebugInfo/Generic/assignment-tracking/sroa/vec-2.ll [new file with mode: 0644]