[all-commits] [llvm/llvm-project] 430512: [ObjC][ARC] Don't move a retain call living outsid...

ahatanaka via All-commits all-commits at lists.llvm.org
Tue Feb 25 13:00:34 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 430512ed7d7b5e1052fb3b671d8e54fc3afcf490
      https://github.com/llvm/llvm-project/commit/430512ed7d7b5e1052fb3b671d8e54fc3afcf490
  Author: Akira Hatanaka <ahatanaka at apple.com>
  Date:   2020-02-25 (Tue, 25 Feb 2020)

  Changed paths:
    M llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
    M llvm/test/Transforms/ObjCARC/cfg-hazards.ll

  Log Message:
  -----------
  [ObjC][ARC] Don't move a retain call living outside a loop into the loop
body

We started seeing cases where ARC optimizer would move retain calls into
loop bodies, causing imbalance in the number of retain and release
calls, after changes were made to delete inert ARC calls since the inert
calls that used to block code motion are gone.

Fix the bug by setting the CFG hazard flag when visiting a loop header.

rdar://problem/56908836




More information about the All-commits mailing list