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

Dehao Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 10 11:36:48 PDT 2017


danielcdh updated this revision to Diff 105890.
danielcdh marked an inline comment as done.
danielcdh added a comment.

update


https://reviews.llvm.org/D35148

Files:
  include/llvm/IR/ModuleSummaryIndex.h
  lib/LTO/LTO.cpp


Index: lib/LTO/LTO.cpp
===================================================================
--- lib/LTO/LTO.cpp
+++ lib/LTO/LTO.cpp
@@ -1030,7 +1030,7 @@
 
   // Collect for each module the list of function it defines (GUID ->
   // Summary).
-  StringMap<std::map<GlobalValue::GUID, GlobalValueSummary *>>
+  StringMap<GVSummaryMapTy>
       ModuleToDefinedGVSummaries(ThinLTO.ModuleMap.size());
   ThinLTO.CombinedIndex.collectDefinedGVSummariesPerModule(
       ModuleToDefinedGVSummaries);
Index: include/llvm/IR/ModuleSummaryIndex.h
===================================================================
--- include/llvm/IR/ModuleSummaryIndex.h
+++ include/llvm/IR/ModuleSummaryIndex.h
@@ -522,7 +522,7 @@
 
 /// Map of global value GUID to its summary, used to identify values defined in
 /// a particular module, and provide efficient access to their summary.
-using GVSummaryMapTy = std::map<GlobalValue::GUID, GlobalValueSummary *>;
+using GVSummaryMapTy = DenseMap<GlobalValue::GUID, GlobalValueSummary *>;
 
 /// Class to hold module path string table and global value map,
 /// and encapsulate methods for operating on them.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35148.105890.patch
Type: text/x-patch
Size: 1133 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170710/dc56a934/attachment.bin>


More information about the llvm-commits mailing list