This is the mail archive of the gcc-patches@gcc.gnu.org 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] Optimize stdarg functions


On Mon, Sep 27, 2004 at 06:50:32PM -0400, Jakub Jelinek wrote:
> 	* config/i386/i386.c (ix86_build_builtin_va_list): Initialize
> 	va_list_{g,f}pr_counter_name.
> 	(ix86_setup_incoming_varargs): Don't do anything if reg_save
> 	area will not be used.  Only save registers that tree-stdarg.c
> 	detected they need saving.

I think that you should do either

  (1) Ignore va_list_[fg]pr_size if va_list_escapes is true
  (2) Remove va_list_escapes and set va_list_[fg]pr_size to UINT_MAX.

as it is, it seems like we've got redundant data, and it isn't clear
when to use which.

> +	  va_start_bb = bb;

You're not properly handling more than one va_start per function.

The escape analysis and [fg]pr counting code is kinda messy.  Can
you split that out into more functions?


r~


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