[PATCH] D35148: Use DenseMap instead std::map for GVSummaryMapTy.

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 9 11:02:42 PDT 2017


mehdi_amini added a comment.

When we used an std::map originally it was because we needed the ordering. Have you checked that we don't iterate on any instance of this map?



================
Comment at: lib/LTO/LTO.cpp:1033
   // Summary).
-  StringMap<std::map<GlobalValue::GUID, GlobalValueSummary *>>
+  StringMap<DenseMap<GlobalValue::GUID, GlobalValueSummary *>>
       ModuleToDefinedGVSummaries(ThinLTO.ModuleMap.size());
----------------
Can we use `GVSummaryMapTy` here?


https://reviews.llvm.org/D35148





More information about the llvm-commits mailing list