Since people are starting to post interesting patches for 4.7, I thought it would be good to talk about bits I plan to cleanup in 4.7. Comments on other ugly things would also be welcome.
TREE_LIST related things: - TREE_VECTOR_CST_ELTS. I have a patch for this. - ASM_EXPR operands, clobbers, and labels. I've started on this. - Attributes. This looks reasonably straightforward, though updating all the attribute handlers will be tedious. Geoff Keating tackled this several years ago, but small differences of style prevented his patches from getting merged. - TYPE_VALUES of ENUMERAL_TYPEs. Again, Geoff did this conversion already; I hope to reuse some of the bits that he did. - TYPE_ARG_TYPES. The major blocker here is the C++ front-end. I don't know whether this is feasible to tackle in the 4.7 timeframe. - Moving default arguments out of TYPE_ARG_TYPES into PARM_DECLs is a prerequisite for redoing TYPE_ARG_TYPES. This is a much smaller undertaking. - Converting the last few uses of build_function_type that could not be easily replaced with build_function_type_list. This will be done with introducing build_function_type_vec or similar. I also have come to think that the current build_function_type_list interface is a mistake, but that's a discussion to have later. - Continuing to get rid of TREE_LISTs in other places, replacing them with VECs or similar. Other things: - Similarly to the work I did for s/TREE_CHAIN/DECL_CHAIN/, I'd like to replace TREE_TYPE for things like {POINTER,FUNCTION,ARRAY}_TYPE, etc. This work would be a good step towards both staticizing trees and tuplification of types. - Looking at TYPE_FIELDS usage in the compiler, there are a couple of places that didn't get DECL_CHAIN-ified due to suboptimal test coverage. Those should be fixed. - We ought to be using the VEC(stack,X) support added in 4.6 for a number of temporary VECs in the front-ends (e.g. constructing CALL_EXPRs, function types, etc.). I don't know how that will interact with any C++ usage; perhaps a template class for mostly-stack-allocated vectors is in order. Any typing issues should be resolved by using VEC_base or with C++ auto-conversion cleverness. - Hookizing INIT_CUMULATIVE_ARGS and friends. Joern's patch may be a good starting point, though depending on what we do with C++ for 4.7, moving most of the CUMULATIVE_ARGS bits out of hooks and into a separate class is probably better. Cleanups related to C++ usage is probably worth a separate discussion. Comments? Concerns? -Nathan