aboutsummaryrefslogtreecommitdiff
path: root/llvm/docs/tutorial
diff options
context:
space:
mode:
authorVladislav Dzhidzhoev <vdzhidzhoev@accesssoftek.com>2022-07-25 16:39:46 +0000
committerDavid Blaikie <dblaikie@gmail.com>2022-07-25 17:09:44 +0000
commit2c84b92346bc45a88f92d781e30daa8490049c4d (patch)
treea3257b12ac1d8683a2c34c85942b5abde6f98eb8 /llvm/docs/tutorial
parentba49d39b20cc5358da28af2ac82bd336028780bc (diff)
downloadllvm-2c84b92346bc45a88f92d781e30daa8490049c4d.zip
llvm-2c84b92346bc45a88f92d781e30daa8490049c4d.tar.gz
llvm-2c84b92346bc45a88f92d781e30daa8490049c4d.tar.bz2
Fix assertion in SmallDenseMap constructor with reserve from non-power-of-2 buckets count
`SmallDenseMap` constructor with reserve gets an arbitrary `NumInitBuckets` value and passes it below to `init` method. If `NumInitBuckets` is greater then `InlineBuckets`, then `SmallDenseMap` initializes to large representation passing `NumInitBuckets` below to `DenseMap` initialization. `DenseMap::initEmpty` method asserts that initial buckets count must be a power of 2. Proposed solution is to update `NumInitBuckets` value in `SmallDenseMap` constructor till the next power of 2. It should satisfy both `DenseMap` preconditions and required minimum buckets count for reservation. Reviewed By: atrick Differential Revision: https://reviews.llvm.org/D129825
Diffstat (limited to 'llvm/docs/tutorial')
0 files changed, 0 insertions, 0 deletions