X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fadt%2Fbitset_std.h;h=101c9dc235ca3a31a06df004d125076e36237b92;hb=00aca144882030833111974e71c0baaf0e0fd910;hp=18cd422421d74ced02b878b62677142de942d875;hpb=974215da1a935f250766874d0f7a7ddfa34bc4ef;p=libfirm diff --git a/ir/adt/bitset_std.h b/ir/adt/bitset_std.h index 18cd42242..101c9dc23 100644 --- a/ir/adt/bitset_std.h +++ b/ir/adt/bitset_std.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved. + * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. * * This file is part of libFirm. * @@ -33,36 +33,6 @@ typedef unsigned int bitset_unit_t; #define BITSET_UNIT_FMT "%0x" #define BITSET_UNIT_ALL_ONE ((unsigned int) -1) -/** - * Units needed for a given highest bit. - * This implementation always allocates units in a multiple of 16 bytes. - * @param size The size of the bitset in bits. - * @return The number of units needed. - */ -#define _bitset_units(size) (round_up2(size, BS_UNIT_SIZE_BITS) / BS_UNIT_SIZE_BITS) - -/** - * Compute the size in bytes needed for a bitseti, overall. - * This also include the size for the bitset data structure. - * This implementation computes the size in wat, that the bitset units - * can be aligned to 16 bytes. - * @param size The size of the bitset in bits. - * @return The overall amount of bytes needed for that bitset. - */ -#define _bitset_overall_size(bitset_base_size,size) \ - (bitset_base_size + _bitset_units(size) * BS_UNIT_SIZE) - -/** - * calculate the pointer to the data space of the bitset. - * @param data The base address of the allocated memory - * @param bitset_base_size The size of the basical bitset data structure - * which has to be taken into account. - * @param size The size of the bitset in bits. - */ -#define _bitset_data_ptr(data,bitset_base_size,size) \ - ((bitset_unit_t *) ((char *) data + bitset_base_size)) - - /** * Clear some units from a certain address on. * @param addr The address from where to clear. @@ -112,7 +82,7 @@ typedef unsigned int bitset_unit_t; * @return The Number of leading zeroes. */ #define _bitset_inside_ntz(unit_ptr) _bitset_std_inside_ntz(unit_ptr) -static INLINE unsigned _bitset_std_inside_ntz(bitset_unit_t *unit_ptr) +static inline unsigned _bitset_std_inside_ntz(bitset_unit_t *unit_ptr) { unsigned long data = *unit_ptr; return 32 - (unsigned) nlz(~data & (data - 1));