[Assignment Tracking] Ignore zero-sized fragments
authorOCHyams <orlando.hyams@sony.com>
Wed, 5 Apr 2023 08:28:15 +0000 (09:28 +0100)
committerOCHyams <orlando.hyams@sony.com>
Wed, 5 Apr 2023 08:31:23 +0000 (09:31 +0100)
commit93c194fc9f40636d99b2d66a22abb1442c720451
tree9fdbafe8c0338c4946a5c2b3dfc0ef0c30b8f7b4
parent4639653492a107e5c3e993ef1e4106da5f6f14eb
[Assignment Tracking] Ignore zero-sized fragments

Such dbg.assigns will occur if you write zero-sized memcpys (see
https://reviews.llvm.org/D146987#4240016).

Handle this in AssignmentTrackingAnalysis (back end) rather than
AssignmentTrackingPass (declare-to-assign) in case it is possible to reproduce
this as a result of optimisations.

Reviewed By: jmorse

Differential Revision: https://reviews.llvm.org/D147435
llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
llvm/test/DebugInfo/assignment-tracking/X86/frag-size-zero.ll [new file with mode: 0644]