This is the mail archive of the gcc-patches@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: PATCH: cp_binding_level reorg


Devang Patel <dpatel@apple.com> writes:

> http://gcc.gnu.org/ml/gcc/2002-08/msg01198.html
> 
> As Matt pointed out in his message(above), walk_namespace_r() and
> vtable_decl_p() and list_length() dominates the cache disturbance.
> 
> I have simple fix that knocks these functions from top of the list
> as far as cache disturbance is concerned.
> 
> For a sample C++ program, it improves compile time from 5.11 seconds
> to 4.93 seconds.  However using PFE the gain is larger and it is
> (for same sample program) from 0.23 seconds to 0.16 seconds.
> 
> I have bootstrapped it successfully. I am running regression test
> now. OK to commit if everything goes fine?
...
+ 2002-08-21  Devang Patel  <dpatel@apple.com>
+       * cp/cp-tree.h: New prototype for walk_vtabls().
+       * cp/decl.c (walk_vtables_r): New function.
+       (struct cp_binding_level): Add new members, namespaces,
+       names_size and vtables.
+       (add_decl_to_level): Add decl in namespaces or vtables
+       chain, if conditions match.
+       (walk_vtables): New function.
+       (walk_namespaces_r): Travers separate namespace chain
+       for namespace decls.
+       (wrapup_globals_for_namespace): Use names_size instead
+       of list_length().
+       * cp/decl2.c (finish_file): Use walk_vtables() instead of
+       walk_globals() to walk vtable decls.
+

It looks like Jason & Mark haven't had time to look at this.

I looked through decl.c for the other the other uses of 'names'.  They
all seem to be places where namespaces & vtables aren't relevant
(mostly it seems to be looking for labels).

So, I think this is OK, please commit it.

-- 
- Geoffrey Keating <geoffk@geoffk.org>


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