diff options
author | aj <aj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-06 12:35:56 +0000 |
---|---|---|
committer | aj <aj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-06 12:35:56 +0000 |
commit | 60b8c5b34ab84501de6a513517a9e78e3e2c4d00 (patch) | |
tree | 2e1f352052c069dc89b540d510fb95d6fac245ed /gcc/sbitmap.c | |
parent | 3b2e396d1023315f275d04017792c60e5c5ff4cd (diff) | |
download | gcc-60b8c5b34ab84501de6a513517a9e78e3e2c4d00.tar.gz |
* sbitmap.c: Convert prototypes to ISO C90.
* sbitmap.h: Likewise.
* scan-decls.c: Likewise.
* scan.c: Likewise.
* sched-deps.c: Likewise.
* sched-ebb.c: Likewise.
* sched-int.h: Likewise.
* sched-rgn.c: Likewise.
* sched-vis.c: Likewise.
* sibcall.c: Likewise.
* simplify-rtx.c: Likewise.
* sreal.c: Likewise.
* sreal.h: Likewise.
* ssa-ccp.c: Likewise.
* ssa-dce.c: Likewise.
* ssa.c: Likewise.
* ssa.h: Likewise.
* stack.h: Likewise.
* stmt.c: Likewise.
* stor-layout.c: Likewise.
* stringpool.c: Likewise.
* target.h: Likewise.
* timevar.c: Likewise.
* timevar.h: Likewise.
* tlink.c: Likewise.
* tracer.c: Likewise.
* tree-inline.c: Likewise.
* tree-inline.h: Likewise.
* tree.c: Likewise.
* tree.h: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69002 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sbitmap.c')
-rw-r--r-- | gcc/sbitmap.c | 122 |
1 files changed, 36 insertions, 86 deletions
diff --git a/gcc/sbitmap.c b/gcc/sbitmap.c index 2c4ac155a92..508eca3eabe 100644 --- a/gcc/sbitmap.c +++ b/gcc/sbitmap.c @@ -32,8 +32,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA /* Allocate a simple bitmap of N_ELMS bits. */ sbitmap -sbitmap_alloc (n_elms) - unsigned int n_elms; +sbitmap_alloc (unsigned int n_elms) { unsigned int bytes, size, amt; sbitmap bmap; @@ -54,10 +53,7 @@ sbitmap_alloc (n_elms) is zero, and set them to one otherwise. */ sbitmap -sbitmap_resize (bmap, n_elms, def) - sbitmap bmap; - unsigned int n_elms; - int def; +sbitmap_resize (sbitmap bmap, unsigned int n_elms, int def) { unsigned int bytes, size, amt; unsigned int last_bit; @@ -110,8 +106,7 @@ sbitmap_resize (bmap, n_elms, def) /* Allocate a vector of N_VECS bitmaps of N_ELMS bits. */ sbitmap * -sbitmap_vector_alloc (n_vecs, n_elms) - unsigned int n_vecs, n_elms; +sbitmap_vector_alloc (unsigned int n_vecs, unsigned int n_elms) { unsigned int i, bytes, offset, elm_bytes, size, amt, vector_bytes; sbitmap *bitmap_vector; @@ -153,16 +148,14 @@ sbitmap_vector_alloc (n_vecs, n_elms) /* Copy sbitmap SRC to DST. */ void -sbitmap_copy (dst, src) - sbitmap dst, src; +sbitmap_copy (sbitmap dst, sbitmap src) { memcpy (dst->elms, src->elms, sizeof (SBITMAP_ELT_TYPE) * dst->size); } /* Determine if a == b. */ int -sbitmap_equal (a, b) - sbitmap a, b; +sbitmap_equal (sbitmap a, sbitmap b) { return !memcmp (a->elms, b->elms, sizeof (SBITMAP_ELT_TYPE) * a->size); } @@ -170,8 +163,7 @@ sbitmap_equal (a, b) /* Zero all elements in a bitmap. */ void -sbitmap_zero (bmap) - sbitmap bmap; +sbitmap_zero (sbitmap bmap) { memset (bmap->elms, 0, bmap->bytes); } @@ -179,8 +171,7 @@ sbitmap_zero (bmap) /* Set all elements in a bitmap to ones. */ void -sbitmap_ones (bmap) - sbitmap bmap; +sbitmap_ones (sbitmap bmap) { unsigned int last_bit; @@ -195,9 +186,7 @@ sbitmap_ones (bmap) /* Zero a vector of N_VECS bitmaps. */ void -sbitmap_vector_zero (bmap, n_vecs) - sbitmap *bmap; - unsigned int n_vecs; +sbitmap_vector_zero (sbitmap *bmap, unsigned int n_vecs) { unsigned int i; @@ -208,9 +197,7 @@ sbitmap_vector_zero (bmap, n_vecs) /* Set a vector of N_VECS bitmaps to ones. */ void -sbitmap_vector_ones (bmap, n_vecs) - sbitmap *bmap; - unsigned int n_vecs; +sbitmap_vector_ones (sbitmap *bmap, unsigned int n_vecs) { unsigned int i; @@ -223,8 +210,7 @@ sbitmap_vector_ones (bmap, n_vecs) Returns true if any change is made. */ bool -sbitmap_union_of_diff_cg (dst, a, b, c) - sbitmap dst, a, b, c; +sbitmap_union_of_diff_cg (sbitmap dst, sbitmap a, sbitmap b, sbitmap c) { unsigned int i, n = dst->size; sbitmap_ptr dstp = dst->elms; @@ -244,8 +230,7 @@ sbitmap_union_of_diff_cg (dst, a, b, c) } void -sbitmap_union_of_diff (dst, a, b, c) - sbitmap dst, a, b, c; +sbitmap_union_of_diff (sbitmap dst, sbitmap a, sbitmap b, sbitmap c) { unsigned int i, n = dst->size; sbitmap_ptr dstp = dst->elms; @@ -260,8 +245,7 @@ sbitmap_union_of_diff (dst, a, b, c) /* Set bitmap DST to the bitwise negation of the bitmap SRC. */ void -sbitmap_not (dst, src) - sbitmap dst, src; +sbitmap_not (sbitmap dst, sbitmap src) { unsigned int i, n = dst->size; sbitmap_ptr dstp = dst->elms; @@ -275,15 +259,14 @@ sbitmap_not (dst, src) in A and the bits in B. i.e. dst = a & (~b). */ void -sbitmap_difference (dst, a, b) - sbitmap dst, a, b; +sbitmap_difference (sbitmap dst, sbitmap a, sbitmap b) { unsigned int i, dst_size = dst->size; unsigned int min_size = dst->size; sbitmap_ptr dstp = dst->elms; sbitmap_ptr ap = a->elms; sbitmap_ptr bp = b->elms; - + /* A should be at least as large as DEST, to have a defined source. */ if (a->size < dst_size) abort (); @@ -304,8 +287,7 @@ sbitmap_difference (dst, a, b) Return nonzero if any change is made. */ bool -sbitmap_a_and_b_cg (dst, a, b) - sbitmap dst, a, b; +sbitmap_a_and_b_cg (sbitmap dst, sbitmap a, sbitmap b) { unsigned int i, n = dst->size; sbitmap_ptr dstp = dst->elms; @@ -324,8 +306,7 @@ sbitmap_a_and_b_cg (dst, a, b) } void -sbitmap_a_and_b (dst, a, b) - sbitmap dst, a, b; +sbitmap_a_and_b (sbitmap dst, sbitmap a, sbitmap b) { unsigned int i, n = dst->size; sbitmap_ptr dstp = dst->elms; @@ -340,8 +321,7 @@ sbitmap_a_and_b (dst, a, b) Return nonzero if any change is made. */ bool -sbitmap_a_xor_b_cg (dst, a, b) - sbitmap dst, a, b; +sbitmap_a_xor_b_cg (sbitmap dst, sbitmap a, sbitmap b) { unsigned int i, n = dst->size; sbitmap_ptr dstp = dst->elms; @@ -360,8 +340,7 @@ sbitmap_a_xor_b_cg (dst, a, b) } void -sbitmap_a_xor_b (dst, a, b) - sbitmap dst, a, b; +sbitmap_a_xor_b (sbitmap dst, sbitmap a, sbitmap b) { unsigned int i, n = dst->size; sbitmap_ptr dstp = dst->elms; @@ -376,8 +355,7 @@ sbitmap_a_xor_b (dst, a, b) Return nonzero if any change is made. */ bool -sbitmap_a_or_b_cg (dst, a, b) - sbitmap dst, a, b; +sbitmap_a_or_b_cg (sbitmap dst, sbitmap a, sbitmap b) { unsigned int i, n = dst->size; sbitmap_ptr dstp = dst->elms; @@ -396,8 +374,7 @@ sbitmap_a_or_b_cg (dst, a, b) } void -sbitmap_a_or_b (dst, a, b) - sbitmap dst, a, b; +sbitmap_a_or_b (sbitmap dst, sbitmap a, sbitmap b) { unsigned int i, n = dst->size; sbitmap_ptr dstp = dst->elms; @@ -411,8 +388,7 @@ sbitmap_a_or_b (dst, a, b) /* Return nonzero if A is a subset of B. */ bool -sbitmap_a_subset_b_p (a, b) - sbitmap a, b; +sbitmap_a_subset_b_p (sbitmap a, sbitmap b) { unsigned int i, n = a->size; sbitmap_ptr ap, bp; @@ -428,8 +404,7 @@ sbitmap_a_subset_b_p (a, b) Return nonzero if any change is made. */ bool -sbitmap_a_or_b_and_c_cg (dst, a, b, c) - sbitmap dst, a, b, c; +sbitmap_a_or_b_and_c_cg (sbitmap dst, sbitmap a, sbitmap b, sbitmap c) { unsigned int i, n = dst->size; sbitmap_ptr dstp = dst->elms; @@ -449,8 +424,7 @@ sbitmap_a_or_b_and_c_cg (dst, a, b, c) } void -sbitmap_a_or_b_and_c (dst, a, b, c) - sbitmap dst, a, b, c; +sbitmap_a_or_b_and_c (sbitmap dst, sbitmap a, sbitmap b, sbitmap c) { unsigned int i, n = dst->size; sbitmap_ptr dstp = dst->elms; @@ -466,8 +440,7 @@ sbitmap_a_or_b_and_c (dst, a, b, c) Return nonzero if any change is made. */ bool -sbitmap_a_and_b_or_c_cg (dst, a, b, c) - sbitmap dst, a, b, c; +sbitmap_a_and_b_or_c_cg (sbitmap dst, sbitmap a, sbitmap b, sbitmap c) { unsigned int i, n = dst->size; sbitmap_ptr dstp = dst->elms; @@ -487,8 +460,7 @@ sbitmap_a_and_b_or_c_cg (dst, a, b, c) } void -sbitmap_a_and_b_or_c (dst, a, b, c) - sbitmap dst, a, b, c; +sbitmap_a_and_b_or_c (sbitmap dst, sbitmap a, sbitmap b, sbitmap c) { unsigned int i, n = dst->size; sbitmap_ptr dstp = dst->elms; @@ -505,10 +477,7 @@ sbitmap_a_and_b_or_c (dst, a, b, c) block number BB, using the new flow graph structures. */ void -sbitmap_intersection_of_succs (dst, src, bb) - sbitmap dst; - sbitmap *src; - int bb; +sbitmap_intersection_of_succs (sbitmap dst, sbitmap *src, int bb) { basic_block b = BASIC_BLOCK (bb); unsigned int set_size = dst->size; @@ -545,10 +514,7 @@ sbitmap_intersection_of_succs (dst, src, bb) block number BB, using the new flow graph structures. */ void -sbitmap_intersection_of_preds (dst, src, bb) - sbitmap dst; - sbitmap *src; - int bb; +sbitmap_intersection_of_preds (sbitmap dst, sbitmap *src, int bb) { basic_block b = BASIC_BLOCK (bb); unsigned int set_size = dst->size; @@ -585,10 +551,7 @@ sbitmap_intersection_of_preds (dst, src, bb) block number BB, using the new flow graph structures. */ void -sbitmap_union_of_succs (dst, src, bb) - sbitmap dst; - sbitmap *src; - int bb; +sbitmap_union_of_succs (sbitmap dst, sbitmap *src, int bb) { basic_block b = BASIC_BLOCK (bb); unsigned int set_size = dst->size; @@ -625,10 +588,7 @@ sbitmap_union_of_succs (dst, src, bb) block number BB, using the new flow graph structures. */ void -sbitmap_union_of_preds (dst, src, bb) - sbitmap dst; - sbitmap *src; - int bb; +sbitmap_union_of_preds (sbitmap dst, sbitmap *src, int bb) { basic_block b = BASIC_BLOCK (bb); unsigned int set_size = dst->size; @@ -665,8 +625,7 @@ sbitmap_union_of_preds (dst, src, bb) /* Return number of first bit set in the bitmap, -1 if none. */ int -sbitmap_first_set_bit (bmap) - sbitmap bmap; +sbitmap_first_set_bit (sbitmap bmap) { unsigned int n; @@ -677,8 +636,7 @@ sbitmap_first_set_bit (bmap) /* Return number of last bit set in the bitmap, -1 if none. */ int -sbitmap_last_set_bit (bmap) - sbitmap bmap; +sbitmap_last_set_bit (sbitmap bmap) { int i; SBITMAP_ELT_TYPE *ptr = bmap->elms; @@ -708,9 +666,7 @@ sbitmap_last_set_bit (bmap) } void -dump_sbitmap (file, bmap) - FILE *file; - sbitmap bmap; +dump_sbitmap (FILE *file, sbitmap bmap) { unsigned int i, n, j; unsigned int set_size = bmap->size; @@ -731,9 +687,7 @@ dump_sbitmap (file, bmap) } void -dump_sbitmap_file (file, bmap) - FILE *file; - sbitmap bmap; +dump_sbitmap_file (FILE *file, sbitmap bmap) { unsigned int i, pos; @@ -756,18 +710,14 @@ dump_sbitmap_file (file, bmap) } void -debug_sbitmap (bmap) - sbitmap bmap; +debug_sbitmap (sbitmap bmap) { dump_sbitmap_file (stderr, bmap); } void -dump_sbitmap_vector (file, title, subtitle, bmaps, n_maps) - FILE *file; - const char *title, *subtitle; - sbitmap *bmaps; - int n_maps; +dump_sbitmap_vector (FILE *file, const char *title, const char *subtitle, + sbitmap *bmaps, int n_maps) { int bb; |