[PATCH] D61808: [ObjC] Replace uses of the argument of a call to objc_autorelease with the result in MRR
Akira Hatanaka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 20 13:07:50 PDT 2019
ahatanak added a comment.
IIUC, this is what happens when there is an autorelease message send in the source code:
1. When there is an autorelease message send, clang's IRGen converts it to a call to `objc_autorelease`. This is the result of Pete's work that was committed a few months ago.
2. `objc_autorelease` calls `objc_object::autorelease`.
3. `objc_object::autorelease` calls `rootAutorelease` if `!ISA()->hasCustomRR()` is true. Otherwise, it sends an autorelease message.
4. `rootAutorelease` returns `(id)this` if `prepareOptimizedReturn(ReturnAtPlus1)` is true.
So the autorelease message isn't sent if `!ISA()->hasCustomRR()`. Doesn't that mean it is breaking the basic ObjC rules?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61808/new/
https://reviews.llvm.org/D61808
More information about the llvm-commits
mailing list