diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2015-06-25 17:17:20 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2015-06-25 17:17:20 +0000 |
commit | fb5c464a861887d98d709b8060002d6fc96ec6e0 (patch) | |
tree | 2f1d8237329bc5a543744d9021a1988e8f72fb2e /gcc/config | |
parent | 203f2c4386837b6672f67fe74cfc940aaec300ac (diff) | |
download | gcc-fb5c464a861887d98d709b8060002d6fc96ec6e0.zip gcc-fb5c464a861887d98d709b8060002d6fc96ec6e0.tar.gz gcc-fb5c464a861887d98d709b8060002d6fc96ec6e0.tar.bz2 |
hash-map-traits.h (simple_hashmap_traits::key_type): New typedef.
gcc/
* hash-map-traits.h (simple_hashmap_traits::key_type): New typedef.
(unbounded_int_hashmap_traits::key_type): Likewise.
* hash-map.h (hash_map): Get the key type from the traits.
* hash-traits.h (default_hash_traits): By default, inherit from the
template parameter.
* alias.c (alias_set_traits): Delete.
(alias_set_entry_d::children): Use alias_set_hash as the first
template parameter.
(record_alias_subset): Update accordingly.
* except.c (tree_hash_traits): Delete.
(type_to_runtime_map): Use tree_hash as the first template parameter.
(init_eh): Update accordingly.
* genmatch.c (capture_id_map_hasher): Delete.
(cid_map_t): Use nofree_string_hash as first template parameter.
* ipa-icf.h (symbol_compare_hashmap_traits): Delete.
* ipa-icf.c (sem_item_optimizer::subdivide_classes_by_sensitive_refs):
Use symbol_compare_hash as the first template parameter in
subdivide_hash_map.
* mem-stats.h (mem_usage_pair::mem_alloc_hashmap_traits): Delete.
(mem_usage_pair::mem_map_t): Use mem_location_hash as the first
template parameter.
* passes.c (pass_registry_hasher): Delete.
(name_to_pass_map): Use nofree_string_hash as the first template
parameter.
(register_pass_name): Update accordingly.
* sanopt.c (sanopt_tree_map_traits): Delete.
(sanopt_tree_triplet_map_traits): Delete.
(sanopt_ctx::asan_check_map): Use tree_operand_hash as the first
template parameter.
(sanopt_ctx::vptr_check_map): Use sanopt_tree_triplet_hash as
the first template parameter.
* sese.c (rename_map_hasher): Delete.
(rename_map_type): Use tree_ssa_name_hash as the first template
parameter.
* symbol-summary.h (function_summary::summary_hashmap_traits): Delete.
(function_summary::m_map): Use map_hash as the first template
parameter.
(function_summary::release): Update accordingly.
* tree-if-conv.c (phi_args_hash_traits): Delete.
(predicate_scalar_phi): Use tree_operand_hash as the first template
parameter to phi_arg_map.
* tree-inline.h (dependence_hasher): Delete.
(copy_body_data::dependence_map): Use dependence_hash as the first
template parameter.
* tree-inline.c (remap_dependence_clique): Update accordingly.
* tree-ssa-strlen.c (stridxlist_hash_traits): Delete.
(decl_to_stridxlist_htab): Use tree_decl_hash as the first template
parameter.
(addr_stridxptr): Update accordingly.
* value-prof.c (profile_id_traits): Delete.
(cgraph_node_map): Use profile_id_hash as the first template
parameter.
(init_node_map): Update accordingly.
* config/alpha/alpha.c (string_traits): Delete.
(machine_function::links): Use nofree_string_hash as the first
template parameter.
(alpha_use_linkage, alpha_write_linkage): Update accordingly.
* config/m32c/m32c.c (pragma_traits): Delete.
(pragma_htab): Use nofree_string_hash as the first template parameter.
(m32c_note_pragma_address): Update accordingly.
* config/mep/mep.c (pragma_traits): Delete.
(pragma_htab): Use nofree_string_hash as the first template parameter.
(mep_note_pragma_flag): Update accordingly.
* config/mips/mips.c (mips16_flip_traits): Delete.
(mflip_mips16_htab): Use nofree_string_hash as the first template
parameter.
(mflip_mips16_use_mips16_p): Update accordingly.
(local_alias_traits): Delete.
(mips16_local_aliases): Use nofree_string_hash as the first template
parameter.
(mips16_local_alias): Update accordingly.
From-SVN: r224977
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/alpha/alpha.c | 8 | ||||
-rw-r--r-- | gcc/config/m32c/m32c.c | 7 | ||||
-rw-r--r-- | gcc/config/mep/mep.c | 8 | ||||
-rw-r--r-- | gcc/config/mips/mips.c | 16 |
4 files changed, 11 insertions, 28 deletions
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index 3970278..29dfc68 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -4806,8 +4806,6 @@ alpha_multipass_dfa_lookahead (void) struct GTY(()) alpha_links; -typedef simple_hashmap_traits <nofree_string_hash> string_traits; - struct GTY(()) machine_function { /* For flag_reorder_blocks_and_partition. */ @@ -4817,7 +4815,7 @@ struct GTY(()) machine_function bool uses_condition_handler; /* Linkage entries. */ - hash_map<const char *, alpha_links *, string_traits> *links; + hash_map<nofree_string_hash, alpha_links *> *links; }; /* How to allocate a 'struct machine_function'. */ @@ -9544,7 +9542,7 @@ alpha_use_linkage (rtx func, bool lflag, bool rflag) } else cfun->machine->links - = hash_map<const char *, alpha_links *, string_traits>::create_ggc (64); + = hash_map<nofree_string_hash, alpha_links *>::create_ggc (64); if (al == NULL) { @@ -9635,7 +9633,7 @@ alpha_write_linkage (FILE *stream, const char *funname) if (cfun->machine->links) { - hash_map<const char *, alpha_links *, string_traits>::iterator iter + hash_map<nofree_string_hash, alpha_links *>::iterator iter = cfun->machine->links->begin (); for (; iter != cfun->machine->links->end (); ++iter) alpha_write_one_linkage ((*iter).first, (*iter).second, stream); diff --git a/gcc/config/m32c/m32c.c b/gcc/config/m32c/m32c.c index 7dd1753..7396be5 100644 --- a/gcc/config/m32c/m32c.c +++ b/gcc/config/m32c/m32c.c @@ -3053,17 +3053,14 @@ m32c_insert_attributes (tree node ATTRIBUTE_UNUSED, } } -typedef simple_hashmap_traits<nofree_string_hash> pragma_traits; - /* Hash table of pragma info. */ -static GTY(()) hash_map<const char *, unsigned, pragma_traits> *pragma_htab; +static GTY(()) hash_map<nofree_string_hash, unsigned> *pragma_htab; void m32c_note_pragma_address (const char *varname, unsigned address) { if (!pragma_htab) - pragma_htab - = hash_map<const char *, unsigned, pragma_traits>::create_ggc (31); + pragma_htab = hash_map<nofree_string_hash, unsigned>::create_ggc (31); const char *name = ggc_strdup (varname); unsigned int *slot = &pragma_htab->get_or_insert (name); diff --git a/gcc/config/mep/mep.c b/gcc/config/mep/mep.c index 3698bb0..bd372d8 100644 --- a/gcc/config/mep/mep.c +++ b/gcc/config/mep/mep.c @@ -4071,18 +4071,14 @@ struct GTY(()) pragma_entry { int flag; }; -typedef simple_hashmap_traits<nofree_string_hash> pragma_traits; - /* Hash table of farcall-tagged sections. */ -static GTY(()) hash_map<const char *, pragma_entry, pragma_traits> * - pragma_htab; +static GTY(()) hash_map<nofree_string_hash, pragma_entry> *pragma_htab; static void mep_note_pragma_flag (const char *funcname, int flag) { if (!pragma_htab) - pragma_htab - = hash_map<const char *, pragma_entry, pragma_traits>::create_ggc (31); + pragma_htab = hash_map<nofree_string_hash, pragma_entry>::create_ggc (31); bool existed; const char *name = ggc_strdup (funcname); diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index c8374cf..367ab74 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -1263,12 +1263,9 @@ static int mips_register_move_cost (machine_mode, reg_class_t, static unsigned int mips_function_arg_boundary (machine_mode, const_tree); static machine_mode mips_get_reg_raw_mode (int regno); -struct mips16_flip_traits : simple_hashmap_traits <nofree_string_hash> {}; - /* This hash table keeps track of implicit "mips16" and "nomips16" attributes for -mflip_mips16. It maps decl names onto a boolean mode setting. */ -static GTY (()) hash_map<const char *, bool, mips16_flip_traits> * - mflip_mips16_htab; +static GTY (()) hash_map<nofree_string_hash, bool> *mflip_mips16_htab; /* True if -mflip-mips16 should next add an attribute for the default MIPS16 mode, false if it should next add an attribute for the opposite mode. */ @@ -1289,8 +1286,7 @@ mflip_mips16_use_mips16_p (tree decl) return !base_is_mips16; if (!mflip_mips16_htab) - mflip_mips16_htab - = hash_map<const char *, bool, mips16_flip_traits>::create_ggc (37); + mflip_mips16_htab = hash_map<nofree_string_hash, bool>::create_ggc (37); name = IDENTIFIER_POINTER (DECL_NAME (decl)); @@ -6589,13 +6585,10 @@ mips_load_call_address (enum mips_call_type type, rtx dest, rtx addr) } } -struct local_alias_traits : simple_hashmap_traits <nofree_string_hash> {}; - /* Each locally-defined hard-float MIPS16 function has a local symbol associated with it. This hash table maps the function symbol (FUNC) to the local symbol (LOCAL). */ -static GTY (()) hash_map<const char *, rtx, local_alias_traits> - *mips16_local_aliases; +static GTY (()) hash_map<nofree_string_hash, rtx> *mips16_local_aliases; /* FUNC is the symbol for a locally-defined hard-float MIPS16 function. Return a local alias for it, creating a new one if necessary. */ @@ -6605,8 +6598,7 @@ mips16_local_alias (rtx func) { /* Create the hash table if this is the first call. */ if (mips16_local_aliases == NULL) - mips16_local_aliases - = hash_map<const char *, rtx, local_alias_traits>::create_ggc (37); + mips16_local_aliases = hash_map<nofree_string_hash, rtx>::create_ggc (37); /* Look up the function symbol, creating a new entry if need be. */ bool existed; |