Implement multi-bit aligned accessors for sparse bitmap.
authorAndrew MacLeod <amacleod@redhat.com>
Mon, 7 Jun 2021 17:12:01 +0000 (13:12 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Mon, 7 Jun 2021 21:31:01 +0000 (17:31 -0400)
commit5ad089a3c946aec655436fa3b0b50d6574b78197
tree4f832709576103acddbc6dea927c4269611c2968
parent64735dc923e0a1a2e04c5313471d91ca8b954e9a
Implement multi-bit aligned accessors for sparse bitmap.

Provide set/get routines to allow sparse bitmaps to be treated as an array
of multiple bit values. Only chunk sizes that are powers of 2 are supported.

* bitmap.c (bitmap_set_aligned_chunk): New.
(bitmap_get_aligned_chunk): New.
(test_aligned_chunk): New.
(bitmap_c_tests): Call test_aligned_chunk.
* bitmap.h (bitmap_set_aligned_chunk, bitmap_get_aligned_chunk): New.
gcc/bitmap.c
gcc/bitmap.h