[PATCH] D55233: Add objc_retain and objc_release intrinsics and codegen them to their runtime methods
Akira Hatanaka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 3 16:37:30 PST 2018
ahatanak added inline comments.
================
Comment at: include/llvm/IR/Intrinsics.td:324
+//
+def int_objc_retain : Intrinsic<[llvm_ptr_ty], [llvm_ptr_ty], [Returned<0>]>;
+def int_objc_release : Intrinsic<[], [llvm_ptr_ty]>;
----------------
erik.pilkington wrote:
> I think it would be good to have these for all the entry points used by the arc optimizer, even if it isn't necessary to fix r263607. I guess it doesn't make sense to block this though, but maybe add a FIXME if you agree?
Would it be possible to add a few comments that explain the motivation for these intrinsics?
Also, r294872 added attribute "returned" to some of the ObjC ARC functions, but was later reverted because of a mis-compile caused by a bug in the ARC optimizer. The ARC optimizer bug that caused the mis-compile hasn't been fixed yet, so I wonder whether it's safe to add "Returned<0>" here.
Also, are there any other properties (IntrArgMemOnly, for example) you can use here?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55233/new/
https://reviews.llvm.org/D55233
More information about the llvm-commits
mailing list