Commit 89355204 authored by Matthias Braun's avatar Matthias Braun
Browse files

remove DEBUG defines from set/pset

They were inconsistent with DEBUG_libfirm and unused
parent 2fdf6f3b
......@@ -237,23 +237,6 @@ void pset_stats (pset *pset);
# define pset_stats(s) ((void)0)
#endif
#ifdef DEBUG
/**
* Describe a pset.
*
* Writes a description of a set to stdout. The description includes:
* - a header telling how many elements (nkey) and segments (nseg) are in use
* - for every collision chain the number of element with its hash values
*
* @param pset the pset
*/
void pset_describe (pset *pset);
#endif
/* @@@ NYI */
#define PSET_VRFY(pset) (void)0
/* Private */
typedef enum { _pset_find, _pset_insert, _pset_hinsert } _pset_action;
......
......@@ -215,20 +215,6 @@ void set_stats (set *set);
# define set_stats(s) ((void)0)
#endif
#ifdef DEBUG
/**
* Describe a set.
*
* Writes a description of a set to stdout. The description includes:
* - a header telling how many elements (nkey) and segments (nseg) are in use
* - for every collision chain the number of element with its hash values
*
* @param set the set
*/
FIRM_API void set_describe(set *set);
#endif
/* Private */
typedef enum { _set_find, _set_insert, _set_hinsert, _set_hinsert0 } _set_action;
......
......@@ -106,9 +106,6 @@ struct SET {
size_t naccess, ncollision, ndups;
size_t max_chain_len;
#endif
#ifdef DEBUG
const char *tag; /**< an optionally tag for distinguishing sets */
#endif
};
......@@ -142,41 +139,6 @@ static inline void stat_chain_len(SET *table, size_t chain_len)
#endif /* !STATS */
#ifdef DEBUG
const char *MANGLEP(tag);
void MANGLEP(describe) (SET *table)
{
size_t i, j, collide;
Element *ptr;
Segment *seg;
lc_printf("p=%zu maxp=%zu nkey=%zu nseg=%zu\n",
table->p, table->maxp, table->nkey, table->nseg);
for (i = 0; i < table->nseg; i++) {
seg = table->dir[i];
for (j = 0; j < SEGMENT_SIZE; j++) {
collide = 0;
ptr = seg[j];
while (ptr) {
if (collide) lc_printf("<%3zu>", collide);
else printf ("table");
lc_printf("[%zd][%3zd]: %u %p\n", i, j, ptr->entry.hash, (void *)ptr->entry.dptr);
ptr = ptr->chain;
++collide;
}
}
}
#ifdef STATS
MANGLEP(stats)(table);
#endif
}
#endif /* !DEBUG */
SET *(PMANGLE(new)) (MANGLEP(cmp_fun) cmp, size_t nslots)
{
SET *table = XMALLOC(SET);
......@@ -209,9 +171,6 @@ SET *(PMANGLE(new)) (MANGLEP(cmp_fun) cmp, size_t nslots)
#ifdef STATS
table->naccess = table->ncollision = table->ndups = 0;
table->max_chain_len = 0;
#endif
#ifdef DEBUG
table->tag = MANGLEP(tag);
#endif
return table;
}
......@@ -219,9 +178,6 @@ SET *(PMANGLE(new)) (MANGLEP(cmp_fun) cmp, size_t nslots)
void PMANGLE(del) (SET *table)
{
#ifdef DEBUG
MANGLEP(tag) = table->tag;
#endif
obstack_free (&table->obst, NULL);
xfree (table);
}
......@@ -393,9 +349,6 @@ void * MANGLE(_,_search) (SET *table,
assert (table);
assert (key);
#ifdef DEBUG
MANGLEP(tag) = table->tag;
#endif
stat_access (table);
/* Find collision chain */
......
......@@ -802,9 +802,6 @@ struct pset {
int naccess, ncollision, ndups;
int max_chain_len;
#endif
#ifdef DEBUG
const char *tag; /**< an optionally tag for distinguishing sets */
#endif
};
typedef struct set_element {
......@@ -827,9 +824,6 @@ struct set {
int naccess, ncollision, ndups;
int max_chain_len;
#endif
#ifdef DEBUG
const char *tag; /**< an optionally tag for distinguishing sets */
#endif
};
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment