[PATCH] D94597: [X86] Lower calls with clang.arc.attachedcall bundle

Ahmed Bougacha via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 17 13:33:49 PDT 2021


ab added a comment.

Can you (or @ahatanak) explain why/how this needs to be different from aarch64?  In particular I don't think I understand why you need to emit the retainARV/claimARV calls this late, that seems like quite a drastic difference in behavior for the bundle.
I read through the discussion in D92808 <https://reviews.llvm.org/D92808> but it sounds like that predates the x86_64-specific behavior, right?  But skimming around the various passes involved I'm not actually sure who emits the retainARV/claimARV calls on aarch64.



================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:4400
+  } else if (CLI.CB && objcarc::hasAttachedCallOpBundle(CLI.CB)) {
+    // Calls with a "clang.arc.rv" bundle are special. They should be expanded
+    // to the call, directly followed by a special marker sequence and a call to
----------------
`clang.arc.rv` -> `clang.arc.attachedcall`, right?  same below


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:4408
+    // target.
+    unsigned Sel = objcarc::hasAttachedCallOpBundle(CLI.CB, true) ? 0 : 1;
+    Ops.insert(Ops.begin() + 1, DAG.getTargetConstant(Sel, dl, MVT::i32));
----------------
`Sel` is a bit confusing, especially in an objc context ;)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94597



More information about the llvm-commits mailing list