aboutsummaryrefslogtreecommitdiff
path: root/gcc/mem-stats.h
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2015-06-25 17:16:51 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2015-06-25 17:16:51 +0000
commit9654754bd9ab263c3d2a6e04bbd1a4dc36f9f280 (patch)
tree6728b4fcfe1d6d91859b5129fff9d1b8b4a755c0 /gcc/mem-stats.h
parente0702244b8e0fa5555e20b5554545bab9d06927f (diff)
downloadgcc-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/mem-stats.h')
-rw-r--r--gcc/mem-stats.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/mem-stats.h b/gcc/mem-stats.h
index 63277b3..a9580ab 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;