[PATCH 2/2] remove val_ssa_equiv_hash_traits

Richard Biener rguenther@suse.de
Tue Nov 24 08:36:00 GMT 2015


On Mon, 23 Nov 2015, tbsaunde+gcc@tbsaunde.org wrote:

> From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
> 
> Hi,
> 
> this is pretty trivial cleanup after the previous patch, but could wait for
> next stage 1 if people don't like the very small risk.
> 
> boostrappped + regtested on x86_64-linux-gnu, ok?

Ok.

Thanks,
RIchard.

> Trev
> 
> gcc/ChangeLog:
> 
> 2015-11-20  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
> 
> 	* tree-ssa-uncprop.c (struct val_ssa_equiv_hash_traits): Remove.
> 	(val_ssa_equiv_hash_traits::remove): Likewise.
> 	(pass_uncprop::execute): Adjust.
> ---
>  gcc/tree-ssa-uncprop.c | 22 ++--------------------
>  1 file changed, 2 insertions(+), 20 deletions(-)
> 
> diff --git a/gcc/tree-ssa-uncprop.c b/gcc/tree-ssa-uncprop.c
> index 23b4ca2..a60184e 100644
> --- a/gcc/tree-ssa-uncprop.c
> +++ b/gcc/tree-ssa-uncprop.c
> @@ -275,27 +275,10 @@ struct equiv_hash_elt
>    vec<tree> equivalences;
>  };
>  
> -/* Value to ssa name equivalence hashtable helpers.  */
> -
> -struct val_ssa_equiv_hash_traits : simple_hashmap_traits <tree_operand_hash,
> -							  vec<tree> >
> -{
> -  template<typename T> static inline void remove (T &);
> -};
> -
> -/* Free an instance of equiv_hash_elt.  */
> -
> -template<typename T>
> -inline void
> -val_ssa_equiv_hash_traits::remove (T &elt)
> -{
> -  elt.m_value.release ();
> -}
> -
>  /* Global hash table implementing a mapping from invariant values
>     to a list of SSA_NAMEs which have the same value.  We might be
>     able to reuse tree-vn for this code.  */
> -static hash_map<tree, vec<tree>, val_ssa_equiv_hash_traits> *val_ssa_equiv;
> +static hash_map<tree, auto_vec<tree> > *val_ssa_equiv;
>  
>  static void uncprop_into_successor_phis (basic_block);
>  
> @@ -518,8 +501,7 @@ pass_uncprop::execute (function *fun)
>    associate_equivalences_with_edges ();
>  
>    /* Create our global data structures.  */
> -  val_ssa_equiv
> -    = new hash_map<tree, vec<tree>, val_ssa_equiv_hash_traits> (1024);
> +  val_ssa_equiv = new hash_map<tree, auto_vec<tree> > (1024);
>  
>    /* We're going to do a dominator walk, so ensure that we have
>       dominance information.  */
> 

-- 
Richard Biener <rguenther@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)



More information about the Gcc-patches mailing list