aboutsummaryrefslogtreecommitdiff
path: root/gcc/alias.c
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/alias.c
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/alias.c')
-rw-r--r--gcc/alias.c27
1 files changed, 2 insertions, 25 deletions
diff --git a/gcc/alias.c b/gcc/alias.c
index f79cc42..32eb3cf 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -141,31 +141,8 @@ along with GCC; see the file COPYING3. If not see
However, this is no actual entry for alias set zero. It is an
error to attempt to explicitly construct a subset of zero. */
-struct alias_set_traits : default_hashmap_traits
-{
- template<typename T>
- static bool
- is_empty (T &e)
- {
- return e.m_key == INT_MIN;
- }
-
- template<typename T>
- static bool
- is_deleted (T &e)
- {
- return e.m_key == (INT_MIN + 1);
- }
-
- template<typename T> static void mark_empty (T &e) { e.m_key = INT_MIN; }
-
- template<typename T>
- static void
- mark_deleted (T &e)
- {
- e.m_key = INT_MIN + 1;
- }
-};
+struct alias_set_hash : int_hash <int, INT_MIN, INT_MIN + 1> {};
+struct alias_set_traits : simple_hashmap_traits <alias_set_hash> {};
struct GTY(()) alias_set_entry_d {
/* The alias set number, as stored in MEM_ALIAS_SET. */