From 515a17919798a2c9597b2cf02660b9b07afd3fc4 Mon Sep 17 00:00:00 2001 From: Ben Elliston Date: Mon, 22 Nov 2004 22:15:13 +0000 Subject: [PATCH] pointer-set.h (pointer_set_contains): Remove. * pointer-set.h (pointer_set_contains): Remove. * pointer-set.c (pointer_set_contains): Likewise. From-SVN: r91040 --- gcc/ChangeLog | 5 +++++ gcc/pointer-set.c | 25 ------------------------- gcc/pointer-set.h | 1 - 3 files changed, 5 insertions(+), 26 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8672db8ddc1..00c3d5a0405 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-11-23 Ben Elliston + + * pointer-set.h (pointer_set_contains): Remove. + * pointer-set.c (pointer_set_contains): Likewise. + 2004-11-22 Dale Johannesen * calls.c (expand_call): Do not call preserve_temp_slots. diff --git a/gcc/pointer-set.c b/gcc/pointer-set.c index b0f04ff3aa3..3f79cc2bfa7 100644 --- a/gcc/pointer-set.c +++ b/gcc/pointer-set.c @@ -90,31 +90,6 @@ void pointer_set_destroy (struct pointer_set_t *pset) XDELETE (pset); } -/* Returns nonzero if PSET contains P. P must be nonnull. - - Collisions are resolved by linear probing. More complicated - collision management schemes are only useful when the load factor - significantly exceeds 0.5, and we never let that happen. */ -int -pointer_set_contains (struct pointer_set_t *pset, void *p) -{ - size_t n = hash1 (p, pset->n_slots, pset->log_slots); - - while (true) - { - if (pset->slots[n] == p) - return 1; - else if (pset->slots[n] == 0) - return 0; - else - { - ++n; - if (n == pset->n_slots) - n = 0; - } - } -} - /* Subroutine of pointer_set_insert. Inserts P into an empty element of SLOTS, an array of length N_SLOTS. Returns nonzero if P was already present in N_SLOTS. */ diff --git a/gcc/pointer-set.h b/gcc/pointer-set.h index 65ac9ee4724..3c2be390daf 100644 --- a/gcc/pointer-set.h +++ b/gcc/pointer-set.h @@ -26,7 +26,6 @@ struct pointer_set_t; struct pointer_set_t *pointer_set_create (void); void pointer_set_destroy (struct pointer_set_t *pset); -int pointer_set_contains (struct pointer_set_t *pset, void *p); int pointer_set_insert (struct pointer_set_t *pset, void *p); #endif /* POINTER_SET_H */