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

John McCall via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 19 08:15:29 PST 2019


rjmccall added a comment.

The existence of *any* significant intervening code here indicates that either the optimizer moved it there (which is problematic but unfortunately possible with this representation) or that the caller+callee weren't actually paired and the optimization wouldn't have succeeded dynamically.  Now, the ARC spec gives us some flexibility to try to avoid the autorelease anyway in the latter case; that does not actually have to be conditioned on seeing a retainARV/unsafeClaimARV, because ARC just says that it will ensure that the value is still valid when the caller gets it and that the caller shouldn't assume that the value is in the autorelease pool.  But it's definitely odder territory.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70370/new/

https://reviews.llvm.org/D70370





More information about the llvm-commits mailing list