[all-commits] [llvm/llvm-project] f85b9d: [ObjC][ARC] Ignore operand bundle "clang.arc.attac...

Akira Hatanaka via All-commits all-commits at lists.llvm.org
Mon Jun 28 11:02:57 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f85b9d644398767f6b5cb046f952ed7dbd7dfc7a
      https://github.com/llvm/llvm-project/commit/f85b9d644398767f6b5cb046f952ed7dbd7dfc7a
  Author: Akira Hatanaka <ahatanaka at apple.com>
  Date:   2021-06-28 (Mon, 28 Jun 2021)

  Changed paths:
    M llvm/docs/LangRef.rst
    M llvm/include/llvm/Analysis/ObjCARCUtil.h
    M llvm/lib/IR/Verifier.cpp
    M llvm/test/Transforms/ObjCARC/contract-rv-attr.ll
    M llvm/test/Verifier/operand-bundles.ll

  Log Message:
  -----------
  [ObjC][ARC] Ignore operand bundle "clang.arc.attachedcall" on a call if
the call's return type is void

Instead of trying hard to prevent global optimization passes such as
deadargelim from changing the return type to void, just ignore the
bundle if the return type is void. clang currently emits calls to
@llvm.objc.clang.arc.noop.use, which consumes the function call result,
immediately after the function call to prevent changes to the return
type, but optimization passes can delete the call to
@llvm.objc.clang.arc.noop.use if the function call doesn't return, which
enables deadargelim to change the return type.

rdar://76671438

Differential Revision: https://reviews.llvm.org/D103062




More information about the All-commits mailing list