Make the DenseMap bucket type configurable and use a smaller bucket for DenseSet.
[oota-llvm.git] / lib / Target / AArch64 / AArch64PromoteConstant.cpp
index 16c33b71ed2147893f38c616014b463a52638c78..97b0f0eba40843195cda0338de21014c4c51ecc3 100644 (file)
@@ -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);