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: [PATCH]: Trying to make list nodes smaller, but the C++ FE keepsbeating me down

On Sun, 15 May 2005, Mike Stump wrote:

On Saturday, May 14, 2005, at 08:41 PM, Daniel Berlin wrote:
It removes the TREE_TYPE field from TREE_LIST,

This is just hard. Better to not use TREE_LIST, which is a TREE, which is defined to have a type,

Stop here.

We have other trees that don't have types :)


We should be able to get rid of all of them without making htem "not-trees".

and instead retype it to be a LIST, and then fixup all the code so that it uses the hard type instead. After converting all the code, I suspect TREE_LIST could just go away entirely.

We can't easily, because it's in CALL_EXPR, and a *lot* of places expect all operands of a call expr to be a tree, including the list.
Sad, but true. This would be very hard to change, because we have recursive calls that call themselves on TREE_OPERAND (CALL_EXPR, 1) and take a tree as a parameter.

If we can't do TREE_LIST, i'm thinking of making a
struct tree_minimal that is the base for "struct tree_common", and only contains the "chain" field (IE no type or flags).

Then STATEMENT_LIST and friends could use struct tree_minimal.
We could also have an ARGUMENT_LIST that is tree_minimal and only consists of TREE_VALUE, not TREE_PURPOSE.

The second of these will require about half the work of making TREE_OPERAND (CALL_EXPR, 1) not a tree :).


struct tree_argument_list
	struct tree_minimal minimal;
	tree value;

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