Add a comment.
authorDan Gohman <gohman@apple.com>
Mon, 22 Aug 2011 17:29:37 +0000 (17:29 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 22 Aug 2011 17:29:37 +0000 (17:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138243 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/ObjCARC.cpp

index 9654b1ecd306eb7550a36877d4b7310b7c73181f..652d8e010913091ede80b036890259a9ec35dd10 100644 (file)
@@ -344,6 +344,10 @@ static InstructionClass GetInstructionClass(const Value *V) {
       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))