Tweak EarlyCSE to recognize series of dead stores
authorPhilip Reames <listmail@philipreames.com>
Tue, 18 Nov 2014 17:46:32 +0000 (17:46 +0000)
committerPhilip Reames <listmail@philipreames.com>
Tue, 18 Nov 2014 17:46:32 +0000 (17:46 +0000)
commit0814bd85dddc576621a903b78301463fb22c8c0b
treef1bc7a5e0665b4a13c02abe5d984166b980969a7
parent086dc8a607e8bfbf0b2484545bfb0b880d966623
Tweak EarlyCSE to recognize series of dead stores

EarlyCSE is giving up on the current instruction immediately when it recognizes that the current instruction makes a previous store trivially dead. There's no reason to do this. Once the previous store has been deleted, it's perfectly legal to remember the value of the current store (for value forwarding) and the fact the store occurred (it could be dead too!).

Reviewed by: Hal
Differential Revision: http://reviews.llvm.org/D6301

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