[PATCH] D87044: Eliminate the sizing template parameter N from CoalescingBitVector

Dimitry Andric via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 2 10:01:49 PDT 2020


dim created this revision.
dim added reviewers: vsk, grimar, RKSimon, dblaikie, jfb, labath, bkramer, stoklund.
Herald added a subscriber: dexonsmith.
Herald added a project: LLVM.
dim requested review of this revision.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D87044

Files:
  llvm/include/llvm/ADT/CoalescingBitVector.h


Index: llvm/include/llvm/ADT/CoalescingBitVector.h
===================================================================
--- llvm/include/llvm/ADT/CoalescingBitVector.h
+++ llvm/include/llvm/ADT/CoalescingBitVector.h
@@ -34,15 +34,14 @@
 /// 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;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87044.289502.patch
Type: text/x-patch
Size: 1009 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200902/87820c8a/attachment.bin>


More information about the llvm-commits mailing list