[PATCH] D70370: llvm/ObjCARC: Eliminate inlined AutoreleaseRV calls

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 17 20:00:04 PST 2019


dexonsmith created this revision.
dexonsmith added reviewers: ahatanak, rjmccall.
Herald added subscribers: ributzka, hiraditya.
Herald added a project: LLVM.

Pair up inlined AutoreleaseRV calls with their matching RetainRV or
ClaimRV.

- For RetainRV, delete both instructions.
- For ClaimRV, replace with a normal Release and then run the usual optimizations.

This avoids problems where more aggressive inlining triggers memory
regressions.


https://reviews.llvm.org/D70370

Files:
  llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
  llvm/test/Transforms/ObjCARC/inlined-autorelease-return-value.ll
  llvm/test/Transforms/ObjCARC/unsafe-claim-rv.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70370.229740.patch
Type: text/x-patch
Size: 12424 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191118/862bd245/attachment.bin>


More information about the llvm-commits mailing list