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]

[PATCH] lookup_tag speedup


This patch gives 10% or more compile time speed up for real life projects
I used to measure compile time. It adds use of hash table for tags lookup.


Bootstrapped and tested on powerpc-darwin.
I did not find new dejagnu test failures.

OK to commit ?

Thanks,
-Devang

+ 2003-04-09  Devang Patel  <dpatel at apple dot com>
+       * c-decl.c (struct binding_level): Rename 'tags' to 'tags_list'.
+       New member 'tags_ht'.
+       (clear_binding_level): Add one entry for tags_ht.
+       (create_tags_ht): New function.
+       (check_for_loop_tags): New function.
+       (set_type_context_value): New function.
+       (tags_ht_eq_pointer): New function.
+       (tags_ht_hash_pointer): New functiobn.
+       (kept_level_p): Check 'tags_ht' instead of 'tags'.
+       (poplevel): Use 'tags_ht' instead of tags list.
+       (lookup_tag): Same.
+       (check_for_loop_decls): Same.
+       (pushtag): Add tag in 'tags_ht' also.
+       (gettags): Remove.
+       (storetags): Add in 'tags_ht' also.
+       (lookup_tag_reverse): Use 'tags_list' instead of 'tags'.
+       (store_parm_decls): Only use parmtags as arguments.

Attachment: lookup_tag.diff
Description: Binary data


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