This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: objc_msgSend efficiency patch
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Dale Johannesen <dalej at apple dot com>
- Cc: gcc mailing list <gcc at gcc dot gnu dot org>
- Date: Mon, 21 Feb 2005 17:21:48 -0800
- Subject: Re: RFC: objc_msgSend efficiency patch
- Organization: CodeSourcery, LLC
- References: <206777C6-846E-11D9-8055-000393D76DAA@apple.com>
Dale Johannesen wrote:
+ /* Postincrements in OBJ_TYPE_REF_OBJECT don't affect the
+ value of the OBJ_TYPE_REF, so force them to be emitted
+ during subexpression evaluation rather than after the
+ OBJ_TYPE_REF. This permits objc_msgSend calls in Objective
+ C to use direct rather than indirect calls when the
+ object expression has a postincrement. */
+ r0 = gimplify_expr (&OBJ_TYPE_REF_OBJECT (*expr_p), pre_p,
NULL,
is_gimple_val, fb_rvalue);
r1 = gimplify_expr (&OBJ_TYPE_REF_EXPR (*expr_p), pre_p,
post_p,
is_gimple_val, fb_rvalue);
I think that change is unsafe. I fixed a bug a while back where the
gimplifier was unable to insert the postincrement inline; in some
circumstances, I believe it will abort if you don't pass down post_p.
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304