diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2014-12-06 19:22:44 +0000 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2014-12-06 19:22:44 +0000 |
| commit | 89e5306f43422827bd8f42739f3185cec1f6a616 (patch) | |
| tree | bc28412ddb52e06e8f720c74e95e935c0ed7653c /llvm/lib | |
| parent | 8e5dc5378489cda4f4db612acd045473b0f5420a (diff) | |
| download | bcm5719-llvm-89e5306f43422827bd8f42739f3185cec1f6a616.tar.gz bcm5719-llvm-89e5306f43422827bd8f42739f3185cec1f6a616.zip | |
Make the DenseMap bucket type configurable and use a smaller bucket for DenseSet.
DenseSet used to be implemented as DenseMap<Key, char>, which usually doubled
the memory footprint of the map. Now we use a compressed set so the second
element uses no memory at all. This required some surgery on DenseMap as
all accesses to the bucket now have to go through methods; this should
have no impact on the behavior of DenseMap though. The new default bucket
type for DenseMap is a slightly extended std::pair as we expose it through
DenseMap's iterator and don't want to break any existing users.
llvm-svn: 223588
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/AArch64/AArch64PromoteConstant.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64PromoteConstant.cpp b/llvm/lib/Target/AArch64/AArch64PromoteConstant.cpp index 16c33b71ed2..97b0f0eba40 100644 --- a/llvm/lib/Target/AArch64/AArch64PromoteConstant.cpp +++ b/llvm/lib/Target/AArch64/AArch64PromoteConstant.cpp @@ -193,7 +193,7 @@ private: // Inserting into the DenseMap may invalidate existing iterator. // Keep a copy of the key to find the iterator to erase. Instruction *OldInstr = IPI->first; - InsertPts.insert(InsertionPoints::value_type(NewPt, IPI->second)); + InsertPts[NewPt] = std::move(IPI->second); // Erase IPI. IPI = InsertPts.find(OldInstr); InsertPts.erase(IPI); |

