diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2015-06-25 17:16:51 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2015-06-25 17:16:51 +0000 |
commit | 9654754bd9ab263c3d2a6e04bbd1a4dc36f9f280 (patch) | |
tree | 6728b4fcfe1d6d91859b5129fff9d1b8b4a755c0 /gcc/ipa-icf.h | |
parent | e0702244b8e0fa5555e20b5554545bab9d06927f (diff) | |
download | gcc-9654754bd9ab263c3d2a6e04bbd1a4dc36f9f280.zip gcc-9654754bd9ab263c3d2a6e04bbd1a4dc36f9f280.tar.gz gcc-9654754bd9ab263c3d2a6e04bbd1a4dc36f9f280.tar.bz2 |
ipa-icf.h (symbol_compare_hash): New class.
gcc/
* ipa-icf.h (symbol_compare_hash): New class.
(symbol_compare_hashmap_traits): Use it.
* mem-stats.h (mem_alloc_description::mem_location_hash): New class.
(mem_alloc_description::mem_alloc_hashmap_traits): Use it.
(mem_alloc_description::reverse_mem_map_t): Remove redundant
default_hashmap_traits.
* sanopt.c (sanopt_tree_triplet_hash): New class.
(sanopt_tree_triplet_map_traits): Use it.
From-SVN: r224974
Diffstat (limited to 'gcc/ipa-icf.h')
-rw-r--r-- | gcc/ipa-icf.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/ipa-icf.h b/gcc/ipa-icf.h index f229ca1..b94a38e 100644 --- a/gcc/ipa-icf.h +++ b/gcc/ipa-icf.h @@ -87,10 +87,10 @@ public: /* Hash traits for symbol_compare_collection map. */ -struct symbol_compare_hashmap_traits: default_hashmap_traits +struct symbol_compare_hash : nofree_ptr_hash <symbol_compare_collection> { static hashval_t - hash (const symbol_compare_collection *v) + hash (value_type v) { inchash::hash hstate; hstate.add_int (v->m_references.length ()); @@ -107,8 +107,7 @@ struct symbol_compare_hashmap_traits: default_hashmap_traits } static bool - equal_keys (const symbol_compare_collection *a, - const symbol_compare_collection *b) + equal (value_type a, value_type b) { if (a->m_references.length () != b->m_references.length () || a->m_interposables.length () != b->m_interposables.length ()) @@ -126,6 +125,8 @@ struct symbol_compare_hashmap_traits: default_hashmap_traits return true; } }; +typedef simple_hashmap_traits <symbol_compare_hash> + symbol_compare_hashmap_traits; /* Semantic item usage pair. */ |