[PATCH] D103000: [ObjC][ARC] Use the addresses of the ARC runtime functions instead of integer 0/1 for the operand of bundle "clang.arc.attachedcall"

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 9 11:02:19 PDT 2021


dexonsmith added inline comments.


================
Comment at: llvm/docs/LangRef.rst:2417-2419
+``@objc_unsafeClaimAutoreleasedReturnValue``) or null. A null operand indicates
+the marker instruction has to be emitted after the call but calls to the runtime
+functions don't have to be emitted since they already have been emitted. The
----------------
ahatanak wrote:
> dexonsmith wrote:
> > This "null operand" sentence seems new in LangRef, but I'm not seeing tests / code changes for it. Is this just fixing a documentation bug, or are you intending this for a different patch?
> The operand bundle argument is removed in `BundledRetainClaimRV::~BundledRetainClaimRV` when ARC contract pass is being run. That is the code change. The test cases for that change are in llvm/test/Transforms/ObjCARC (for example, contract-rv-attr.ll). The tests check that the operand bundles have null operands (`"clang.arc.attachedcall"()`).
Thanks for explaining / sorry for missing this! I had misunderstood this as an explicit operand called `null`.

Can you add a couple of examples of using the operand bundle, demonstrating the three correct uses in a code-block?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103000



More information about the llvm-commits mailing list