[PATCH] Bitset patch update
Michael Hayes
m.hayes@elec.canterbury.ac.nz
Sat May 25 23:11:00 GMT 2002
OK, here's my next attempt. The changes to the interface are:
1) BITSET_EXECUTE is replaced with BITSET_FOR_EACH
2) BITSET_EXECUTE_REVERSE is replaced with BITSET_FOR_EACH_REVERSE
3) bitset_stats_init is replaced with bitset_stats_enable
The first two make use of Zack's suggestion to avoid passing code as a
macro argument.
Bitset statistics gathering is now controlled at run-time using
bitset_stats_enable/bitset_stats_disable. I implemented this by
creating a new bitset implementation that is a wrapper for the other
bitset implementations. Thus we get no run-time penalty if
statisitics logging is disabled and as a bonus we get bitset cache
statistics and run-time checking of bitset compatibility.
I would still appreciate further comments how the interface can be
improved, for example, in terms of consistency and completeness.
One thing that I'm unsure of is whether I should ditch the routines
that allow creation of a bitset on an obstack. I only implemented
this since the gcc regset routines use obstacks. Does anyone know the
rationale why gcc regsets use obstacks? Was this an attempt to reduce
the malloc overhead or a poor man's garbage collector?
Michael.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bitset.patch.gz
Type: application/octet-stream
Size: 23844 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20020525/4a3ef995/attachment.obj>
More information about the Gcc-patches
mailing list