[llvm-commits] [llvm] r121040 - /llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp
Chris Lattner
sabre at nondot.org
Mon Dec 6 13:48:10 PST 2010
Author: lattner
Date: Mon Dec 6 15:48:10 2010
New Revision: 121040
URL: http://llvm.org/viewvc/llvm-project?rev=121040&view=rev
Log:
Use a stronger predicate here, pointed out by Duncan
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=121040&r1=121039&r2=121040&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp Mon Dec 6 15:48:10 2010
@@ -277,7 +277,7 @@
if (const AllocaInst *AI = dyn_cast<AllocaInst>(V))
return !AI->isArrayAllocation();
if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(V))
- return !GV->isWeakForLinker();
+ return !GV->mayBeOverridden();
if (const Argument *A = dyn_cast<Argument>(V))
return A->hasByValAttr();
return false;
More information about the llvm-commits
mailing list