forked from OSchip/llvm-project
Use DenseMap instead std::map for GVSummaryMapTy.
Summary: This speeds-up thin-link by ~47% for large programs. Reviewers: tejohnson Reviewed By: tejohnson Subscribers: sanjoy, llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D35148 llvm-svn: 307578
This commit is contained in:
parent
0b4ebb1d0b
commit
5d96ee4fab
|
@ -522,7 +522,7 @@ using ModulePathStringTableTy = StringMap<std::pair<uint64_t, ModuleHash>>;
|
|||
|
||||
/// 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.
|
||||
|
|
|
@ -1030,7 +1030,7 @@ Error LTO::runThinLTO(AddStreamFn AddStream, NativeObjectCache Cache,
|
|||
|
||||
// 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);
|
||||
|
|
Loading…
Reference in New Issue