aboutsummaryrefslogtreecommitdiff
path: root/gcc/symbol-summary.h
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2015-06-25 17:16:44 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2015-06-25 17:16:44 +0000
commite0702244b8e0fa5555e20b5554545bab9d06927f (patch)
treef415bf86a67f1423c4e6ac1b4d5c826ba1116f12 /gcc/symbol-summary.h
parent1c9524603bf6207984cc21e7df6520e935a85e35 (diff)
downloadgcc-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/symbol-summary.h')
-rw-r--r--gcc/symbol-summary.h41
1 files changed, 2 insertions, 39 deletions
diff --git a/gcc/symbol-summary.h b/gcc/symbol-summary.h
index 0448310..facb596 100644
--- a/gcc/symbol-summary.h
+++ b/gcc/symbol-summary.h
@@ -200,45 +200,8 @@ protected:
bool m_ggc;
private:
- struct summary_hashmap_traits: default_hashmap_traits
- {
- static const int deleted_value = -1;
- static const int empty_value = 0;
-
- static hashval_t
- hash (const int v)
- {
- return (hashval_t)v;
- }
-
- template<typename Type>
- static bool
- is_deleted (Type &e)
- {
- return e.m_key == deleted_value;
- }
-
- template<typename Type>
- static bool
- is_empty (Type &e)
- {
- return e.m_key == empty_value;
- }
-
- template<typename Type>
- static void
- mark_deleted (Type &e)
- {
- e.m_key = deleted_value;
- }
-
- template<typename Type>
- static void
- mark_empty (Type &e)
- {
- e.m_key = empty_value;
- }
- };
+ typedef int_hash <int, 0, -1> map_hash;
+ typedef simple_hashmap_traits <map_hash> summary_hashmap_traits;
/* Getter for summary callgraph ID. */
T* get (int uid)