rjmccall added a comment.

Having some sort of reliable marker here emitted after the call is currently a 
correctness condition for using the ObjC ARC autorelease optimization.  Apple's 
x86_64 ObjC runtime is constrained by ABI limitations, so we sniff for a 
particular, fairly reasonable code pattern that looks like moving the return 
value to the first argument register and then making a specific call; on other 
platforms, we look for a specific non-standard NOP.  Non-Apple runtimes that 
don't have the same ABI concerns probably ought to just use a NOP marker, but 
if that's not an option, then yeah, I guess you just need the compiler to emit 
the right register-register move, and then  make sure the runtime is sniffing 
for that.

It's possible the GNU runtime generally uses a different approach and doesn't 
need these markers at all; David Chisnall might know.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134441

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to