diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2011-09-12 20:23:13 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2011-09-12 20:23:13 +0000 |
commit | 7c5dc122a0287c1c6a7c3ae6b04d7e4c03d07c1d (patch) | |
tree | cc933921f860d5ed136b5b5d1852286fa4404d53 /llvm/lib/Transforms/Scalar/EarlyCSE.cpp | |
parent | 3543398bcf1687f79675d330d30b3c177edf5c06 (diff) | |
download | bcm5719-llvm-7c5dc122a0287c1c6a7c3ae6b04d7e4c03d07c1d.tar.gz bcm5719-llvm-7c5dc122a0287c1c6a7c3ae6b04d7e4c03d07c1d.zip |
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.
llvm-svn: 139533
Diffstat (limited to 'llvm/lib/Transforms/Scalar/EarlyCSE.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/EarlyCSE.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/EarlyCSE.cpp b/llvm/lib/Transforms/Scalar/EarlyCSE.cpp index 3d3f17b26fc..022af40c638 100644 --- a/llvm/lib/Transforms/Scalar/EarlyCSE.cpp +++ b/llvm/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; } } |