ahatanak marked an inline comment as done.
ahatanak added inline comments.

================
Comment at: lib/CodeGen/CGObjC.cpp:2611
+  if (!CGM.getCodeGenOpts().ObjCNoBuiltinRetainRelease && !getInvokeDest())
+    return EmitARCRetainAutoreleasedReturnValue(value, returnType);
   return emitObjCValueOperation(
----------------
rjmccall wrote:
> Same question: won't this make it significantly more difficult to detect when 
> we're generating bad code?  And the overhead here (on every retain in MRC!) 
> is pretty significant; shouldn't this at least be restricted to situations 
> where it's plausible that it might be reclaiming something, like when the 
> receiver expression is a function call of some sort?
As I mentioned in my response to David's question, I was thinking the ARC 
optimizer would be able to convert an `objc_retainAutoreleasedReturnValue` call 
to an `objc_retain` call. However, after reading your comment in 
https://reviews.llvm.org/D61970, I don't think it's okay to use the ARC 
optimizer to transform code that was compiled in MRR mode.


Repository:
  rC Clang

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

https://reviews.llvm.org/D61970



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

Reply via email to