aboutsummaryrefslogtreecommitdiff
path: root/gcc/bitmap.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2015-05-19 07:11:37 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2015-05-19 07:11:37 +0000
commit07a737f333f0d4352984664c1ab6d344f6e2c88c (patch)
treeeb76c88033453d389b51706d4861488d574dcaf2 /gcc/bitmap.c
parent72d19505eef64d2d9c37d8aabf1fffb3267d5d0e (diff)
downloadgcc-07a737f333f0d4352984664c1ab6d344f6e2c88c.zip
gcc-07a737f333f0d4352984664c1ab6d344f6e2c88c.tar.gz
gcc-07a737f333f0d4352984664c1ab6d344f6e2c88c.tar.bz2
bitmap.c (bitmap_set_range): Handle count==1 specially.
gcc/ * bitmap.c (bitmap_set_range): Handle count==1 specially. (bitmap_clear_range): Likewise. * cfgcleanup.c (mark_effect): Use bitmap_clear_range and bitmap_set_range unconditionally. * df-problems.c (df_simulate_one_insn_forwards): Likewise. * df-scan.c (df_mark_reg): Likewise. * haifa-sched.c (setup_ref_regs): Likewise. * sched-rgn.c (update_live_1): Likewise. From-SVN: r223344
Diffstat (limited to 'gcc/bitmap.c')
-rw-r--r--gcc/bitmap.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/bitmap.c b/gcc/bitmap.c
index 66066a6..58f4432 100644
--- a/gcc/bitmap.c
+++ b/gcc/bitmap.c
@@ -1212,6 +1212,12 @@ bitmap_set_range (bitmap head, unsigned int start, unsigned int count)
if (!count)
return;
+ if (count == 1)
+ {
+ bitmap_set_bit (head, start);
+ return;
+ }
+
first_index = start / BITMAP_ELEMENT_ALL_BITS;
end_bit_plus1 = start + count;
last_index = (end_bit_plus1 - 1) / BITMAP_ELEMENT_ALL_BITS;
@@ -1311,6 +1317,12 @@ bitmap_clear_range (bitmap head, unsigned int start, unsigned int count)
if (!count)
return;
+ if (count == 1)
+ {
+ bitmap_clear_bit (head, start);
+ return;
+ }
+
first_index = start / BITMAP_ELEMENT_ALL_BITS;
end_bit_plus1 = start + count;
last_index = (end_bit_plus1 - 1) / BITMAP_ELEMENT_ALL_BITS;