{"push_id":1020696629,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"33ae313f2a5a312df9724f093efeb94df9db1d83","before":"875b7560fb40f8889739ad9d5242d6a63e440dd1","commits":[{"sha":"33ae313f2a5a312df9724f093efeb94df9db1d83","author":{"email":"cc6cb0e8fed1b16204f1190d9778d63755e934ea@apple.com","name":"Fiona Glaser"},"message":"DenseMap: make .resize() do the intuitive thing\n\nIn some places, like InstCombine, we resize a DenseMap to fit the elements\nwe intend to put in it, then insert those elements (to avoid continual\nreallocations as it grows). But .resize(foo) doesn't actually do what\npeople think; it resizes to foo buckets (which is really an\nimplementation detail the user of DenseMap probably shouldn't care about),\nnot the space required to fit foo elements. DenseMap grows if 3/4 of its\nbuckets are full, so this actually causes one forced reallocation every\ntime instead of avoiding a reallocation.\n\nThis patch makes .resize(foo) do the intuitive thing: it grows to the size\nnecessary to fit foo elements without new allocations.\n\nAlso include a test to verify that .resize() actually does what we think it\ndoes.\n\n\ngit-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263522 91177308-0d34-0410-b5e6-96231b3b80d8","distinct":true,"url":"https://api.github.com/repos/llvm-project/llvm/commits/33ae313f2a5a312df9724f093efeb94df9db1d83"}]}