[DeadStoreElimination] Add support for non-local DSE.
authorChad Rosier <mcrosier@codeaurora.org>
Thu, 10 Dec 2015 13:51:43 +0000 (13:51 +0000)
committerChad Rosier <mcrosier@codeaurora.org>
Thu, 10 Dec 2015 13:51:43 +0000 (13:51 +0000)
commitd4526d51db67aaa2d769b293d50e9e6cd756e232
tree809db1a6c95839de7e12ce5c3f0fb7e1a26437f7
parent1c23594d2c3887bbb714a55a51770524f7744293
[DeadStoreElimination] Add support for non-local DSE.

We extend the search for redundant stores to predecessor blocks that
unconditionally lead to the block BB with the current store instruction.  That
also includes single-block loops that unconditionally lead to BB, and
if-then-else blocks where then- and else-blocks unconditionally lead to BB.

http://reviews.llvm.org/D13363
Patch by Ivan Baev <ibaev@codeaurora.org>!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255247 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/DeadStoreElimination.cpp
test/Transforms/DeadStoreElimination/cycle.ll [new file with mode: 0644]
test/Transforms/DeadStoreElimination/ifthen.ll [new file with mode: 0644]
test/Transforms/DeadStoreElimination/ifthenelse.ll [new file with mode: 0644]
test/Transforms/DeadStoreElimination/ifthenelse2.ll [new file with mode: 0644]
test/Transforms/DeadStoreElimination/loop.ll [new file with mode: 0644]