summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/FunctionImport.cpp
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2016-04-25 21:09:51 +0000
committerTeresa Johnson <tejohnson@google.com>2016-04-25 21:09:51 +0000
commitc851d216e27fc7cad63c1886b4066197777a8d3b (patch)
tree40486308e24cab21e3d6b4c75389286b44a9aaa0 /llvm/lib/Transforms/IPO/FunctionImport.cpp
parent1d5487c5d0511c94cd0be8bc277494a2c4155221 (diff)
downloadbcm5719-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/Transforms/IPO/FunctionImport.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/FunctionImport.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/IPO/FunctionImport.cpp b/llvm/lib/Transforms/IPO/FunctionImport.cpp
index b6c8993a6f0..3f0d2624f5d 100644
--- a/llvm/lib/Transforms/IPO/FunctionImport.cpp
+++ b/llvm/lib/Transforms/IPO/FunctionImport.cpp
@@ -185,8 +185,7 @@ using EdgeInfo = std::pair<const FunctionSummary *, unsigned /* Threshold */>;
/// exported from their source module.
static void computeImportForFunction(
const FunctionSummary &Summary, const ModuleSummaryIndex &Index,
- unsigned Threshold,
- const std::map<GlobalValue::GUID, GlobalValueSummary *> &DefinedGVSummaries,
+ unsigned Threshold, const GVSummaryMapTy &DefinedGVSummaries,
SmallVectorImpl<EdgeInfo> &Worklist,
FunctionImporter::ImportMapTy &ImportsForModule,
StringMap<FunctionImporter::ExportSetTy> *ExportLists = nullptr) {
@@ -256,8 +255,7 @@ static void computeImportForFunction(
/// as well as the list of "exports", i.e. the list of symbols referenced from
/// another module (that may require promotion).
static void ComputeImportForModule(
- const std::map<GlobalValue::GUID, GlobalValueSummary *> &DefinedGVSummaries,
- const ModuleSummaryIndex &Index,
+ const GVSummaryMapTy &DefinedGVSummaries, const ModuleSummaryIndex &Index,
FunctionImporter::ImportMapTy &ImportsForModule,
StringMap<FunctionImporter::ExportSetTy> *ExportLists = nullptr) {
// Worklist contains the list of function imported in this module, for which
@@ -299,8 +297,7 @@ static void ComputeImportForModule(
/// Compute all the import and export for every module using the Index.
void llvm::ComputeCrossModuleImport(
const ModuleSummaryIndex &Index,
- const StringMap<std::map<GlobalValue::GUID, GlobalValueSummary *>> &
- ModuleToDefinedGVSummaries,
+ const StringMap<GVSummaryMapTy> &ModuleToDefinedGVSummaries,
StringMap<FunctionImporter::ImportMapTy> &ImportLists,
StringMap<FunctionImporter::ExportSetTy> &ExportLists) {
// For each module that has function defined, compute the import/export lists.
@@ -337,7 +334,7 @@ void llvm::ComputeCrossModuleImportForModule(
// Collect the list of functions this module defines.
// GUID -> Summary
- std::map<GlobalValue::GUID, GlobalValueSummary *> FunctionSummaryMap;
+ GVSummaryMapTy FunctionSummaryMap;
Index.collectDefinedFunctionsForModule(ModulePath, FunctionSummaryMap);
// Compute the import list for this module.
OpenPOWER on IntegriCloud