diff options
author | Richard Biener <rguenther@suse.de> | 2023-02-14 16:36:03 +0100 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2023-04-18 16:45:02 +0200 |
commit | f548ece7abc0a0c81dd049e9f8b480ff2c38e18b (patch) | |
tree | ecc07baa36fc1db623123d0630409e2d4fcec4b7 /gcc/bitmap.h | |
parent | 2b53ac39bce7f6696332a8374205182a72ef2cb7 (diff) | |
download | gcc-f548ece7abc0a0c81dd049e9f8b480ff2c38e18b.zip gcc-f548ece7abc0a0c81dd049e9f8b480ff2c38e18b.tar.gz gcc-f548ece7abc0a0c81dd049e9f8b480ff2c38e18b.tar.bz2 |
middle-end/108786 - add bitmap_clear_first_set_bit
This adds bitmap_clear_first_set_bit and uses it where previously
bitmap_clear_bit followed bitmap_first_set_bit. The advantage
is speeding up the search and avoiding to clobber ->current.
PR middle-end/108786
* bitmap.h (bitmap_clear_first_set_bit): New.
* bitmap.cc (bitmap_first_set_bit_worker): Rename from
bitmap_first_set_bit and add optional clearing of the bit.
(bitmap_first_set_bit): Wrap bitmap_first_set_bit_worker.
(bitmap_clear_first_set_bit): Likewise.
* df-core.cc (df_worklist_dataflow_doublequeue): Use
bitmap_clear_first_set_bit.
* graphite-scop-detection.cc (scop_detection::merge_sese):
Likewise.
* sanopt.cc (sanitize_asan_mark_unpoison): Likewise.
(sanitize_asan_mark_poison): Likewise.
* tree-cfgcleanup.cc (cleanup_tree_cfg_noloop): Likewise.
* tree-into-ssa.cc (rewrite_blocks): Likewise.
* tree-ssa-dce.cc (simple_dce_from_worklist): Likewise.
* tree-ssa-sccvn.cc (do_rpo_vn_1): Likewise.
Diffstat (limited to 'gcc/bitmap.h')
-rw-r--r-- | gcc/bitmap.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/bitmap.h b/gcc/bitmap.h index 43337d2..5432f38 100644 --- a/gcc/bitmap.h +++ b/gcc/bitmap.h @@ -110,6 +110,7 @@ along with GCC; see the file COPYING3. If not see * clear : bitmap_clear * smallest_member : bitmap_first_set_bit + * pop_smallest : bitmap_clear_first_set_bit * choose_one : (not implemented, but could be in constant time) @@ -133,6 +134,7 @@ along with GCC; see the file COPYING3. If not see amortized time with O(E) worst-case behavior. * smallest_member + * pop_smallest * largest_member * set_size * member_p @@ -501,6 +503,7 @@ extern void debug (const bitmap_head &ref); extern void debug (const bitmap_head *ptr); extern unsigned bitmap_first_set_bit (const_bitmap); +extern unsigned bitmap_clear_first_set_bit (bitmap); extern unsigned bitmap_last_set_bit (const_bitmap); /* Compute bitmap hash (for purposes of hashing etc.) */ |