[all-commits] [llvm/llvm-project] 810148: [ObjCARC][Contract] Optimize bundled RetainRV to C...

Marina Taylor via All-commits all-commits at lists.llvm.org
Tue May 13 11:25:49 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 810148cb0769f61f8afebdaf27a9c1af95de27aa
      https://github.com/llvm/llvm-project/commit/810148cb0769f61f8afebdaf27a9c1af95de27aa
  Author: Marina Taylor <marina_taylor at apple.com>
  Date:   2025-05-13 (Tue, 13 May 2025)

  Changed paths:
    M llvm/lib/Transforms/ObjCARC/ARCRuntimeEntryPoints.h
    M llvm/lib/Transforms/ObjCARC/ObjCARC.cpp
    M llvm/lib/Transforms/ObjCARC/ObjCARC.h
    M llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp
    M llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
    A llvm/test/Transforms/ObjCARC/contract-attached-call-retain-to-claim.ll

  Log Message:
  -----------
  [ObjCARC][Contract] Optimize bundled RetainRV to ClaimRV (#139762)

This teaches ObjCARCContract to transform attachedcall bundles
referencing objc_retainAutoreleasedReturnValue to instead reference
objc_claimAutoreleasedReturnValue.

The only distinction between the two is that the latter is required to
be guaranteed to immediately follow the call it's attached to, and, by
construction, the bundles always achieve that by:
- not being separable from the call through IR and the backend
- not getting the marker emitted when claimARV is the attachedcall.

This is enabled only for arm64, arm64e, and arm64_32 on macOS13/iOS16
and related operating systems.

Co-authored-by: Ahmed Bougacha <ahmed at bougacha.org>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list