summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2014-12-06 19:22:44 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2014-12-06 19:22:44 +0000
commit89e5306f43422827bd8f42739f3185cec1f6a616 (patch)
treebc28412ddb52e06e8f720c74e95e935c0ed7653c /llvm/lib
parent8e5dc5378489cda4f4db612acd045473b0f5420a (diff)
downloadbcm5719-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.cpp2
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);
OpenPOWER on IntegriCloud