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


On Mon, Mar 13, 2000 at 03:19:35PM +0000, Bernd Schmidt wrote:
> Here's a new version.  I had to modify a few things in hashtab.c to get it
> to do what I want.  The main point of the changes is to allow using an
> equality test that takes two arguments of different type; the first one
> being an entry in the hash table, and the second one something arbitrary.

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.



r~

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