From patchwork Tue Jun 16 08:56:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 484857 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id AD79914018C for ; Tue, 16 Jun 2015 18:56:45 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=T8vPMxyL; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=QOo /9mugsflwqUIqOiNQn6+vNNUDRh7CavptwR7ZvcBUfV7VfSnYUItpXubu/viQ2P/ BHny51egADtp3NyoBk7SIIi1llggbf0PFjoYMr5kLFyIEwnTZaN89CXxnI6szyni sYTjp8VkV5wQfanoBkG45dgPNQ3zQj/o+vFYAdu0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=default; bh=HeIP/7zkc AHTxc5D9UPfOV4bs/0=; b=T8vPMxyLCyslirx3SUWNDEqDvLVh9UbyenDB3Xpu0 70uxAB57X6PY4cTNLfCJdSKbSuW0U/7Ag0W3iZT415HKuwv+rrER9MyuNOaMs7js jByAIE8GBMOxtL8MtnBQFP9nUf5NO3nWsKTHqpnBr2xtVffjnxXUAlZiXQP9rRZq uo= Received: (qmail 35645 invoked by alias); 16 Jun 2015 08:56:36 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 34757 invoked by uid 89); 16 Jun 2015 08:56:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.1 required=5.0 tests=AWL, BAYES_50, KAM_ASCII_DIVIDERS, SPF_PASS autolearn=no version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (207.82.80.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 16 Jun 2015 08:56:33 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by uk-mta-18.uk.mimecast.lan; Tue, 16 Jun 2015 09:56:31 +0100 Received: from localhost ([10.1.2.79]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 16 Jun 2015 09:56:30 +0100 From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@arm.com Subject: [06/13] Add free_ptr_hash References: <87fv5s2gej.fsf@e105548-lin.cambridge.arm.com> Date: Tue, 16 Jun 2015 09:56:30 +0100 In-Reply-To: <87fv5s2gej.fsf@e105548-lin.cambridge.arm.com> (Richard Sandiford's message of "Tue, 16 Jun 2015 09:42:28 +0100") Message-ID: <87pp4w116p.fsf@e105548-lin.cambridge.arm.com> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 X-MC-Unique: FU927eHMQfCxgNKQLMoLcw-1 Similarly to the last patch, this one adds a free_ptr_hash that inherits from both pointer_hash and typed_free_remove. gcc/ * hash-traits.h (free_ptr_hash): New class. * dwarf2out.c (decl_table_entry_hasher): Inherit from free_ptr_hash rather than typed_free_remove. Remove redudant typedefs. (external_ref_hasher): Likewise. * except.c (action_record_hasher, ttypes_filter_hasher): Likewise. (ehspec_hasher): Likewise. * ggc-common.c (saving_hasher): Likewise. * gimplify.c (gimplify_hasher): Likewise. * haifa-sched.c (delay_i2_hasher): Likewise. * loop-invariant.c (invariant_expr_hasher): Likewise. * loop-iv.c (biv_entry_hasher): Likewise. * loop-unroll.c (iv_split_hasher, var_expand_hasher): Likewise. * trans-mem.c (tm_mem_map_hasher, tm_memop_hasher): Likewise. * tree-cfg.c (locus_discrim_hasher): Likewise. * tree-eh.c (finally_tree_hasher): Likewise. * tree-into-ssa.c (var_info_hasher): Likewise. * tree-parloops.c (reduction_hasher, name_to_copy_hasher): Likewise. * tree-ssa-loop-ivopts.c (iv_inv_expr_hasher): Likewise. * tree-ssa-phiopt.c (ssa_names_hasher): Likewise. * tree-ssa-pre.c (expr_pred_trans_d): Likewise. * tree-ssa-sccvn.c (vn_constant_hasher): Likewise. * tree-ssa-structalias.c (equiv_class_hasher): Likewise. (shared_bitmap_hasher): Likewise. * tree-ssa-threadupdate.c (redirection_data): Likewise. * tree-vectorizer.h (peel_info_hasher): Likewise. * tree-vectorizer.c (simduid_to_vf, simd_array_to_simduid): Likewise. * config/mips/mips.c (mips_lo_sum_offset_hasher): Likewise. libcc1/ * plugin.cc (decl_addr_hasher): Inherit from free_ptr_hash rather than typed_free_remove. Remove redudant typedefs. Index: gcc/hash-traits.h =================================================================== --- gcc/hash-traits.h 2015-06-16 09:55:59.084568044 +0100 +++ gcc/hash-traits.h 2015-06-16 09:55:59.084568044 +0100 @@ -173,4 +173,10 @@ struct ggc_cache_hasher : ggc_hasher template struct nofree_ptr_hash : pointer_hash , typed_noop_remove {}; +/* Traits for pointer elements that should be freed via free() when an + element is deleted. */ + +template +struct free_ptr_hash : pointer_hash , typed_free_remove {}; + #endif Index: gcc/dwarf2out.c =================================================================== --- gcc/dwarf2out.c 2015-06-16 09:55:59.084568044 +0100 +++ gcc/dwarf2out.c 2015-06-16 09:55:59.072568191 +0100 @@ -7296,9 +7296,8 @@ struct decl_table_entry /* Hashtable helpers. */ -struct decl_table_entry_hasher : typed_free_remove +struct decl_table_entry_hasher : free_ptr_hash { - typedef decl_table_entry *value_type; typedef die_struct *compare_type; static inline hashval_t hash (const decl_table_entry *); static inline bool equal (const decl_table_entry *, const die_struct *); @@ -7838,10 +7837,8 @@ struct external_ref /* Hashtable helpers. */ -struct external_ref_hasher : typed_free_remove +struct external_ref_hasher : free_ptr_hash { - typedef external_ref *value_type; - typedef external_ref *compare_type; static inline hashval_t hash (const external_ref *); static inline bool equal (const external_ref *, const external_ref *); }; Index: gcc/except.c =================================================================== --- gcc/except.c 2015-06-16 09:55:59.084568044 +0100 +++ gcc/except.c 2015-06-16 09:55:59.072568191 +0100 @@ -207,10 +207,8 @@ struct action_record /* Hashtable helpers. */ -struct action_record_hasher : typed_free_remove +struct action_record_hasher : free_ptr_hash { - typedef action_record *value_type; - typedef action_record *compare_type; static inline hashval_t hash (const action_record *); static inline bool equal (const action_record *, const action_record *); }; @@ -723,9 +721,8 @@ struct ttypes_filter { /* Helper for ttypes_filter hashing. */ -struct ttypes_filter_hasher : typed_free_remove +struct ttypes_filter_hasher : free_ptr_hash { - typedef ttypes_filter *value_type; typedef tree_node *compare_type; static inline hashval_t hash (const ttypes_filter *); static inline bool equal (const ttypes_filter *, const tree_node *); @@ -751,10 +748,8 @@ typedef hash_table /* Helper for ehspec hashing. */ -struct ehspec_hasher : typed_free_remove +struct ehspec_hasher : free_ptr_hash { - typedef ttypes_filter *value_type; - typedef ttypes_filter *compare_type; static inline hashval_t hash (const ttypes_filter *); static inline bool equal (const ttypes_filter *, const ttypes_filter *); }; Index: gcc/ggc-common.c =================================================================== --- gcc/ggc-common.c 2015-06-16 09:55:59.084568044 +0100 +++ gcc/ggc-common.c 2015-06-16 09:55:59.072568191 +0100 @@ -237,9 +237,8 @@ #define POINTER_HASH(x) (hashval_t)((int /* Helper for hashing saving_htab. */ -struct saving_hasher : typed_free_remove +struct saving_hasher : free_ptr_hash { - 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 *); Index: gcc/gimplify.c =================================================================== --- gcc/gimplify.c 2015-06-16 09:55:59.084568044 +0100 +++ gcc/gimplify.c 2015-06-16 09:55:59.072568191 +0100 @@ -128,10 +128,8 @@ enum omp_region_type /* Gimplify hashtable helper. */ -struct gimplify_hasher : typed_free_remove +struct gimplify_hasher : free_ptr_hash { - typedef elt_t *value_type; - typedef elt_t *compare_type; static inline hashval_t hash (const elt_t *); static inline bool equal (const elt_t *, const elt_t *); }; Index: gcc/haifa-sched.c =================================================================== --- gcc/haifa-sched.c 2015-06-16 09:55:59.084568044 +0100 +++ gcc/haifa-sched.c 2015-06-16 09:55:59.076568143 +0100 @@ -637,9 +637,8 @@ delay_i1_hasher::equal (const delay_pair return x->i1 == y; } -struct delay_i2_hasher : typed_free_remove +struct delay_i2_hasher : free_ptr_hash { - typedef delay_pair *value_type; typedef void *compare_type; static inline hashval_t hash (const delay_pair *); static inline bool equal (const delay_pair *, const void *); Index: gcc/loop-invariant.c =================================================================== --- gcc/loop-invariant.c 2015-06-16 09:55:59.084568044 +0100 +++ gcc/loop-invariant.c 2015-06-16 09:55:59.076568143 +0100 @@ -442,10 +442,8 @@ invariant_expr_equal_p (rtx_insn *insn1, return true; } -struct invariant_expr_hasher : typed_free_remove +struct invariant_expr_hasher : free_ptr_hash { - typedef invariant_expr_entry *value_type; - typedef invariant_expr_entry *compare_type; static inline hashval_t hash (const invariant_expr_entry *); static inline bool equal (const invariant_expr_entry *, const invariant_expr_entry *); Index: gcc/loop-iv.c =================================================================== --- gcc/loop-iv.c 2015-06-16 09:55:59.084568044 +0100 +++ gcc/loop-iv.c 2015-06-16 09:55:59.076568143 +0100 @@ -125,9 +125,8 @@ #define DF_REF_IV_SET(REF, IV) iv_ref_ta /* Hashtable helper. */ -struct biv_entry_hasher : typed_free_remove +struct biv_entry_hasher : free_ptr_hash { - typedef biv_entry *value_type; typedef rtx_def *compare_type; static inline hashval_t hash (const biv_entry *); static inline bool equal (const biv_entry *, const rtx_def *); Index: gcc/loop-unroll.c =================================================================== --- gcc/loop-unroll.c 2015-06-16 09:55:59.084568044 +0100 +++ gcc/loop-unroll.c 2015-06-16 09:55:59.076568143 +0100 @@ -113,10 +113,8 @@ struct var_to_expand /* Hashtable helper for iv_to_split. */ -struct iv_split_hasher : typed_free_remove +struct iv_split_hasher : free_ptr_hash { - typedef iv_to_split *value_type; - typedef iv_to_split *compare_type; static inline hashval_t hash (const iv_to_split *); static inline bool equal (const iv_to_split *, const iv_to_split *); }; @@ -140,10 +138,8 @@ iv_split_hasher::equal (const iv_to_spli /* Hashtable helper for iv_to_split. */ -struct var_expand_hasher : typed_free_remove +struct var_expand_hasher : free_ptr_hash { - typedef var_to_expand *value_type; - typedef var_to_expand *compare_type; static inline hashval_t hash (const var_to_expand *); static inline bool equal (const var_to_expand *, const var_to_expand *); }; Index: gcc/trans-mem.c =================================================================== --- gcc/trans-mem.c 2015-06-16 09:55:59.084568044 +0100 +++ gcc/trans-mem.c 2015-06-16 09:55:59.076568143 +0100 @@ -1033,10 +1033,8 @@ typedef struct tm_new_mem_map /* Hashtable helpers. */ -struct tm_mem_map_hasher : typed_free_remove +struct tm_mem_map_hasher : free_ptr_hash { - typedef tm_new_mem_map_t *value_type; - typedef tm_new_mem_map_t *compare_type; static inline hashval_t hash (const tm_new_mem_map_t *); static inline bool equal (const tm_new_mem_map_t *, const tm_new_mem_map_t *); }; @@ -3334,10 +3332,8 @@ typedef struct tm_memop /* TM memory operation hashtable helpers. */ -struct tm_memop_hasher : typed_free_remove +struct tm_memop_hasher : free_ptr_hash { - typedef tm_memop *value_type; - typedef tm_memop *compare_type; static inline hashval_t hash (const tm_memop *); static inline bool equal (const tm_memop *, const tm_memop *); }; Index: gcc/tree-cfg.c =================================================================== --- gcc/tree-cfg.c 2015-06-16 09:55:59.084568044 +0100 +++ gcc/tree-cfg.c 2015-06-16 09:55:59.076568143 +0100 @@ -134,10 +134,8 @@ struct locus_discrim_map /* Hashtable helpers. */ -struct locus_discrim_hasher : typed_free_remove +struct locus_discrim_hasher : free_ptr_hash { - typedef locus_discrim_map *value_type; - typedef locus_discrim_map *compare_type; static inline hashval_t hash (const locus_discrim_map *); static inline bool equal (const locus_discrim_map *, const locus_discrim_map *); Index: gcc/tree-eh.c =================================================================== --- gcc/tree-eh.c 2015-06-16 09:55:59.084568044 +0100 +++ gcc/tree-eh.c 2015-06-16 09:55:59.076568143 +0100 @@ -200,10 +200,8 @@ struct finally_tree_node /* Hashtable helpers. */ -struct finally_tree_hasher : typed_free_remove +struct finally_tree_hasher : free_ptr_hash { - typedef finally_tree_node *value_type; - typedef finally_tree_node *compare_type; static inline hashval_t hash (const finally_tree_node *); static inline bool equal (const finally_tree_node *, const finally_tree_node *); Index: gcc/tree-into-ssa.c =================================================================== --- gcc/tree-into-ssa.c 2015-06-16 09:55:59.084568044 +0100 +++ gcc/tree-into-ssa.c 2015-06-16 09:55:59.080568093 +0100 @@ -217,10 +217,8 @@ typedef struct var_info_d *var_info_p; /* VAR_INFOS hashtable helpers. */ -struct var_info_hasher : typed_free_remove +struct var_info_hasher : free_ptr_hash { - typedef var_info_d *value_type; - typedef var_info_d *compare_type; static inline hashval_t hash (const value_type &); static inline bool equal (const value_type &, const compare_type &); }; Index: gcc/tree-parloops.c =================================================================== --- gcc/tree-parloops.c 2015-06-16 09:55:59.084568044 +0100 +++ gcc/tree-parloops.c 2015-06-16 09:55:59.080568093 +0100 @@ -221,10 +221,8 @@ struct reduction_info /* Reduction info hashtable helpers. */ -struct reduction_hasher : typed_free_remove +struct reduction_hasher : free_ptr_hash { - typedef reduction_info *value_type; - typedef reduction_info *compare_type; static inline hashval_t hash (const reduction_info *); static inline bool equal (const reduction_info *, const reduction_info *); }; @@ -273,10 +271,8 @@ struct name_to_copy_elt /* Name copies hashtable helpers. */ -struct name_to_copy_hasher : typed_free_remove +struct name_to_copy_hasher : free_ptr_hash { - typedef name_to_copy_elt *value_type; - typedef name_to_copy_elt *compare_type; static inline hashval_t hash (const name_to_copy_elt *); static inline bool equal (const name_to_copy_elt *, const name_to_copy_elt *); }; Index: gcc/tree-ssa-loop-ivopts.c =================================================================== --- gcc/tree-ssa-loop-ivopts.c 2015-06-16 09:55:59.084568044 +0100 +++ gcc/tree-ssa-loop-ivopts.c 2015-06-16 09:55:59.080568093 +0100 @@ -285,10 +285,8 @@ typedef struct iv_cand *iv_cand_p; /* Hashtable helpers. */ -struct iv_inv_expr_hasher : typed_free_remove +struct iv_inv_expr_hasher : free_ptr_hash { - typedef iv_inv_expr_ent *value_type; - typedef iv_inv_expr_ent *compare_type; static inline hashval_t hash (const iv_inv_expr_ent *); static inline bool equal (const iv_inv_expr_ent *, const iv_inv_expr_ent *); }; Index: gcc/tree-ssa-phiopt.c =================================================================== --- gcc/tree-ssa-phiopt.c 2015-06-16 09:55:59.084568044 +0100 +++ gcc/tree-ssa-phiopt.c 2015-06-16 09:55:59.080568093 +0100 @@ -1315,10 +1315,8 @@ struct name_to_bb /* Hashtable helpers. */ -struct ssa_names_hasher : typed_free_remove +struct ssa_names_hasher : free_ptr_hash { - typedef name_to_bb *value_type; - typedef name_to_bb *compare_type; static inline hashval_t hash (const name_to_bb *); static inline bool equal (const name_to_bb *, const name_to_bb *); }; Index: gcc/tree-ssa-pre.c =================================================================== --- gcc/tree-ssa-pre.c 2015-06-16 09:55:59.084568044 +0100 +++ gcc/tree-ssa-pre.c 2015-06-16 09:55:59.080568093 +0100 @@ -517,7 +517,7 @@ static pool_allocator bitmap /* A three tuple {e, pred, v} used to cache phi translations in the phi_translate_table. */ -typedef struct expr_pred_trans_d : typed_free_remove +typedef struct expr_pred_trans_d : free_ptr_hash { /* The expression. */ pre_expr e; @@ -533,8 +533,6 @@ typedef struct expr_pred_trans_d : typed hashval_t hashcode; /* hash_table support. */ - typedef expr_pred_trans_d *value_type; - typedef expr_pred_trans_d *compare_type; static inline hashval_t hash (const expr_pred_trans_d *); static inline int equal (const expr_pred_trans_d *, const expr_pred_trans_d *); } *expr_pred_trans_t; Index: gcc/tree-ssa-sccvn.c =================================================================== --- gcc/tree-ssa-sccvn.c 2015-06-16 09:55:59.084568044 +0100 +++ gcc/tree-ssa-sccvn.c 2015-06-16 09:55:59.080568093 +0100 @@ -288,10 +288,8 @@ typedef struct vn_tables_s /* vn_constant hashtable helpers. */ -struct vn_constant_hasher : typed_free_remove +struct vn_constant_hasher : free_ptr_hash { - typedef vn_constant_s *value_type; - typedef vn_constant_s *compare_type; static inline hashval_t hash (const vn_constant_s *); static inline bool equal (const vn_constant_s *, const vn_constant_s *); }; Index: gcc/tree-ssa-structalias.c =================================================================== --- gcc/tree-ssa-structalias.c 2015-06-16 09:55:59.084568044 +0100 +++ gcc/tree-ssa-structalias.c 2015-06-16 09:55:59.084568044 +0100 @@ -1927,10 +1927,8 @@ typedef const struct equiv_class_label * /* Equiv_class_label hashtable helpers. */ -struct equiv_class_hasher : typed_free_remove +struct equiv_class_hasher : free_ptr_hash { - typedef equiv_class_label *value_type; - typedef equiv_class_label *compare_type; static inline hashval_t hash (const equiv_class_label *); static inline bool equal (const equiv_class_label *, const equiv_class_label *); @@ -5952,10 +5950,8 @@ typedef const struct shared_bitmap_info /* Shared_bitmap hashtable helpers. */ -struct shared_bitmap_hasher : typed_free_remove +struct shared_bitmap_hasher : free_ptr_hash { - typedef shared_bitmap_info *value_type; - typedef shared_bitmap_info *compare_type; static inline hashval_t hash (const shared_bitmap_info *); static inline bool equal (const shared_bitmap_info *, const shared_bitmap_info *); Index: gcc/tree-ssa-threadupdate.c =================================================================== --- gcc/tree-ssa-threadupdate.c 2015-06-16 09:55:59.084568044 +0100 +++ gcc/tree-ssa-threadupdate.c 2015-06-16 09:55:59.084568044 +0100 @@ -128,7 +128,7 @@ struct el may have many incoming edges threaded to the same outgoing edge. This can be naturally implemented with a hash table. */ -struct redirection_data : typed_free_remove +struct redirection_data : free_ptr_hash { /* We support wiring up two block duplicates in a jump threading path. @@ -153,8 +153,6 @@ struct redirection_data : typed_free_rem struct el *incoming_edges; /* hash_table support. */ - typedef redirection_data *value_type; - typedef redirection_data *compare_type; static inline hashval_t hash (const redirection_data *); static inline int equal (const redirection_data *, const redirection_data *); }; Index: gcc/tree-vectorizer.h =================================================================== --- gcc/tree-vectorizer.h 2015-06-16 09:55:59.084568044 +0100 +++ gcc/tree-vectorizer.h 2015-06-16 09:55:59.084568044 +0100 @@ -212,10 +212,8 @@ typedef struct _vect_peel_extended_info /* Peeling hashtable helpers. */ -struct peel_info_hasher : typed_free_remove <_vect_peel_info> +struct peel_info_hasher : free_ptr_hash <_vect_peel_info> { - typedef _vect_peel_info *value_type; - typedef _vect_peel_info *compare_type; static inline hashval_t hash (const _vect_peel_info *); static inline bool equal (const _vect_peel_info *, const _vect_peel_info *); }; Index: gcc/tree-vectorizer.c =================================================================== --- gcc/tree-vectorizer.c 2015-06-16 09:55:59.084568044 +0100 +++ gcc/tree-vectorizer.c 2015-06-16 09:55:59.084568044 +0100 @@ -105,14 +105,12 @@ Software Foundation; either version 3, o /* For mapping simduid to vectorization factor. */ -struct simduid_to_vf : typed_free_remove +struct simduid_to_vf : free_ptr_hash { unsigned int simduid; int vf; /* hash_table support. */ - typedef simduid_to_vf *value_type; - typedef simduid_to_vf *compare_type; static inline hashval_t hash (const simduid_to_vf *); static inline int equal (const simduid_to_vf *, const simduid_to_vf *); }; @@ -141,14 +139,12 @@ simduid_to_vf::equal (const simduid_to_v This hash maps from the OMP simd array (D.1737[]) to DECL_UID of simduid.0. */ -struct simd_array_to_simduid : typed_free_remove +struct simd_array_to_simduid : free_ptr_hash { tree decl; unsigned int simduid; /* hash_table support. */ - typedef simd_array_to_simduid *value_type; - typedef simd_array_to_simduid *compare_type; static inline hashval_t hash (const simd_array_to_simduid *); static inline int equal (const simd_array_to_simduid *, const simd_array_to_simduid *); Index: gcc/config/mips/mips.c =================================================================== --- gcc/config/mips/mips.c 2015-06-16 09:55:59.084568044 +0100 +++ gcc/config/mips/mips.c 2015-06-16 09:55:59.068568237 +0100 @@ -16350,9 +16350,8 @@ mips_hash_base (rtx base) /* Hashtable helpers. */ -struct mips_lo_sum_offset_hasher : typed_free_remove +struct mips_lo_sum_offset_hasher : free_ptr_hash { - typedef mips_lo_sum_offset *value_type; typedef rtx_def *compare_type; static inline hashval_t hash (const mips_lo_sum_offset *); static inline bool equal (const mips_lo_sum_offset *, const rtx_def *); Index: libcc1/plugin.cc =================================================================== --- libcc1/plugin.cc 2015-06-16 09:55:59.084568044 +0100 +++ libcc1/plugin.cc 2015-06-16 09:55:59.084568044 +0100 @@ -111,11 +111,8 @@ struct decl_addr_value tree address; }; -struct decl_addr_hasher : typed_free_remove +struct decl_addr_hasher : free_ptr_hash { - typedef decl_addr_value *value_type; - typedef decl_addr_value *compare_type; - static inline hashval_t hash (const decl_addr_value *); static inline bool equal (const decl_addr_value *, const decl_addr_value *); };