This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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 Guenther <richard dot guenther at uni-tuebingen dot de>

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]