This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch: cse "library" routines
- To: Bernd Schmidt <bernds at balti dot cygnus dot co dot uk>
- Subject: Re: Patch: cse "library" routines
- From: Richard Henderson <rth at cygnus dot com>
- Date: Mon, 13 Mar 2000 23:49:51 -0800
- Cc: gcc-patches at gcc dot gnu dot org
- References: <20000311114222.A3910@cygnus.com> <Pine.LNX.4.10.10003131500020.22173-100000@balti.cygnus.co.uk>
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~