]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/ggc.h
support ggc hash_map and hash_set
authorTrevor Saunders <tsaunders@mozilla.com>
Tue, 2 Sep 2014 22:46:00 +0000 (22:46 +0000)
committerTrevor Saunders <tbsaunde@gcc.gnu.org>
Tue, 2 Sep 2014 22:46:00 +0000 (22:46 +0000)
commitb086d5308de0d25444243f482f2f3d1dfd3a9a62
treecb4aa8d407cf40f28ef0fcd771f1109d53f44f3c
parent70f0f8b2b1c9bf53b9158e4264bc1e93b963c31e
support ggc hash_map  and hash_set

gcc/ChangeLog:

* alloc-pool.c: Include coretypes.h.
* cgraph.h, dbxout.c, dwarf2out.c, except.c, except.h, function.c,
function.h, symtab.c, tree-cfg.c, tree-eh.c: Use hash_map and
hash_set instead of htab.
* ggc-page.c (in_gc): New variable.
(ggc_free): Do nothing if a collection is taking place.
(ggc_collect): Set in_gc appropriately.
* ggc.h (gt_ggc_mx(const char *)): New function.
(gt_pch_nx(const char *)): Likewise.
(gt_ggc_mx(int)): Likewise.
(gt_pch_nx(int)): Likewise.
* hash-map.h (hash_map::hash_entry::ggc_mx): Likewise.
(hash_map::hash_entry::pch_nx): Likewise.
(hash_map::hash_entry::pch_nx_helper): Likewise.
(hash_map::hash_map): Adjust.
(hash_map::create_ggc): New function.
(gt_ggc_mx): Likewise.
(gt_pch_nx): Likewise.
* hash-set.h (default_hashset_traits::ggc_mx): Likewise.
(default_hashset_traits::pch_nx): Likewise.
(hash_set::hash_entry::ggc_mx): Likewise.
(hash_set::hash_entry::pch_nx): Likewise.
(hash_set::hash_entry::pch_nx_helper): Likewise.
(hash_set::hash_set): Adjust.
(hash_set::create_ggc): New function.
(hash_set::elements): Likewise.
(gt_ggc_mx): Likewise.
(gt_pch_nx): Likewise.
* hash-table.h (hash_table::hash_table): Adjust.
(hash_table::m_ggc): New member.
(hash_table::~hash_table): Adjust.
(hash_table::expand): Likewise.
(hash_table::empty): Likewise.
(gt_ggc_mx): New function.
(hashtab_entry_note_pointers): Likewise.
(gt_pch_nx): Likewise.

From-SVN: r214834
17 files changed:
gcc/ChangeLog
gcc/alloc-pool.c
gcc/cgraph.h
gcc/dbxout.c
gcc/dwarf2out.c
gcc/except.c
gcc/except.h
gcc/function.c
gcc/function.h
gcc/ggc-page.c
gcc/ggc.h
gcc/hash-map.h
gcc/hash-set.h
gcc/hash-table.h
gcc/symtab.c
gcc/tree-cfg.c
gcc/tree-eh.c