[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bitsets

From: Zack Weinberg
Subject: Re: Bitsets
Date: Tue, 10 Jun 2003 12:43:06 -0700
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

Michael Hayes <address@hidden> writes:

> I have attached a new version of a bitset library for review.  The
> goal is to replace the sbitmap and bitmap routines used in GCC with a
> common interface that will support multiple bitset implementations.

I don't see anything wrong with the basic concept, and I think the
current vtable dispatch mechanism is fine.  Michael Matz's concerns
about performance are going to be easier to address once this is in
the tree.

I do want to see some pretty hefty rearranging of the code before it
goes in, however:

current name                    suggested new name

libbitset/bitset.h              include/bitset.h
libbitset/bitset_stats.h        include/bitset_stats.h
libbitset/bitsetv.h             include/bitset_vec.h
libbitset/bbitset.h             include/bitset_private.h

libbitset/abitset.h             }
libbitset/ebitset.h             } combine into one file,
libbitset/lbitset.h             } libdata/bitset/impl.h
libbitset/vbitset.h             }

libbitset/abitset.c             libdata/bitset/i-array.c
libbitset/ebitset.c             libdata/bitset/i-table.c
libbitset/lbitset.c             libdata/bitset/i-list.c
libbitset/vbitset.c             libdata/bitset/i-varray.c

libbitset/bitset.c              libdata/bitset/dispatch.c
libbitset/bitset_stats.c        libdata/bitset/stats.c
libbitset/bitsetv.c             libdata/bitset/vectors.c

libbitset/libbitset.texi        libdata/doc/bitset.texi  (bitset-specific)
                                libdata/doc/libdata.texi (other)

libbitset/           libdata/
libbitset/          libdata/
libbitset/           libdata/
libbitset/configure             libdata/configure

libbitset/libiberty.h           (delete)

This gives us a 'data structure' library directory which can be used
for future generic data structures; it also makes the file names quite
a bit less cryptic.  Please do not put a Makefile in libdata/bitset;
use nonrecursive make techniques.

Putting the headers in the top-level include/ directory means the GCC
makefiles don't need to change in order to pick them up.  However, if
other people think that's a bad idea, they can be put in
libdata/include instead.

It would be nice if the documentation were complete, but I don't think
that should block you from checking this stuff in.  Please do,
however, split up the existing libbitset.texi so that when new data
structures are added they can just drop another .texi file alongside.

You'll also need to submit a patch to the top level Makefile to get
this built -- it needs to be built both for the host and the build
machines, just like libiberty.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]