[llvm-commits] [llvm] r138243 - /llvm/trunk/lib/Transforms/Scalar/ObjCARC.cpp
Dan Gohman
gohman at apple.com
Mon Aug 22 10:29:38 PDT 2011
Author: djg
Date: Mon Aug 22 12:29:37 2011
New Revision: 138243
URL: http://llvm.org/viewvc/llvm-project?rev=138243&view=rev
Log:
Add a comment.
Modified:
llvm/trunk/lib/Transforms/Scalar/ObjCARC.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/ObjCARC.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/ObjCARC.cpp?rev=138243&r1=138242&r2=138243&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/ObjCARC.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/ObjCARC.cpp Mon Aug 22 12:29:37 2011
@@ -344,6 +344,10 @@
break;
default:
// For anything else, check all the operands.
+ // Note that this includes both operands of a Store: while the first
+ // operand isn't actually being dereferenced, it is being stored to
+ // memory where we can no longer track who might read it and dereference
+ // it, so we have to consider it potentially used.
for (User::const_op_iterator OI = I->op_begin(), OE = I->op_end();
OI != OE; ++OI)
if (IsPotentialUse(*OI))
More information about the llvm-commits
mailing list