[PATCH] D55348: Change the objc ARC optimizer to use the new objc.* intrinsics

Pete Cooper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 6 10:22:55 PST 2018


pete marked 2 inline comments as done.
pete added inline comments.


================
Comment at: include/llvm/Analysis/ObjCARCAnalysisUtils.h:58
+    M.getNamedValue("llvm.objc.retainAutoreleasedReturnValue") ||
     M.getNamedValue("objc_unsafeClaimAutoreleasedReturnValue") ||
+    M.getNamedValue("llvm.objc.retainBlock") ||
----------------
dexonsmith wrote:
> I'm curious why you didn't create an intrinsic for this method (or the two at the bottom).  Are they not emitted by Clang's IRGen?
Ah yeah, I found that out later that they are emitted by clang.

I only added the ones documented at https://clang.llvm.org/docs/AutomaticReferenceCounting.html#runtime-support

Its very easy to add the others though.  Can do that now if you like?


================
Comment at: lib/Analysis/ObjCARCInstKind.cpp:154
           .Case("objc_unretainedPointer", ARCInstKind::NoopCast)
           .Case("objc_retain_autorelease", ARCInstKind::FusedRetainAutorelease)
           .Case("objc_sync_enter", ARCInstKind::User)
----------------
dexonsmith wrote:
> Why is this okay to leave behind?
Same as above I believe.  These are not yet intrinsics, but could be if we want completeness here.  It would certainly make this method much simpler if they are intrinsics.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55348/new/

https://reviews.llvm.org/D55348





More information about the llvm-commits mailing list