1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/include/llvm/ADT
Nikita Popov baba8dd94a [ADT] Fix SmallDenseMap assertion with large InlineBuckets
Fixes issue encountered in D56362, where I tried to use a
SmallSetVector<Instruction*, 128> with an excessively large number
of inline elements. This triggers an "Must allocate more buckets
than are inline" assertion inside allocateBuckets() under certain
usage patterns.

The issue is as follows: The grow() method is used either to grow
the map, or to rehash it and remove tombstones. The latter is done
if the fraction of empty (non-used, non-tombstone) elements is
below 1/8. In this case grow() is invoked with the current number
of buckets.

This is currently incorrectly handled for dense maps using the small
rep. The current implementation will switch them over to the large
rep, which violates the invariant that the large rep is only used
if there are more than InlineBuckets buckets.

This patch fixes the issue by staying in the small rep and only
moving the buckets. An alternative, if we do want to switch to the
large rep in this case, would be to relax the assertion in
allocateBuckets().

Differential Revision: https://reviews.llvm.org/D56455
2019-12-11 21:41:14 +01:00
..
AllocatorList.h
Any.h [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
APFloat.h [APFloat] Prevent construction of APFloat with Semantics and FP value 2019-12-04 12:02:04 +02:00
APInt.h [APInt][PatternMatch] Add 'is non-positive' predicate 2019-12-03 21:34:12 +03:00
APSInt.h
ArrayRef.h [cmake] Disable GCC 9's -Winit-list-lifetime warning in ArrayRef 2019-11-19 17:26:57 +01:00
bit.h
BitmaskEnum.h
BitVector.h [BitVector] Define BitWord as uintptr_t 2019-10-29 13:53:04 +00:00
BreadthFirstIterator.h
CachedHashString.h
DAGDeltaAlgorithm.h
DeltaAlgorithm.h
DenseMap.h [ADT] Fix SmallDenseMap assertion with large InlineBuckets 2019-12-11 21:41:14 +01:00
DenseMapInfo.h [clangd] Use our own relation kind. 2019-10-17 14:08:28 +00:00
DenseSet.h NFC: Change usage of 'DenseSet' to 'DenseSetImpl' in DenseSetImpl::ConstIterator. 2019-05-27 17:38:41 +00:00
DepthFirstIterator.h
DirectedGraph.h [DirectedGraph]: Add setTargetNode member function 2019-11-11 03:36:23 +00:00
edit_distance.h
EnumeratedArray.h [DDG] Data Dependence Graph - Pi Block 2019-11-08 15:46:08 -05:00
EpochTracker.h
EquivalenceClasses.h
fallible_iterator.h
FloatingPointMode.h Work on cleaning up denormal mode handling 2019-11-19 22:01:14 +05:30
FoldingSet.h
FunctionExtras.h
GraphTraits.h
Hashing.h Hashing - fix uninitialized variable warnings. NFCI. 2019-11-08 14:46:22 +00:00
ilist_base.h
ilist_iterator.h
ilist_node_base.h
ilist_node_options.h
ilist_node.h
ilist.h
ImmutableList.h
ImmutableMap.h
ImmutableSet.h ImutAVLTree::validateTree - fix null dereference typo warning. NFCI. 2019-11-07 18:42:01 +00:00
IndexedMap.h
IntEqClasses.h
IntervalMap.h [NFC] Remove uses of LLVM_ALIGNAS 2019-07-30 16:31:06 +00:00
IntrusiveRefCntPtr.h
iterator_range.h [ADT] Move drop_begin from iterator_range.h into STLExtras. 2019-11-14 08:10:59 -08:00
iterator.h
MapVector.h
None.h
Optional.h Revert rL368939 "Remove LVALUE / RVALUE workarounds" 2019-08-15 10:12:11 +00:00
PackedVector.h
PointerEmbeddedInt.h
PointerIntPair.h Mark several PointerIntPair methods as lvalue-only 2019-10-08 19:01:48 +00:00
PointerSumType.h
PointerUnion.h Add TinyPtrVector support for general pointer-like things. 2019-08-20 23:29:28 +00:00
PostOrderIterator.h
PriorityQueue.h
PriorityWorklist.h
SCCIterator.h
ScopedHashTable.h
ScopeExit.h
Sequence.h
SetOperations.h
SetVector.h
simple_ilist.h
SmallBitVector.h [SmallBitVector] Fix bug in find_next_unset for small types with indices >=32 2019-07-21 16:06:26 +00:00
SmallPtrSet.h [ADT] Add equality operator for SmallPtrSet 2019-11-06 11:17:51 +07:00
SmallSet.h [ADT] add equality operator for SmallSet 2019-10-29 17:33:57 -07:00
SmallString.h
SmallVector.h [ADT] Move to_vector from STLExtras.h to SmallVector.h 2019-11-20 16:35:19 -08:00
SparseBitVector.h
SparseMultiSet.h
SparseSet.h
Statistic.h Statistic - Fix MSVC shadow warning against global PrintOnExit static variable. NFC. 2019-11-21 12:08:01 +00:00
STLExtras.h Reland 'Fixed -Wdeprecated-copy warnings. NFCI.' 2019-11-23 23:09:39 +01:00
StringExtras.h Fix MSVC unreferenced formal parameter warning. NFCI. 2019-09-01 16:04:38 +00:00
StringMap.h ADT: Save a word in every StringSet entry 2019-10-10 20:22:53 +00:00
StringRef.h Use __builtin_strlen in constexpr StringRef ctor with MSVC 2019-10-25 15:53:54 -07:00
StringSet.h ADT: Save a word in every StringSet entry 2019-10-10 20:22:53 +00:00
StringSwitch.h Revert "Forward declare Optional<T> in STLExtras.h" 2019-11-13 16:36:21 -08:00
TinyPtrVector.h Add TinyPtrVector support for general pointer-like things. 2019-08-20 23:29:28 +00:00
Triple.h Fix iOSDarwin()'s doc comment. 2019-11-18 13:18:06 -08:00
Twine.h Twine - fix uninitialized variable warnings. NFCI. 2019-11-10 11:21:43 +00:00
UniqueVector.h