mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-14 23:48:56 +00:00
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307578 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d380c14b7a
commit
a569cab404
@ -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
Block a user