This is the mail archive of the gcc@gcc.gnu.org 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: Improving gcc scalability wrt _extra_ large C files


Hi Neil,

I think I understand what you want to do. The only thing I don't understand is how you plan to deal with nested lexical scopes (i.e. lexical symbol overloading). If I understand correctly, cc1plus uses a stack of lists of identifiers, each layer in the stack corresponding to a lexical scope (the binding levels). Am I correct ? If so, how do you plan to emulate or replace this stacking mecanism ?

Jacques.

Neil Booth wrote:


I really don't think we need yet more switches, and we definitely don't need more hashtables. We've already got one for identifiers, and we should use it to its fullest, particularly as it's all we need here. Why not attach 3 pointers to them like I suggest in another mail?

1) It uses less space (3 or 4 pointers less per identifier) than even
  the *current* scheme
2) It has constant time (just a pointer-derefence) name lookup.
  Actually, that's not quite true, the tag case actually is a linked-list
  traversal, where length(list) is <= 1 99.99% of the time, and I
  doubt code has ever been written where length(list) > 3).
3) We don't pile more kludges on top of others, which is becoming
  a real problem in our front ends IMO.
4) It's a simplification and it's easy to understand.

It'll be more work to do since it implements the symbol table
differently to how we currently do, but I think it's a much better
way to go.

Neil.





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