diff options
author | tbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-24 13:22:11 +0000 |
---|---|---|
committer | tbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-24 13:22:11 +0000 |
commit | d62dd03970a5f6e18a0479428413081d7e1d7b96 (patch) | |
tree | e42565bc6a235c9d4d379f34d53a38e7f997cb45 /gcc/ipa.c | |
parent | 2933f7af8a2a577315202dc58abaa5ed4cc808b6 (diff) | |
download | gcc-d62dd03970a5f6e18a0479428413081d7e1d7b96.tar.gz |
add hash_map class
gcc/
* alloc-pool.c (alloc_pool_hash): Use hash_map instead of hash_table.
* dominance.c (iterate_fix_dominators): Use hash_map instead of
pointer_map.
* hash-map.h: New file.
* ipa-comdats.c: Use hash_map instead of pointer_map.
* ipa.c: Likewise.
* lto-section-out.c: Adjust.
* lto-streamer.h: Replace pointer_map with hash_map.
* symtab.c (verify_symtab): Likewise.
* tree-ssa-strlen.c (decl_to_stridxlist_htab): Likewise.
* tree-ssa-uncprop.c (val_ssa_equiv): Likewise.
* tree-streamer.h: Likewise.
* tree-streamer.c: Adjust.
* pointer-set.h: Remove pointer_map.
gcc/lto/
* lto.c (canonical_type_hash_cache): Use hash_map instead of
pointer_map.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211938 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa.c')
-rw-r--r-- | gcc/ipa.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/gcc/ipa.c b/gcc/ipa.c index 33bf5104530..04f2c79ae33 100644 --- a/gcc/ipa.c +++ b/gcc/ipa.c @@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see #include "stringpool.h" #include "cgraph.h" #include "tree-pass.h" +#include "hash-map.h" #include "pointer-set.h" #include "gimple-expr.h" #include "gimplify.h" @@ -1113,14 +1114,14 @@ make_pass_ipa_cdtor_merge (gcc::context *ctxt) cgraph_node * meet (cgraph_node *function, varpool_node *var, - pointer_map<cgraph_node *> &single_user_map) + hash_map<varpool_node *, cgraph_node *> &single_user_map) { struct cgraph_node *user, **f; if (var->aux == BOTTOM) return BOTTOM; - f = single_user_map.contains (var); + f = single_user_map.get (var); if (!f) return function; user = *f; @@ -1139,7 +1140,7 @@ meet (cgraph_node *function, varpool_node *var, cgraph_node * propagate_single_user (varpool_node *vnode, cgraph_node *function, - pointer_map<cgraph_node *> &single_user_map) + hash_map<varpool_node *, cgraph_node *> &single_user_map) { int i; struct ipa_ref *ref; @@ -1180,7 +1181,7 @@ ipa_single_use (void) { varpool_node *first = (varpool_node *) (void *) 1; varpool_node *var; - pointer_map<cgraph_node *> single_user_map; + hash_map<varpool_node *, cgraph_node *> single_user_map; FOR_EACH_DEFINED_VARIABLE (var) if (!varpool_all_refs_explicit_p (var)) @@ -1201,7 +1202,7 @@ ipa_single_use (void) var = first; first = (varpool_node *)first->aux; - f = single_user_map.contains (var); + f = single_user_map.get (var); if (f) orig_user = *f; else @@ -1216,7 +1217,7 @@ ipa_single_use (void) unsigned int i; ipa_ref *ref; - *single_user_map.insert (var) = user; + single_user_map.put (var, user); /* Enqueue all aliases for re-processing. */ for (i = 0; @@ -1253,8 +1254,8 @@ ipa_single_use (void) if (var->aux != BOTTOM) { #ifdef ENABLE_CHECKING - if (!single_user_map.contains (var)) - gcc_assert (single_user_map.contains (var)); + if (!single_user_map.get (var)) + gcc_assert (single_user_map.get (var)); #endif if (dump_file) { |