summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2011-08-22 17:29:37 +0000
committerDan Gohman <gohman@apple.com>2011-08-22 17:29:37 +0000
commit4b8e8ce37f4dd0fcc91aed5034ea8401fe2fdf41 (patch)
tree1ea756fa763ff92f85494315b897ae84dbbe99ad
parent56e1cef70546f6c8a30ad742dc7b6a9dd9e4acd2 (diff)
downloadbcm5719-llvm-4b8e8ce37f4dd0fcc91aed5034ea8401fe2fdf41.tar.gz
bcm5719-llvm-4b8e8ce37f4dd0fcc91aed5034ea8401fe2fdf41.zip
Add a comment.
llvm-svn: 138243
-rw-r--r--llvm/lib/Transforms/Scalar/ObjCARC.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/ObjCARC.cpp b/llvm/lib/Transforms/Scalar/ObjCARC.cpp
index 9654b1ecd30..652d8e01091 100644
--- a/llvm/lib/Transforms/Scalar/ObjCARC.cpp
+++ b/llvm/lib/Transforms/Scalar/ObjCARC.cpp
@@ -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))
OpenPOWER on IntegriCloud