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]

Re: Patch: cse "library" routines


> I'm not quite sure I understand this.  Why would you not
> want to compare two things of the same type?  It seems like
> a very good way to get confused.
> 
> > ... and the two _with_hash variants of
> > htab_find and htab_find_slot (to avoid calling hashfn on the second argument
> > of the equality test which no longer needs to be an entry).
> 
> And since you've now got the hash value stored in the cselib_val,
> why do you need the _with_hash variants?  You've all but eliminated
> the cost of "computing" the value.

Before creating a new cselib_val, I need to find whether there's already one
that is equal to a given rtx (i.e. it has a location for which
rtx_equal_for_cselib_p returns 1 if compared to the given rtx).  This is a
comparison of cselib_val against rtx.  I'd have to make up a dummy cselib_val
to store the rtx into to avoid that; in that case I could also store the hash
value in the dummy, but I thought that kind of thing was too ugly.

Bernd


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