[llvm-commits] [llvm] r60640 - /llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp
Chris Lattner
sabre at nondot.org
Sat Dec 6 16:25:15 PST 2008
Author: lattner
Date: Sat Dec 6 18:25:15 2008
New Revision: 60640
URL: http://llvm.org/viewvc/llvm-project?rev=60640&view=rev
Log:
don't bother touching volatile stores, they will just return clobber on
everything interesting anyway.
Modified:
llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp?rev=60640&r1=60639&r2=60640&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp Sat Dec 6 18:25:15 2008
@@ -90,6 +90,11 @@
// If we find a store or a free, get it's memory dependence.
if (!isa<StoreInst>(Inst) && !isa<FreeInst>(Inst))
continue;
+
+ // Don't molest volatile stores or do queries that will return "clobber".
+ if (StoreInst *SI = dyn_cast<StoreInst>(Inst))
+ if (SI->isVolatile())
+ continue;
MemDepResult InstDep = MD.getDependency(Inst);
More information about the llvm-commits
mailing list