[all-commits] [llvm/llvm-project] 643ce6: [ObjC][ARC] Don't form a StoreStrong call if it is...

Akira Hatanaka via All-commits all-commits at lists.llvm.org
Wed Aug 11 13:51:18 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 643ce61fb3c2c730b7ecead4a489eaeef3f053ea
      https://github.com/llvm/llvm-project/commit/643ce61fb3c2c730b7ecead4a489eaeef3f053ea
  Author: Akira Hatanaka <ahatanaka at apple.com>
  Date:   2021-08-11 (Wed, 11 Aug 2021)

  Changed paths:
    M llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp
    M llvm/test/Transforms/ObjCARC/contract-storestrong.ll

  Log Message:
  -----------
  [ObjC][ARC] Don't form a StoreStrong call if it is unsafe to move the
release call

findSafeStoreForStoreStrongContraction checks whether it's safe to move
the release call to the store by inspecting all instructions between the
two, but was ignoring retain instructions. This was causing objects to
be released and deallocated before they were retained.

rdar://81668577




More information about the All-commits mailing list