svn commit: r365307 - head/contrib/llvm-project/llvm/include/llvm/ADT

Dimitry Andric dim at FreeBSD.org
Thu Sep 3 18:34:02 UTC 2020


Author: dim
Date: Thu Sep  3 18:34:01 2020
New Revision: 365307
URL: https://svnweb.freebsd.org/changeset/base/365307

Log:
  Merge commit f26fc568402f from llvm git (by me):
  
    Eliminate the sizing template parameter N from CoalescingBitVector
  
    Since the parameter is not used anywhere, and the default size of 16
    apparently causes PR47359, remove it. This ensures that IntervalMap
    will automatically determine the optimal size, using its NodeSizer
    struct.
  
    Reviewed By: dblaikie
  
    Differential Revision: https://reviews.llvm.org/D87044
  
  This should fix 'Assertion failed: (Elements + Grow <= Nodes * Capacity
  && "Not enough room for elements"), function distribute, file
  /usr/src/contrib/llvm-project/llvm/lib/Support/IntervalMap.cpp, line
  123.' when building the x11-toolkits/py-wxPython40 port on a i386 host.
  
  Reported by:	zeising
  MFC after:	6 weeks
  X-MFC-With:	r364284

Modified:
  head/contrib/llvm-project/llvm/include/llvm/ADT/CoalescingBitVector.h

Modified: head/contrib/llvm-project/llvm/include/llvm/ADT/CoalescingBitVector.h
==============================================================================
--- head/contrib/llvm-project/llvm/include/llvm/ADT/CoalescingBitVector.h	Thu Sep  3 18:27:13 2020	(r365306)
+++ head/contrib/llvm-project/llvm/include/llvm/ADT/CoalescingBitVector.h	Thu Sep  3 18:34:01 2020	(r365307)
@@ -34,15 +34,14 @@ namespace llvm {
 /// performance for non-sequential find() operations.
 ///
 /// \tparam IndexT - The type of the index into the bitvector.
-/// \tparam N - The first N coalesced intervals of set bits are stored in-place.
-template <typename IndexT, unsigned N = 16> class CoalescingBitVector {
+template <typename IndexT> class CoalescingBitVector {
   static_assert(std::is_unsigned<IndexT>::value,
                 "Index must be an unsigned integer.");
 
-  using ThisT = CoalescingBitVector<IndexT, N>;
+  using ThisT = CoalescingBitVector<IndexT>;
 
   /// An interval map for closed integer ranges. The mapped values are unused.
-  using MapT = IntervalMap<IndexT, char, N>;
+  using MapT = IntervalMap<IndexT, char>;
 
   using UnderlyingIterator = typename MapT::const_iterator;
 


More information about the svn-src-all mailing list