+2007-09-05 Jan Hubicka <jh@suse.cz>
+
+ * optabs.c (libfunc_entry): Change optab to integer.
+ (hash_libfunc, convert_optab_libfunc, optab_libfunc,
+ set_optab_libfunc, set_conv_libfunc): Use optable indexes instead
+ of pointers for hashing.
+
2007-09-05 Jan Hubicka <jh@suse.cz>
* regrename.c (pass_regrename, pass_cprop_hardreg): Add RTL sharing
optab. In the first case mode2 is unused. */
struct libfunc_entry GTY(())
{
- void * GTY((skip)) optab;
+ size_t optab;
enum machine_mode mode1, mode2;
rtx libfunc;
};
const struct libfunc_entry *const e = (const struct libfunc_entry *) p;
return (((int) e->mode1 + (int) e->mode2 * NUM_MACHINE_MODES)
- ^ htab_hash_pointer (e->optab));
+ ^ e->optab);
}
/* Used for optab_hash. */
struct libfunc_entry e;
struct libfunc_entry **slot;
- e.optab = optab;
+ e.optab = (size_t) (convert_optab_table[0] - optab);
e.mode1 = mode1;
e.mode2 = mode2;
slot = (struct libfunc_entry **) htab_find_slot (libfunc_hash, &e, NO_INSERT);
struct libfunc_entry e;
struct libfunc_entry **slot;
- e.optab = optab;
+ e.optab = (size_t) (optab_table[0] - optab);
e.mode1 = mode;
e.mode2 = VOIDmode;
slot = (struct libfunc_entry **) htab_find_slot (libfunc_hash, &e, NO_INSERT);
rtx val;
struct libfunc_entry e;
struct libfunc_entry **slot;
- e.optab = optable;
+ e.optab = (size_t) (optab_table[0] - optable);
e.mode1 = mode;
e.mode2 = VOIDmode;
slot = (struct libfunc_entry **) htab_find_slot (libfunc_hash, &e, INSERT);
if (*slot == NULL)
*slot = ggc_alloc (sizeof (struct libfunc_entry));
- (*slot)->optab = optable;
+ (*slot)->optab = (size_t) (optab_table[0] - optable);
(*slot)->mode1 = mode;
(*slot)->mode2 = VOIDmode;
(*slot)->libfunc = val;
rtx val;
struct libfunc_entry e;
struct libfunc_entry **slot;
- e.optab = optable;
+ e.optab = (size_t) (convert_optab_table[0] - optable);
e.mode1 = tmode;
e.mode2 = fmode;
slot = (struct libfunc_entry **) htab_find_slot (libfunc_hash, &e, INSERT);
if (*slot == NULL)
*slot = ggc_alloc (sizeof (struct libfunc_entry));
- (*slot)->optab = optable;
+ (*slot)->optab = (size_t) (convert_optab_table[0] - optable);
(*slot)->mode1 = tmode;
(*slot)->mode2 = fmode;
(*slot)->libfunc = val;