aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar/EarlyCSE.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2011-09-12 20:23:13 +0000
committerEli Friedman <eli.friedman@gmail.com>2011-09-12 20:23:13 +0000
commit2bc3d52b9ab422ee9f7e42a1a4e3b818e623a5f7 (patch)
tree399efba22c6e8847e43d3bd5f8561c8a194b6aa6 /lib/Transforms/Scalar/EarlyCSE.cpp
parenta0737950233acc271e444b270498d4986b4d2d00 (diff)
downloadexternal_llvm-2bc3d52b9ab422ee9f7e42a1a4e3b818e623a5f7.zip
external_llvm-2bc3d52b9ab422ee9f7e42a1a4e3b818e623a5f7.tar.gz
external_llvm-2bc3d52b9ab422ee9f7e42a1a4e3b818e623a5f7.tar.bz2
Change a bunch of isVolatile() checks to check for atomic load/store as well.
No tests; these changes aren't really interesting in the sense that the logic is the same for volatile and atomic. I believe this completes all of the changes necessary for the optimizer to handle loads and stores correctly. I'm going to try and come up with some additional testing, though. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139533 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/EarlyCSE.cpp')
-rw-r--r--lib/Transforms/Scalar/EarlyCSE.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/EarlyCSE.cpp b/lib/Transforms/Scalar/EarlyCSE.cpp
index 3d3f17b..022af40 100644
--- a/lib/Transforms/Scalar/EarlyCSE.cpp
+++ b/lib/Transforms/Scalar/EarlyCSE.cpp
@@ -357,7 +357,7 @@ bool EarlyCSE::processNode(DomTreeNode *Node) {
// If this is a non-volatile load, process it.
if (LoadInst *LI = dyn_cast<LoadInst>(Inst)) {
// Ignore volatile loads.
- if (LI->isVolatile()) {
+ if (!LI->isSimple()) {
LastStore = 0;
continue;
}
@@ -437,7 +437,7 @@ bool EarlyCSE::processNode(DomTreeNode *Node) {
std::pair<Value*, unsigned>(SI->getValueOperand(), CurrentGeneration));
// Remember that this was the last store we saw for DSE.
- if (!SI->isVolatile())
+ if (SI->isSimple())
LastStore = SI;
}
}