[llvm-commits] [llvm] r54144 - /llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp
Chris Lattner
clattner at apple.com
Mon Jul 28 14:57:11 PDT 2008
On Jul 28, 2008, at 1:52 PM, Owen Anderson wrote:
> Author: resistor
> Date: Mon Jul 28 15:52:42 2008
> New Revision: 54144
>
> URL: http://llvm.org/viewvc/llvm-project?rev=54144&view=rev
> Log:
> Don't remove volatile loads. Thanks to Duncan for noticing this one.
Shouldn't this check happen earlier? Why even do the dependence check
for stores that clearly can't be eliminated?
-Chris
>
>
> 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=54144&r1=54143&r2=54144&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp
> (original)
> +++ llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp Mon
> Jul 28 15:52:42 2008
> @@ -183,7 +183,7 @@
> Instruction* dep = MD.getDependency(S);
> DominatorTree& DT = getAnalysis<DominatorTree>();
>
> - if (S->getParent() == L->getParent() &&
> + if (!S->isVolatile() && S->getParent() == L->getParent() &&
> S->getPointerOperand() == L->getPointerOperand() &&
> ( dep == MemoryDependenceAnalysis::None ||
> dep == MemoryDependenceAnalysis::NonLocal ||
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list