diff options
| author | Teresa Johnson <tejohnson@google.com> | 2016-04-25 21:09:51 +0000 |
|---|---|---|
| committer | Teresa Johnson <tejohnson@google.com> | 2016-04-25 21:09:51 +0000 |
| commit | c851d216e27fc7cad63c1886b4066197777a8d3b (patch) | |
| tree | 40486308e24cab21e3d6b4c75389286b44a9aaa0 /llvm/lib/LTO | |
| parent | 1d5487c5d0511c94cd0be8bc277494a2c4155221 (diff) | |
| download | bcm5719-llvm-c851d216e27fc7cad63c1886b4066197777a8d3b.tar.gz bcm5719-llvm-c851d216e27fc7cad63c1886b4066197777a8d3b.zip | |
[ThinLTO] Introduce typedef for commonly-used map type (NFC)
Add a typedef for the std::map<GlobalValue::GUID, GlobalValueSummary *>
map that is passed around to identify summaries for values defined in a
particular module. This shortens up declarations in a variety of places.
llvm-svn: 267471
Diffstat (limited to 'llvm/lib/LTO')
| -rw-r--r-- | llvm/lib/LTO/ThinLTOCodeGenerator.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/llvm/lib/LTO/ThinLTOCodeGenerator.cpp b/llvm/lib/LTO/ThinLTOCodeGenerator.cpp index 21ba1e92a3a..51dcc084b49 100644 --- a/llvm/lib/LTO/ThinLTOCodeGenerator.cpp +++ b/llvm/lib/LTO/ThinLTOCodeGenerator.cpp @@ -187,8 +187,7 @@ ResolveODR(const ModuleSummaryIndex &Index, static void ResolveODR( const ModuleSummaryIndex &Index, const FunctionImporter::ExportSetTy &ExportList, - const std::map<GlobalValue::GUID, GlobalValueSummary *> &DefinedGlobals, - StringRef ModuleIdentifier, + const GVSummaryMapTy &DefinedGlobals, StringRef ModuleIdentifier, std::map<GlobalValue::GUID, GlobalValue::LinkageTypes> &ResolvedODR) { if (Index.modulePaths().size() == 1) // Nothing to do if we don't have multiple modules @@ -423,7 +422,7 @@ public: const FunctionImporter::ImportMapTy &ImportList, const FunctionImporter::ExportSetTy &ExportList, const std::map<GlobalValue::GUID, GlobalValue::LinkageTypes> &ResolvedODR, - const std::map<GlobalValue::GUID, GlobalValueSummary *> &DefinedFunctions, + const GVSummaryMapTy &DefinedFunctions, const DenseSet<GlobalValue::GUID> &PreservedSymbols) { if (CachePath.empty()) return; @@ -672,8 +671,7 @@ void ThinLTOCodeGenerator::promote(Module &TheModule, auto ModuleCount = Index.modulePaths().size(); auto ModuleIdentifier = TheModule.getModuleIdentifier(); // Collect for each module the list of function it defines (GUID -> Summary). - StringMap<std::map<GlobalValue::GUID, GlobalValueSummary *>> - ModuleToDefinedGVSummaries; + StringMap<GVSummaryMapTy> ModuleToDefinedGVSummaries; Index.collectDefinedGVSummariesPerModule(ModuleToDefinedGVSummaries); // Generate import/export list @@ -705,8 +703,7 @@ void ThinLTOCodeGenerator::crossModuleImport(Module &TheModule, auto ModuleCount = Index.modulePaths().size(); // Collect for each module the list of function it defines (GUID -> Summary). - StringMap<std::map<GlobalValue::GUID, GlobalValueSummary *>> - ModuleToDefinedGVSummaries(ModuleCount); + StringMap<GVSummaryMapTy> ModuleToDefinedGVSummaries(ModuleCount); Index.collectDefinedGVSummariesPerModule(ModuleToDefinedGVSummaries); // Generate import/export list @@ -733,8 +730,7 @@ void ThinLTOCodeGenerator::internalize(Module &TheModule, computeGUIDPreservedSymbols(PreservedSymbols, TMBuilder.TheTriple); // Collect for each module the list of function it defines (GUID -> Summary). - StringMap<std::map<GlobalValue::GUID, GlobalValueSummary *>> - ModuleToDefinedGVSummaries(ModuleCount); + StringMap<GVSummaryMapTy> ModuleToDefinedGVSummaries(ModuleCount); Index.collectDefinedGVSummariesPerModule(ModuleToDefinedGVSummaries); // Generate import/export list @@ -815,8 +811,7 @@ void ThinLTOCodeGenerator::run() { auto ModuleCount = Modules.size(); // Collect for each module the list of function it defines (GUID -> Summary). - StringMap<std::map<GlobalValue::GUID, GlobalValueSummary *>> - ModuleToDefinedGVSummaries(ModuleCount); + StringMap<GVSummaryMapTy> ModuleToDefinedGVSummaries(ModuleCount); Index->collectDefinedGVSummariesPerModule(ModuleToDefinedGVSummaries); // Collect the import/export lists for all modules from the call-graph in the |

