This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: [jbaron@redhat.com: [PATCH 0/3] tracepoints: delay argument evaluation]
- From: Jason Baron <jbaron at redhat dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Wed, 20 May 2009 11:16:43 -0400
- Subject: Re: [jbaron@redhat.com: [PATCH 0/3] tracepoints: delay argument evaluation]
- References: <20090520135631.GA3081@redhat.com> <m33aaz502h.fsf@google.com>
On Wed, May 20, 2009 at 07:19:18AM -0700, Ian Lance Taylor wrote:
> The short answer is no, there are no such compiler options. From the
> compiler's perspective, ptr->arg1 is evaluated before the function call,
> so even the fact that the arguments are only used in an unlikely branch
> isn't going to help. What you want is for the compiler to sink the load
> into the only place where the result of the load is used. That seems
> like a reasonable optimization, at least when the result is only used in
> an unlikely branch. I recommend that you open a enhancement request at
> http://gcc.gnu.org/bugzilla with a complete standalone test case.
>
> Ian
hi,
I've filed bug #40207 asking for this enhancement.
thanks,
-Jason