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: [fortran patch] Don't use TREE_LISTs for storing arguments to intrinsic functions

FX Coudert wrote:
This patch modifies the handing of intrinsic functions to not use a
TREE_LIST for storing the arguments to instead use a stack allocated
array and use the new CALL_EXPR constructors.

It might be a stupid question, but what is the benefit of this new approach? It doesn't look to me like TREE_LIST are very expensive to build, and we're duplicating information a bit by writing the number of arguments in multiple places (in the array declaration, as argument to gfc_conv_intrinsic_function_args, as argument to build_call_expr).

As Steve guessed, this is largely with the intent of bringing the Fortran front end into conformance with other front ends. You may recall the "CALL_EXPR representation changes" patch from February:

This is a follow-up to that, continuing the process of replacing the TREE_LIST-based constructors of CALL_EXPR objects with new forms that use arrays of arguments (thereby mirroring the new internal representation of the CALL_EXPR objects). In particular, it addresses the following comment that was added at the head of this file:

-/* FIXME: This function and its callers should be rewritten so that it's
-   not necessary to cons up a list to hold the arguments.  */

I've also cc'ed Sandra, in case she'd like to comment further on why this is useful, and why she added that comment. :)

- Brooks

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