summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/EarlyCSE.cpp
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2014-11-18 17:46:32 +0000
committerPhilip Reames <listmail@philipreames.com>2014-11-18 17:46:32 +0000
commit018dbf18c4b0c3ee0f93b2da0901ba7f8246ac4f (patch)
treef31541558a61573d7790ea9c8dd9e2a3f47626d2 /llvm/lib/Transforms/Scalar/EarlyCSE.cpp
parentf127a2d77fe735446f59a97e316636db33ffc52b (diff)
downloadbcm5719-llvm-018dbf18c4b0c3ee0f93b2da0901ba7f8246ac4f.tar.gz
bcm5719-llvm-018dbf18c4b0c3ee0f93b2da0901ba7f8246ac4f.zip
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
Diffstat (limited to 'llvm/lib/Transforms/Scalar/EarlyCSE.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/EarlyCSE.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/EarlyCSE.cpp b/llvm/lib/Transforms/Scalar/EarlyCSE.cpp
index 6f166b8ee7f..cd2ecad4a18 100644
--- a/llvm/lib/Transforms/Scalar/EarlyCSE.cpp
+++ b/llvm/lib/Transforms/Scalar/EarlyCSE.cpp
@@ -546,7 +546,7 @@ bool EarlyCSE::processNode(DomTreeNode *Node) {
Changed = true;
++NumDSE;
LastStore = nullptr;
- continue;
+ // fallthrough - we can exploit information about this store
}
// Okay, we just invalidated anything we knew about loaded values. Try
OpenPOWER on IntegriCloud