[Assignment Tracking][15/*] Account for assignment tracking in simplifycfg
authorOCHyams <orlando.hyams@sony.com>
Fri, 18 Nov 2022 10:07:30 +0000 (10:07 +0000)
committerOCHyams <orlando.hyams@sony.com>
Fri, 18 Nov 2022 10:15:55 +0000 (10:15 +0000)
commit86464ed3df9b0f2f787629b54baa2262395e7784
tree5647a3ba2d00f434ee46e6e91eb02a49e5591b6e
parentd473dac3d63f7b54dd29f9c3e8077267457a4254
[Assignment Tracking][15/*] Account for assignment tracking in simplifycfg

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

Update simplifycfg:
sinkLastInstruction - preserve debug use-before-defs.

SpeculativelyExecuteBB - replace the value component of dbg.assign intrinsics
when stores are hoisted and merged using a select, and don't delete them.

Reviewed By: jmorse

Differential Revision: https://reviews.llvm.org/D133310
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
llvm/test/DebugInfo/Generic/assignment-tracking/simplifycfg/empty-block.ll [new file with mode: 0644]
llvm/test/DebugInfo/Generic/assignment-tracking/simplifycfg/speculated-store.ll [new file with mode: 0644]