aboutsummaryrefslogtreecommitdiff
path: root/gcc/bitmap.h
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2016-03-23 07:20:16 -0600
committerJeff Law <law@gcc.gnu.org>2016-03-23 07:20:16 -0600
commit478baf913e79d1d3219b513b494943c830850593 (patch)
treea015e0e499c5e938dbce68a3de2ecabc309f489a /gcc/bitmap.h
parentb01e88e56b3ad6bf76c18500035bc4ed8ef036cd (diff)
downloadgcc-478baf913e79d1d3219b513b494943c830850593.zip
gcc-478baf913e79d1d3219b513b494943c830850593.tar.gz
gcc-478baf913e79d1d3219b513b494943c830850593.tar.bz2
re PR tree-optimization/64058 (Performance degradation after r216304)
PR tree-optimization/64058 * tree-ssa-coalesce.c (struct coalesce_pair): Add new field CONFLICT_COUNT. (struct ssa_conflicts): Move up earlier in the file. (conflicts_, var_map_): New static variables. (initialize_conflict_count): New function to initialize the CONFLICT_COUNT field for each conflict pair. (compare_pairs): Lazily initialize the conflict count and use it as the first tie-breaker. (sort_coalesce_list): Add new arguments conflicts, map. Initialize and wipe conflicts_ and map_ around the call to qsort. Remove special case for 2 coalesce pairs. * bitmap.c (bitmap_count_unique_bits): New function. (bitmap_count_bits_in_word): New function, extracted from bitmap_count_bits. (bitmap_count_bits): Use bitmap_count_bits_in_word. * bitmap.h (bitmap_count_unique_bits): Declare it. From-SVN: r234425
Diffstat (limited to 'gcc/bitmap.h')
-rw-r--r--gcc/bitmap.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/bitmap.h b/gcc/bitmap.h
index 805e37e..1115711 100644
--- a/gcc/bitmap.h
+++ b/gcc/bitmap.h
@@ -280,6 +280,9 @@ extern bool bitmap_single_bit_set_p (const_bitmap);
/* Count the number of bits set in the bitmap. */
extern unsigned long bitmap_count_bits (const_bitmap);
+/* Count the number of unique bits set across the two bitmaps. */
+extern unsigned long bitmap_count_unique_bits (const_bitmap, const_bitmap);
+
/* Boolean operations on bitmaps. The _into variants are two operand
versions that modify the first source operand. The other variants
are three operand versions that to not destroy the source bitmaps.