Sandra Loosemore - remaining CALL_EXPR related cleanups (original) (raw)
This is the mail archive of the gcc-patches@gcc.gnu.orgmailing 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] |
- From: Sandra Loosemore
- To: GCC Patches
- Cc: Steven Bosscher , Brooks Moses , Lee Millward
- Date: Thu, 15 Feb 2007 15:17:41 -0500
- Subject: remaining CALL_EXPR related cleanups
Steven brought up the issue of what needs to be done to prevent the change to the CALL_EXPR representation from turning into another half-completed restructuring project. Here's a stab at listing and prioritizing the remaining tasks I know about.One goal is to stamp out remaining uses of the list-based interfaces so that we can delete them. These are:
* CALL_EXPR_ARGS (and its helper function call_expr_arglist)
* build_call_list
* fold_build_call_list (and its helper function fold_builtin_call_list)
* fold_build_call_list_initializer
* build_nt_call_list
In addition,
- targetm.fold_builtin needs its interface changed to pass the whole CALL_EXPR instead of an arglist.
- There are places in the various front ends where arglists are being constructed and manipulated as lists that ought to be rewritten to use different data structures.
In trying to prioritize these things, we should keep in mind that we'll get the most bang for the buck in terms of memory use and performance improvements by fixing the issues that affect *all* function calls rather than specific builtins or intrinsics. So... this is what I've come up with.Most important:
Get rid of CALL_EXPR_ARGS in expand_call (calls.c). I already have a patch for this previously applied to the LTO branch; see http://gcc.gnu.org/ml/gcc-patches/2006-08/msg00368.html
Fix C and C++ front ends not to construct a temporary argument list during argument type conversion. I already have a patch for this one, too: http://gcc.gnu.org/ml/gcc-patches/2006-08/msg00443.html
* Similar changes to Java, Fortran, and Ada(?) front ends.Medium important:
Propagate de-listification of call arguments farther backwards in the C++ front end so that overload resolution works on an array instead of a TREE_LIST. This will permit getting rid of the CALL_EXPR_ARGS call in tsubst_copy_and_build (cp/pt.c), where overload resolution is happening on template expansions.
Change initial parsing of argument expressions in a call not to construct a TREE_LIST at all. Specifically, we should be able to leverage the fact that the vast majority of function calls have only a few arguments. Similar changes can probably be made in all of the front ends.
Lower importance:
Get rid of the CALL_EXPR_ARGS calls in config/frv/frv.c and config/mips/mips.c.
Fix the targetm.fold_builtin interfaces. This is used in builtins.c and affects the alpha, sparc, and xtensa back ends.
Fix uses of build_function_call_expr. Most of these are in the Fortran front end although there are a few scattered calls elsewhere.
Fix check_function_format (in c-format.c) to work off an argument array instead of a TREE_LIST representation of the arglist.
I hope this provides a good picture of where we are and what needs to be done.... and why I'm eager to move on from just getting the low-level representation change committed! ;-)-Sandra
- Follow-Ups:
- Re: remaining CALL_EXPR related cleanups
* From: Roger Sayle
- Re: remaining CALL_EXPR related cleanups
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |