Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
89355204
Commit
89355204
authored
Dec 12, 2011
by
Matthias Braun
Browse files
remove DEBUG defines from set/pset
They were inconsistent with DEBUG_libfirm and unused
parent
2fdf6f3b
Changes
4
Hide whitespace changes
Inline
Side-by-side
include/libfirm/adt/pset.h
View file @
89355204
...
...
@@ -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
;
...
...
include/libfirm/adt/set.h
View file @
89355204
...
...
@@ -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
;
...
...
ir/adt/set.c
View file @
89355204
...
...
@@ -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 */
...
...
win32/firmEvaluator/firm.c
View file @
89355204
...
...
@@ -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
};
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment