[PATCH] D103062: [ObjC][ARC] Ignore operand bundle "clang.arc.attachedcall" on a call if the call's return type is void
Akira Hatanaka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 24 19:55:01 PDT 2021
ahatanak created this revision.
ahatanak added a reviewer: fhahn.
ahatanak added a project: LLVM.
Herald added subscribers: dexonsmith, hiraditya.
ahatanak requested review of this revision.
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
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D103062
Files:
llvm/include/llvm/Analysis/ObjCARCUtil.h
llvm/lib/IR/Verifier.cpp
llvm/test/Transforms/ObjCARC/contract-rv-attr.ll
llvm/test/Verifier/operand-bundles.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103062.347552.patch
Type: text/x-patch
Size: 4207 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210525/384e61b9/attachment.bin>
More information about the llvm-commits
mailing list