diff options
author | Trevor Saunders <tsaunders@mozilla.com> | 2014-06-24 13:22:11 +0000 |
---|---|---|
committer | Trevor Saunders <tbsaunde@gcc.gnu.org> | 2014-06-24 13:22:11 +0000 |
commit | 1eb68d2d011dd181aca030e98ab02f29375e89da (patch) | |
tree | e42565bc6a235c9d4d379f34d53a38e7f997cb45 /gcc/lto-streamer.h | |
parent | 84baa4b968f2dbf4e85e49dba9215ad0f0f3ddc8 (diff) | |
download | gcc-1eb68d2d011dd181aca030e98ab02f29375e89da.zip gcc-1eb68d2d011dd181aca030e98ab02f29375e89da.tar.gz gcc-1eb68d2d011dd181aca030e98ab02f29375e89da.tar.bz2 |
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.
From-SVN: r211938
Diffstat (limited to 'gcc/lto-streamer.h')
-rw-r--r-- | gcc/lto-streamer.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/lto-streamer.h b/gcc/lto-streamer.h index 889e91d..566a0e0 100644 --- a/gcc/lto-streamer.h +++ b/gcc/lto-streamer.h @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see #include "plugin-api.h" #include "hash-table.h" +#include "hash-map.h" #include "target.h" #include "cgraph.h" #include "vec.h" @@ -472,7 +473,7 @@ struct GTY(()) lto_tree_ref_table struct lto_tree_ref_encoder { - pointer_map<unsigned> *tree_hash_table; /* Maps pointers to indices. */ + hash_map<tree, unsigned> *tree_hash_table; /* Maps pointers to indices. */ vec<tree> trees; /* Maps indices to pointers. */ }; @@ -994,7 +995,7 @@ lto_tag_check_range (enum LTO_tags actual, enum LTO_tags tag1, static inline void lto_init_tree_ref_encoder (struct lto_tree_ref_encoder *encoder) { - encoder->tree_hash_table = new pointer_map<unsigned>; + encoder->tree_hash_table = new hash_map<tree, unsigned> (251); encoder->trees.create (0); } @@ -1005,8 +1006,8 @@ static inline void lto_destroy_tree_ref_encoder (struct lto_tree_ref_encoder *encoder) { /* Hash table may be delete already. */ - if (encoder->tree_hash_table) - delete encoder->tree_hash_table; + delete encoder->tree_hash_table; + encoder->tree_hash_table = NULL; encoder->trees.release (); } |