At -O0, prefer objc_storeStrong with a null new value to the
authorJohn McCall <rjmccall@apple.com>
Wed, 17 Oct 2012 02:28:37 +0000 (02:28 +0000)
committerJohn McCall <rjmccall@apple.com>
Wed, 17 Oct 2012 02:28:37 +0000 (02:28 +0000)
commite68b8f4dcc2b3a6ab03326ad4167f1164cae61e4
tree52ff6180b7eaa5d763de780d9a521ae5b60d631c
parent6f7206132fa567268b561608268639db5edafdcb
At -O0, prefer objc_storeStrong with a null new value to the
combination of a load+objc_release;  this is generally better
for tools that try to track why values are retained and
released.  Also use objc_storeStrong when copying a block
(again, only at -O0), which requires us to do a preliminary
store of null in order to compensate for objc_storeStrong's
assign semantics.

llvm-svn: 166085
14 files changed:
clang/lib/CodeGen/CGBlocks.cpp
clang/lib/CodeGen/CGObjC.cpp
clang/lib/CodeGen/CodeGenFunction.h
clang/test/CodeGenObjC/arc-arm.m
clang/test/CodeGenObjC/arc-blocks.m
clang/test/CodeGenObjC/arc-exceptions.m
clang/test/CodeGenObjC/arc-foreach.m
clang/test/CodeGenObjC/arc-no-runtime.m
clang/test/CodeGenObjC/arc-property.m
clang/test/CodeGenObjC/arc-related-result-type.m
clang/test/CodeGenObjC/objc-arc-container-subscripting.m
clang/test/CodeGenObjCXX/arc-exceptions.mm
clang/test/CodeGenObjCXX/arc-new-delete.mm
clang/test/CodeGenObjCXX/arc-special-member-functions.mm