aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2015-12-04 11:58:59 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2015-12-04 11:58:59 +0000
commit1a8c6effec0cd293b6d1ab50a7e221817acad5d8 (patch)
tree03ca2fee987a7245d128e8078bed69cbfe1409d9 /gcc
parent03c00798828246afcfd998988c9fee8321b9313c (diff)
downloadgcc-1a8c6effec0cd293b6d1ab50a7e221817acad5d8.zip
gcc-1a8c6effec0cd293b6d1ab50a7e221817acad5d8.tar.gz
gcc-1a8c6effec0cd293b6d1ab50a7e221817acad5d8.tar.bz2
bitmap.c (bitmap_find_bit): Guard the bitmap descriptor query with GATHER_STATISTICS.
2015-12-04 Richard Biener <rguenther@suse.de> * bitmap.c (bitmap_find_bit): Guard the bitmap descriptor query with GATHER_STATISTICS. From-SVN: r231261
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/bitmap.c8
2 files changed, 10 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index cfc5658..0531854 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2015-12-04 Richard Biener <rguenther@suse.de>
+
+ * bitmap.c (bitmap_find_bit): Guard the bitmap descriptor
+ query with GATHER_STATISTICS.
+
2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
PR middle-end/65958
diff --git a/gcc/bitmap.c b/gcc/bitmap.c
index f04b8f9..f886a8c 100644
--- a/gcc/bitmap.c
+++ b/gcc/bitmap.c
@@ -487,9 +487,11 @@ bitmap_find_bit (bitmap head, unsigned int bit)
&& head->first->next == NULL)
return NULL;
- /* Usage can be NULL due to allocated bitmaps for which we do not
- call initialize function. */
- bitmap_usage *usage = bitmap_mem_desc.get_descriptor_for_instance (head);
+ /* Usage can be NULL due to allocated bitmaps for which we do not
+ call initialize function. */
+ bitmap_usage *usage = NULL;
+ if (GATHER_STATISTICS)
+ usage = bitmap_mem_desc.get_descriptor_for_instance (head);
/* This bitmap has more than one element, and we're going to look
through the elements list. Count that as a search. */