This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Bitset patch update



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.

Attachment: bitset.patch.gz
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]