diff options
author | Trevor Saunders <tsaunders@mozilla.com> | 2015-04-18 18:13:18 +0000 |
---|---|---|
committer | Trevor Saunders <tbsaunde@gcc.gnu.org> | 2015-04-18 18:13:18 +0000 |
commit | 67f58944a75eaf9c193dc704f8128bfaaf6c3c3a (patch) | |
tree | 371c9ad12b94f56f0112c4fda736391f1925a309 /gcc/ggc-common.c | |
parent | b9923c3538dbd24c38a86ff49c7e3895c6c22873 (diff) | |
download | gcc-67f58944a75eaf9c193dc704f8128bfaaf6c3c3a.zip gcc-67f58944a75eaf9c193dc704f8128bfaaf6c3c3a.tar.gz gcc-67f58944a75eaf9c193dc704f8128bfaaf6c3c3a.tar.bz2 |
remove need for store_values_directly
This switches all hash_table users to use the layout that stores
elements of type value_type in the hash table instead of the one storing
value_type *. Since it becomes unused support for the value_type *
layout is removed.
gcc/
* hash-table.h: Remove version of hash_table that stored value_type *.
* asan.c, attribs.c, bitmap.c, cfg.c, cgraph.h, config/arm/arm.c,
config/i386/winnt.c, config/ia64/ia64.c, config/mips/mips.c,
config/sol2.c, coverage.c, cselib.c, dse.c, dwarf2cfi.c,
dwarf2out.c, except.c, gcse.c, genmatch.c, ggc-common.c,
gimple-ssa-strength-reduction.c, gimplify.c, haifa-sched.c,
hard-reg-set.h, hash-map.h, hash-set.h, ipa-devirt.c, ipa-icf.h,
ipa-profile.c, ira-color.c, ira-costs.c, loop-invariant.c,
loop-iv.c, loop-unroll.c, lto-streamer.h, plugin.c, postreload-gcse.c,
reginfo.c, statistics.c, store-motion.c, trans-mem.c, tree-cfg.c,
tree-eh.c, tree-hasher.h, tree-into-ssa.c, tree-parloops.c,
tree-sra.c, tree-ssa-coalesce.c, tree-ssa-dom.c, tree-ssa-live.c,
tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-phiopt.c,
tree-ssa-pre.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c,
tree-ssa-structalias.c, tree-ssa-tail-merge.c,
tree-ssa-threadupdate.c, tree-vectorizer.c, tree-vectorizer.h,
valtrack.h, var-tracking.c, vtable-verify.c, vtable-verify.h: Adjust.
libcc1/
* plugin.cc: Adjust for hash_table changes.
gcc/java/
* jcf-io.c: Adjust for hash_table changes.
gcc/lto/
* lto.c: Adjust for hash_table changes.
gcc/objc/
* objc-act.c: Adjust for hash_table changes.
From-SVN: r222213
Diffstat (limited to 'gcc/ggc-common.c')
-rw-r--r-- | gcc/ggc-common.c | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/gcc/ggc-common.c b/gcc/ggc-common.c index 03fbe7d..eff326a 100644 --- a/gcc/ggc-common.c +++ b/gcc/ggc-common.c @@ -242,20 +242,20 @@ struct ptr_data struct saving_hasher : typed_free_remove <ptr_data> { - typedef ptr_data value_type; - typedef void compare_type; - static inline hashval_t hash (const value_type *); - static inline bool equal (const value_type *, const compare_type *); + typedef ptr_data *value_type; + typedef void *compare_type; + static inline hashval_t hash (const ptr_data *); + static inline bool equal (const ptr_data *, const void *); }; inline hashval_t -saving_hasher::hash (const value_type *p) +saving_hasher::hash (const ptr_data *p) { return POINTER_HASH (p->obj); } inline bool -saving_hasher::equal (const value_type *p1, const compare_type *p2) +saving_hasher::equal (const ptr_data *p1, const void *p2) { return p1->obj == p2; } @@ -847,20 +847,22 @@ struct ggc_loc_descriptor struct ggc_loc_desc_hasher : typed_noop_remove <ggc_loc_descriptor> { - typedef ggc_loc_descriptor value_type; - typedef ggc_loc_descriptor compare_type; - static inline hashval_t hash (const value_type *); - static inline bool equal (const value_type *, const compare_type *); + typedef ggc_loc_descriptor *value_type; + typedef ggc_loc_descriptor *compare_type; + static inline hashval_t hash (const ggc_loc_descriptor *); + static inline bool equal (const ggc_loc_descriptor *, + const ggc_loc_descriptor *); }; inline hashval_t -ggc_loc_desc_hasher::hash (const value_type *d) +ggc_loc_desc_hasher::hash (const ggc_loc_descriptor *d) { return htab_hash_pointer (d->function) | d->line; } inline bool -ggc_loc_desc_hasher::equal (const value_type *d, const compare_type *d2) +ggc_loc_desc_hasher::equal (const ggc_loc_descriptor *d, + const ggc_loc_descriptor *d2) { return (d->file == d2->file && d->line == d2->line && d->function == d2->function); @@ -880,20 +882,20 @@ struct ggc_ptr_hash_entry struct ptr_hash_hasher : typed_noop_remove <ggc_ptr_hash_entry> { - typedef ggc_ptr_hash_entry value_type; - typedef void compare_type; - static inline hashval_t hash (const value_type *); - static inline bool equal (const value_type *, const compare_type *); + typedef ggc_ptr_hash_entry *value_type; + typedef void *compare_type; + static inline hashval_t hash (const ggc_ptr_hash_entry *); + static inline bool equal (const ggc_ptr_hash_entry *, const void *); }; inline hashval_t -ptr_hash_hasher::hash (const value_type *d) +ptr_hash_hasher::hash (const ggc_ptr_hash_entry *d) { return htab_hash_pointer (d->ptr); } inline bool -ptr_hash_hasher::equal (const value_type *p, const compare_type *p2) +ptr_hash_hasher::equal (const ggc_ptr_hash_entry *p, const void *p2) { return (p->ptr == p2); } |