diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2017-05-04 03:36:16 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2017-05-04 03:36:16 +0000 |
commit | 5f85a9dedae7fd0aba1292c5e6b3882ca3ee1412 (patch) | |
tree | c8945176e5c818fa131b82665d582c2857736c76 /llvm/tools/llvm-link | |
parent | 7c4eafa3ee6d28d6755f6af18f5e91c22ede87c7 (diff) | |
download | bcm5719-llvm-5f85a9dedae7fd0aba1292c5e6b3882ca3ee1412.tar.gz bcm5719-llvm-5f85a9dedae7fd0aba1292c5e6b3882ca3ee1412.zip |
IR: Use pointers instead of GUIDs to represent edges in the module summary. NFCI.
When profiling a no-op incremental link of Chromium I found that the functions
computeImportForFunction and computeDeadSymbols were consuming roughly 10% of
the profile. The goal of this change is to improve the performance of those
functions by changing the map lookups that they were previously doing into
pointer dereferences.
This is achieved by changing the ValueInfo data structure to be a pointer to
an element of the global value map owned by ModuleSummaryIndex, and changing
reference lists in the GlobalValueSummary to hold ValueInfos instead of GUIDs.
This means that a ValueInfo will take a client directly to the summary list
for a given GUID.
Differential Revision: https://reviews.llvm.org/D32471
llvm-svn: 302108
Diffstat (limited to 'llvm/tools/llvm-link')
-rw-r--r-- | llvm/tools/llvm-link/llvm-link.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/llvm-link/llvm-link.cpp b/llvm/tools/llvm-link/llvm-link.cpp index 27199d53538..568e5f8d2d5 100644 --- a/llvm/tools/llvm-link/llvm-link.cpp +++ b/llvm/tools/llvm-link/llvm-link.cpp @@ -300,7 +300,7 @@ static bool linkFiles(const char *argv0, LLVMContext &Context, Linker &L, // does not do the ThinLink that would normally determine what values to // promote. for (auto &I : *Index) { - for (auto &S : I.second) { + for (auto &S : I.second.SummaryList) { if (GlobalValue::isLocalLinkage(S->linkage())) S->setLinkage(GlobalValue::ExternalLinkage); } |