diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-06-25 17:16:51 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-06-25 17:16:51 +0000 |
commit | 091deb37761b46205932413776447534ff417629 (patch) | |
tree | 6728b4fcfe1d6d91859b5129fff9d1b8b4a755c0 /gcc/mem-stats.h | |
parent | 613732c1f5aaa8941c1e45b762a89aaaf10d36e1 (diff) | |
download | gcc-091deb37761b46205932413776447534ff417629.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@224974 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/mem-stats.h')
-rw-r--r-- | gcc/mem-stats.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/mem-stats.h b/gcc/mem-stats.h index 63277b302ce..a9580ab442e 100644 --- a/gcc/mem-stats.h +++ b/gcc/mem-stats.h @@ -238,10 +238,10 @@ template <class T> class mem_alloc_description { public: - struct mem_alloc_hashmap_traits: default_hashmap_traits + struct mem_location_hash : nofree_ptr_hash <mem_location> { static hashval_t - hash (const mem_location *l) + hash (value_type l) { inchash::hash hstate; @@ -253,18 +253,18 @@ public: } static bool - equal_keys (const mem_location *l1, const mem_location *l2) + equal (value_type l1, value_type l2) { return l1->m_filename == l2->m_filename && l1->m_function == l2->m_function && l1->m_line == l2->m_line; } }; + typedef simple_hashmap_traits<mem_location_hash> mem_alloc_hashmap_traits; /* Internal class type definitions. */ typedef hash_map <mem_location *, T *, mem_alloc_hashmap_traits> mem_map_t; - typedef hash_map <const void *, mem_usage_pair<T>, default_hashmap_traits> - reverse_mem_map_t; + typedef hash_map <const void *, mem_usage_pair<T> > reverse_mem_map_t; typedef hash_map <const void *, std::pair<T *, size_t> > reverse_object_map_t; typedef std::pair <mem_location *, T *> mem_list_t; |