This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Speedup iterative_hash_expr


> On Thu, Sep 02, 2004 at 08:41:54PM +0200, Jan Hubicka wrote:
> > + /* Produce good hash value combining VAL and VAL2.  */
> > + static inline hashval_t
> > + #ifdef __STDC__
> > + iterative_hash_hashval_t (hashval_t val, hashval_t val2)
> > + #else
> > + iterative_hash_hashval_t (val, val2)
> > +      hashval_t val, val2;
> > + #endif
> 
> I think you should not provide these inline unless "inline" 
> is actually supported, meaning GCC or C++.
> 
> > + #ifdef HOST_WIDE_INT
> 
> I *really* do not like this.  libiberty should not be
> referring to HWI at all.

Well, me neither but...
> 
> Why don't you just put these in tree.c with the other
> iterative hash bits and be done with it?

... it seemed that it might be usefull in other cases too.  For example
CSE cannon_hash needs similar tricks but uses + for merging instead.
I am not sure if those sophisficated merging functions actually makes
any difference tought and I will be happy to put it in tree.c as the
hashtable.h way is ineed particularly ugly.

Honza
> 
> 
> 
> r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]