This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Allow &va_list[0] in tree-stdarg
- From: Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 20 May 2005 14:11:23 +0200 (CEST)
- Subject: Re: [PATCH] Allow &va_list[0] in tree-stdarg
On Fri, 20 May 2005, Jakub Jelinek wrote:
> On Fri, May 20, 2005 at 01:56:38PM +0200, Richard Guenther wrote:
> >
> > This patch allows &va_list[0] in tree-stdarg optimization as
> > it shows up on x86_64 with its va_list type "struct ap[1]"
> > and the C frontend modified to emit &ap[0] for ap-to-pointer
> > decay, instead of &ap. I guess this should also show up
> > with current C++ on that architecture.
> >
> > Is such change ok with you?
>
> Yes, though I can't approve it...
>
> > Would it even be correct to
> > omit the integer_zerop check for the array index? I get
>
> No, I think that check should be there. stdarg optimization
> should be as strict as possible, whenever it sees something
> it does not understand it should bail out instead of risking
> bad code generation. struct type va_list is one member array,
> so zero index should be enforced there.
>
> > some extra failures in this case on i686, namely no longer
> > thinking that for stdarg-3.c:f4() the va_list escapes.
>
> You mean even with the patch below?
No, only with the integer_zerop check removed of course.
Richard.
--
Richard Guenther <richard dot guenther at uni-tuebingen dot de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/