Re: [cxx-conversion] Convert tree-sra.c'candidates to hash_table

2012-12-16 Thread Lawrence Crowl
On 12/13/12, Martin Jambor wrote: > On Thu, Dec 13, 2012 at 11:05:49AM -0800, Lawrence Crowl wrote: > > On 12/12/12, Jakub Jelinek wrote: > > > On Tue, Dec 11, 2012 at 02:44:41PM -0800, Lawrence Crowl wrote: > > > > +/* Hash a tree in a uid_decl_map. */ > > > > + > > > > +inline hashval_t > > >

Re: [cxx-conversion] Convert tree-sra.c'candidates to hash_table

2012-12-13 Thread Martin Jambor
Hi, On Thu, Dec 13, 2012 at 11:05:49AM -0800, Lawrence Crowl wrote: > On 12/12/12, Jakub Jelinek wrote: > > On Tue, Dec 11, 2012 at 02:44:41PM -0800, Lawrence Crowl wrote: > > > +/* Hash a tree in a uid_decl_map. */ > > > + > > > +inline hashval_t > > > +uid_decl_hasher::hash (const value_type *

Re: [cxx-conversion] Convert tree-sra.c'candidates to hash_table

2012-12-13 Thread Lawrence Crowl
On 12/12/12, Jakub Jelinek wrote: > On Tue, Dec 11, 2012 at 02:44:41PM -0800, Lawrence Crowl wrote: > > +/* Hash a tree in a uid_decl_map. */ > > + > > +inline hashval_t > > +uid_decl_hasher::hash (const value_type *item) > > +{ > > + return item->decl_minimal.uid; > > Ugh, why aren't you using

Re: [cxx-conversion] Convert tree-sra.c'candidates to hash_table

2012-12-12 Thread Jakub Jelinek
On Tue, Dec 11, 2012 at 02:44:41PM -0800, Lawrence Crowl wrote: > +/* Hash a tree in a uid_decl_map. */ > + > +inline hashval_t > +uid_decl_hasher::hash (const value_type *item) > +{ > + return item->decl_minimal.uid; Ugh, why aren't you using DECL_UID here? The fact that DECL_UID is right now

Re: [cxx-conversion] Convert tree-sra.c'candidates to hash_table

2012-12-12 Thread Lawrence Crowl
On 12/12/12, Diego Novillo wrote: > On Dec 11, 2012 Lawrence Crowl wrote: > > Convert tree-sra.c'candidates from htab_t to hash_table. > > > > Fold uid_decl_map_hash and uid_decl_map_eq into new struct > > uid_decl_hasher. This change moves the definitions from tree-ssa.c > > into tree-sra.c and

Re: [cxx-conversion] Convert tree-sra.c'candidates to hash_table

2012-12-12 Thread Diego Novillo
On Tue, Dec 11, 2012 at 5:44 PM, Lawrence Crowl wrote: > Convert tree-sra.c'candidates from htab_t to hash_table. > > Fold uid_decl_map_hash and uid_decl_map_eq into new struct > uid_decl_hasher. This change moves the definitions from tree-ssa.c > into tree-sra.c and removes the declarations from