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)
commit018dbf18c4b0c3ee0f93b2da0901ba7f8246ac4f
treef31541558a61573d7790ea9c8dd9e2a3f47626d2
parentf127a2d77fe735446f59a97e316636db33ffc52b
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

llvm-svn: 222241
llvm/lib/Transforms/Scalar/EarlyCSE.cpp
llvm/test/Transforms/EarlyCSE/basic.ll