[DSE] Enable removal of lifetime intrinsics in terminating blocks
authorBjorn Steinbrink <bsteinbr@gmail.com>
Thu, 20 Aug 2015 08:25:28 +0000 (08:25 +0000)
committerBjorn Steinbrink <bsteinbr@gmail.com>
Thu, 20 Aug 2015 08:25:28 +0000 (08:25 +0000)
commit1ca4f6f1ca7273746dc955fbac8a53130097be4c
treee0ab1d4afc1d0ce3d45258ff4573bdd051b7b57e
parentcce9e53d026f77ade0763beed0656fb35c3fdc0e
[DSE] Enable removal of lifetime intrinsics in terminating blocks

Usually DSE is not supposed to remove lifetime intrinsics, but it's
actually ok to remove them for dead objects in terminating blocks,
because they convey no extra information there. Until we hit a lifetime
start that cannot be removed, that is. Because from that point on the
lifetime intrinsics become interesting again, e.g. for stack coloring.

Reviewers: reames

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D11710

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245542 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/DeadStoreElimination.cpp
test/Transforms/DeadStoreElimination/lifetime.ll