diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2015-06-25 17:16:44 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2015-06-25 17:16:44 +0000 |
commit | e0702244b8e0fa5555e20b5554545bab9d06927f (patch) | |
tree | f415bf86a67f1423c4e6ac1b4d5c826ba1116f12 /gcc/value-prof.c | |
parent | 1c9524603bf6207984cc21e7df6520e935a85e35 (diff) | |
download | gcc-e0702244b8e0fa5555e20b5554545bab9d06927f.zip gcc-e0702244b8e0fa5555e20b5554545bab9d06927f.tar.gz gcc-e0702244b8e0fa5555e20b5554545bab9d06927f.tar.bz2 |
gengtype-parse.c (require_template_declaration): Allow '+' in template parameters.
gcc/
* gengtype-parse.c (require_template_declaration): Allow '+' in
template parameters. Consolidate cases.
* hash-traits.h (int_hash): New class.
* alias.c (alias_set_hash): New structure.
(alias_set_traits): Use it.
* symbol-summary.h (function_summary::map_hash): New class.
(function_summary::summary_hashmap_traits): Use it.
* tree-inline.h (dependence_hash): New class.
(dependence_hasher): Use it.
* tree-ssa-reassoc.c (oecount_hasher): Use int_hash.
* value-prof.c (profile_id_hash): New class.
(profile_id_traits): Use it.
From-SVN: r224973
Diffstat (limited to 'gcc/value-prof.c')
-rw-r--r-- | gcc/value-prof.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/gcc/value-prof.c b/gcc/value-prof.c index 74f5375..a84b8da 100644 --- a/gcc/value-prof.c +++ b/gcc/value-prof.c @@ -1248,19 +1248,8 @@ gimple_mod_subtract_transform (gimple_stmt_iterator *si) return true; } -struct profile_id_traits : default_hashmap_traits -{ - template<typename T> - static bool - is_deleted (T &e) - { - return e.m_key == UINT_MAX; - } - - template<typename T> static bool is_empty (T &e) { return e.m_key == 0; } - template<typename T> static void mark_deleted (T &e) { e.m_key = UINT_MAX; } - template<typename T> static void mark_empty (T &e) { e.m_key = 0; } -}; +typedef int_hash <unsigned int, 0, UINT_MAX> profile_id_hash; +typedef simple_hashmap_traits <profile_id_hash> profile_id_traits; static hash_map<unsigned int, cgraph_node *, profile_id_traits> * cgraph_node_map = 0; |