[SROA] Reuse existing lifetime markers if possible
authorJohannes Doerfert <jdoerfert@anl.gov>
Sun, 13 Oct 2019 02:21:23 +0000 (02:21 +0000)
committerJohannes Doerfert <jdoerfert@anl.gov>
Sun, 13 Oct 2019 02:21:23 +0000 (02:21 +0000)
commitde0069a2f4de1cf92e309a0b42364848eecde582
tree16cc46fc15ff3e56466eb3e1616681aba32fd840
parent2d490be5712592db3cf4005a680f2cdb897bb6f3
[SROA] Reuse existing lifetime markers if possible

Summary:
If the underlying alloca did not change, we do not necessarily need new
lifetime markers. This patch adds a check and reuses the old ones if
possible.

Reviewers: reames, ssarda, t.p.northover, hfinkel

Subscribers: hiraditya, bollu, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68900

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374692 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/SROA.cpp
test/Transforms/SROA/reuse_lifetime_markers.ll [new file with mode: 0644]