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


Jacques THOMAS <jthomas at cs dot purdue dot edu> writes:

...
> For the moment, I am focused on lookup_tag, as I can modify the code
> generator in order to use less anonymous tags and minimize the
> importance of clear_anon_tags's behavior.
>
> My idea for improving lookup_tag is to use one hash table per binding
> level, with entries pointing to the tags of the binding level. To do
> that I would modify push_tag so that it does insert the symbol in the
> hash table at the same time that it does insert it in the linked
> list. lookup_tag could then use this hash table to do faster lookups.

This sounds like a sane approach.  It's possible that you won't need
the linked list anymore if you make that change.

Another possible approach is to invert the lookup.  Make the
IDENTIFIER_NODE point to its binding contour, and then have lookup_tag
check that that's the one we want.  (handwaving wildly not having
actually looked at the code).

zw


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