Support GTY((cache)) on hash_map

Programming / Compilers / GCC - jason [138bc75d-0d04-0410-961f-82ee72b054a4] - 14 November 2017 16:02 EST

gcc/
- hash-traits.h (ggc_remove): Add ggc_maybe_mx member function. (ggc_cache_remove): Override it instead of ggc_mx.
- hash-table.h (gt_ggc_mx): Call it instead of ggc_mx. (gt_cleare_cache): Call ggc_mx instead of gt_ggc_mx.
- hash-map-traits.h (simple_hashmap_traits): Add maybe_mx member. (simple_cache_map_traits): Override maybe_mx.
- hash-map.h (hash_entry): Add ggc_maybe_mx and keep_cache_entry. (hash_map): Friend gt_cleare_cache. (gt_cleare_cache): New.
- tree.h (tree_cache_traits): New hash_map traits class. (tree_cache_map): New typedef. gcc/cp/
- decl.c (decomp_type_table): Use tree_cache_map.
- init.c (nsdmi_inst): Likewise.
- pt.c (defarg_ints): Likewise.
- cp-objcp-common.c (cp_get_debug_type): Likewise.

8bcf938222f Support GTY((cache)) on hash_map.
gcc/ChangeLog | 15 ++++++++++++
gcc/cp/ChangeLog | 8 +++++++
gcc/cp/cp-objcp-common.c | 61 ++++++++++++++++--------------------------------
gcc/cp/cp-tree.h | 1 -
gcc/cp/decl.c | 5 ++--
gcc/cp/init.c | 4 ++--
gcc/cp/pt.c | 4 ++--
gcc/hash-map-traits.h | 7 ++++++
gcc/hash-map.h | 21 ++++++++++++++++-
gcc/hash-table.h | 7 +++---
gcc/hash-traits.h | 9 ++++++-
gcc/tree.h | 7 ++++++
12 files changed, 96 insertions(+), 53 deletions(-)

Upstream: gcc.gnu.org


  • Share