This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: objc_msgSend efficiency patch
Dale Johannesen wrote:
OK, thanks. I can look into doing this in the ObjC-specific hook,
unless you have
a better idea?
I've looked harder.
See PR19148 for details about my patch. I think the key is that you not
recursively call gimplify_expr with fb_lvalue. Since we're calling
recursively with fb_rvalue that particular case is probably OK.
But, I'm not sure that C++ would never put a postincrement in there in a
way that would screw things up. I don't think that performance of
unoptimized code in Objective-C is a worthwhile benefit in Stage 3 when
measured against the risk of wrong code in C++. So, it seems to me that
this should probably be done as a special case in the Objective-C front
end, if it makes sense there. Or, someone who knows more than I should
state definitively that the problematic case cannot appear in any
language using OBJ_TYPE_REF, and then modify the OBJ_TYPE_REF
documentation to indicate that.
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304