aboutsummaryrefslogtreecommitdiff
path: root/gcc/hash-table.h
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2015-06-25 17:06:44 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2015-06-25 17:06:44 +0000
commit6c907cff668b1c4bf305b1988d99acbf841f6f52 (patch)
tree2e989ada68962878a3c51638dc18cf3f243933ca /gcc/hash-table.h
parentca752f3929677221a5806daf4940367308fc16d7 (diff)
downloadgcc-6c907cff668b1c4bf305b1988d99acbf841f6f52.zip
gcc-6c907cff668b1c4bf305b1988d99acbf841f6f52.tar.gz
gcc-6c907cff668b1c4bf305b1988d99acbf841f6f52.tar.bz2
hash-traits.h (ggc_cache_hasher): Rename to...
gcc/ * hash-traits.h (ggc_cache_hasher): Rename to... (ggc_cache_remove): ...this and remove typedefs. (ggc_cache_ptr_hash): New class. * hash-table.h: Update commentary. * emit-rtl.c (const_int_hasher): Inherit from ggc_cache_ptr_hash rather than ggc_cache_hasher. (const_wide_int_hasher, reg_attr_hasher): Likewise. (const_double_hasher, const_fixed_hasher): Likewise. * function.c (insn_cache_hasher): Likewise. * trans-mem.c (tm_wrapper_hasher): Likewise. * tree.h (tree_decl_map_cache_hasher): Likewise. * tree.c (type_cache_hasher, int_cst_hasher): Likewise. (cl_option_hasher, tree_vec_map_cache_hasher): Likewise. * ubsan.c (tree_type_map_cache_hasher): Likewise. * varasm.c (tm_clone_hasher): Likewise. * config/i386/i386.c (dllimport_hasher): Likewise. * config/nvptx/nvptx.c (declared_libfunc_hasher): Likewise. (tree_hasher): Likewise. gcc/ada/ * gcc-interface/decl.c (value_annotation_hasher): Inherit from ggc_cache_ptr_hash rather than ggc_cache_hasher. * gcc-interface/utils.c (pad_type_hasher): Likewise. From-SVN: r224960
Diffstat (limited to 'gcc/hash-table.h')
-rw-r--r--gcc/hash-table.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/hash-table.h b/gcc/hash-table.h
index 3f49345..5f3dbed 100644
--- a/gcc/hash-table.h
+++ b/gcc/hash-table.h
@@ -91,7 +91,7 @@ along with GCC; see the file COPYING3. If not see
We compose this into a few steps.
1. Decide on a removal policy for values stored in the table.
- hash-traits.h provides class templates for the three most common
+ hash-traits.h provides class templates for the four most common
policies:
* typed_free_remove implements the static 'remove' member function
@@ -105,6 +105,13 @@ along with GCC; see the file COPYING3. If not see
Use this for garbage-collected data that needs to be preserved across
collections.
+ * ggc_cache_remove is like ggc_remove, except that it does not
+ mark the entries during the normal gc mark phase. Instead it
+ uses 'keep_cache_entry' (described above) to keep elements that
+ were not collected and delete those that were. Use this for
+ garbage-collected caches that should not in themselves stop
+ the data from being collected.
+
You can use these policies by simply deriving the descriptor type
from one of those class template, with the appropriate argument.