[PATCH] D92808: [ObjC][ARC] Use operand bundle 'clang.arc.attachedcall' instead of explicitly emitting retainRV or claimRV calls in the IR

Akira Hatanaka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 11 20:58:23 PST 2021


ahatanak updated this revision to Diff 323218.
ahatanak retitled this revision from "[ObjC][ARC] Use operand bundle 'clang.arc.rv' instead of explicitly emitting retainRV or claimRV calls in the IR" to "[ObjC][ARC] Use operand bundle 'clang.arc.attachedcall' instead of explicitly emitting retainRV or claimRV calls in the IR".
ahatanak edited the summary of this revision.
ahatanak added a comment.

- Renamed the operand bundle name to `clang.arc.attachedcall`. I also tried to pass the address of the ARC function as the argument, but the verifier doesn't allow taking addresses of intrinsics.

- Removed the call to `@llvm.objc.clang.arc.noop.use`, which in some cases was preventing the inliner to attach the operand bundle to a call in the callee function, when the operand bundle is removed from a call (see `BundledRetainClaimRVs::eraseInst`).

- Make sure `emitOptimizedARCReturnCall` doesn't drop any existing operand bundle on a call when adding the new operand bundle to the call.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92808

Files:
  clang/lib/CodeGen/CGObjC.cpp
  clang/lib/CodeGen/CodeGenFunction.h
  clang/lib/CodeGen/CodeGenModule.cpp
  clang/lib/CodeGen/CodeGenModule.h
  clang/test/CodeGenObjC/arc-rv-attr.m
  clang/test/CodeGenObjC/arc-unsafeclaim.m
  llvm/docs/LangRef.rst
  llvm/include/llvm/Analysis/ObjCARCUtil.h
  llvm/include/llvm/IR/InstrTypes.h
  llvm/include/llvm/IR/Intrinsics.td
  llvm/include/llvm/IR/LLVMContext.h
  llvm/lib/Analysis/ObjCARCInstKind.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  llvm/lib/IR/AutoUpgrade.cpp
  llvm/lib/IR/Instructions.cpp
  llvm/lib/IR/LLVMContext.cpp
  llvm/lib/IR/Verifier.cpp
  llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  llvm/lib/Transforms/ObjCARC/ARCRuntimeEntryPoints.h
  llvm/lib/Transforms/ObjCARC/ObjCARC.cpp
  llvm/lib/Transforms/ObjCARC/ObjCARC.h
  llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp
  llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
  llvm/lib/Transforms/ObjCARC/PtrState.cpp
  llvm/lib/Transforms/ObjCARC/PtrState.h
  llvm/lib/Transforms/Scalar/SCCP.cpp
  llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp
  llvm/lib/Transforms/Utils/InlineFunction.cpp
  llvm/test/Bitcode/operand-bundles-bc-analyzer.ll
  llvm/test/CodeGen/AArch64/call-rv-marker.ll
  llvm/test/Transforms/DeadArgElim/deadretval.ll
  llvm/test/Transforms/Inline/inline-retainRV-call.ll
  llvm/test/Transforms/ObjCARC/contract-marker-funclet.ll
  llvm/test/Transforms/ObjCARC/contract-rv-attr.ll
  llvm/test/Transforms/ObjCARC/contract.ll
  llvm/test/Transforms/ObjCARC/intrinsic-use.ll
  llvm/test/Transforms/ObjCARC/rv.ll
  llvm/test/Transforms/SCCP/clang-arc-rv.ll
  llvm/test/Transforms/TailCallElim/deopt-bundle.ll
  llvm/test/Verifier/operand-bundles.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92808.323218.patch
Type: text/x-patch
Size: 83723 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210212/48f96acb/attachment-0001.bin>


More information about the cfe-commits mailing list