On 23/09/2004, at 5:05 PM, Andrew Pinski wrote: > > On Sep 23, 2004, at 7:54 PM, Geoffrey Keating wrote: > >> As a precondition for other compile speed improvements, I've been >> rewriting the way that GCC represents attributes. The result is a >> medium-size patch that touches every language and many targets (a >> surprising number of targets don't define any special attributes at >> all). >> >> The basic principle is that DECL_ATTRIBUTES and TREE_ATTRIBUTES now >> point to an attribute_list: >> >> /* A structure representing 'attributes' on a DECL or TYPE node. >> Each attribute has a NAME (an IDENTIFIER_NODE) and possibly a >> VALUE. */ >> struct one_attribute GTY(()) >> { >> tree name; >> tree value; >> }; > > Shouldn't name be redefined as char* as you don't really need a full > IDENTIFIER_NODE? > Yes I know that correctly it is not but I would suspect that it would > give a good > speedup as you don't need to allocate as many trees as before. I thought of that, but I suspect it's better to go the other way: make 'name' always be the *same* IDENTIFIER_NODE for a particular kind of attribute, so you can just compare pointers. You do always have to allocate one, because 'name' will come from a token in user code.