[PATCH] Optimize stdarg functions (take 2)

Richard Henderson rth@redhat.com
Tue Sep 28 23:16:00 GMT 2004


On Tue, Sep 28, 2004 at 11:57:57AM -0400, Jakub Jelinek wrote:
> +  va_list_gpr_counter_name = get_identifier ("gpr");
> +  f_gpr = build_decl (FIELD_DECL, va_list_gpr_counter_name,

One more thing that I didn't notice last time.  I'm not terribly
comfortable about using the DECL_NAME of the field, rather than
the FIELD_DECL itself.  Why did you want to do it this way?

> +  /* If the backend didn't tell us the field names, there is nothing
> +     more we can do.  */
> +  if (va_list_gpr_counter_name == NULL_TREE
> +      && va_list_fpr_counter_name == NULL_TREE)

For future improvement, think about how we can handle e.g. sparc64,
which uses a plain pointer (and thus has no fields to reference) but
still could make use of knowing that a maximum of 3 registers are 
accessed.

Otherwise looks ok.



r~



More information about the Gcc-patches mailing list