From: rguenth Date: Fri, 4 Dec 2015 11:58:59 +0000 (+0000) Subject: 2015-12-04 Richard Biener X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=505b369f593eacdba41b8216b6c61c8d2e7c4765;p=thirdparty%2Fgcc.git 2015-12-04 Richard Biener * bitmap.c (bitmap_find_bit): Guard the bitmap descriptor query with GATHER_STATISTICS. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231261 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cfc56586f2c8..053185465183 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-12-04 Richard Biener + + * bitmap.c (bitmap_find_bit): Guard the bitmap descriptor + query with GATHER_STATISTICS. + 2015-12-04 Eric Botcazou PR middle-end/65958 diff --git a/gcc/bitmap.c b/gcc/bitmap.c index f04b8f901205..f886a8c5b16b 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. */