[PATCH] D92808: [ObjC][ARC] Annotate calls with attributes instead of emitting retainRV or claimRV calls in the IR

Akira Hatanaka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 9 09:15:10 PST 2020


ahatanak added inline comments.


================
Comment at: clang/lib/CodeGen/CGObjC.cpp:2328
+      CGF.CGM.getTarget().getTriple().isAArch64() &&
+      !CGF.CGM.getTarget().getTriple().isOSWindows()) {
+    auto *callBase = cast<llvm::CallBase>(value);
----------------
ahatanak wrote:
> rjmccall wrote:
> > compnerd wrote:
> > > Hmm, why the explicit check for not-Windows?
> > It would be good to explain why this is target-specific in a comment.
> I didn't really have a reason for limiting this to arm64 and non-windows OS other than I didn't want to do too many things in the initial patch. I don't think it would be hard to do this on x86-64. For windows, it looks like we'll have to emit the markers and the ARC calls before CodeGen (before WinEHPrepare) is run, but I haven't thought it through.
My understanding is that we'll have to do things differently in ARC contract on Windows, so for now, this patch disables this optimization on Windows.

Is the FIXME comment about Windows I added correct?.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92808



More information about the llvm-commits mailing list