summaryrefslogtreecommitdiff
path: root/tools/llvm-lto
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2017-05-04 03:36:16 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2017-05-04 03:36:16 +0000
commitdf2206086cc06c13f1462f2b3eb9d4199bf22b70 (patch)
treeea0b40b27ff5b704e4d64ced994571daf58064b6 /tools/llvm-lto
parent7395a71ceb88fcc5928caa63488499301531a265 (diff)
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302108 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-lto')
-rw-r--r--tools/llvm-lto/llvm-lto.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/llvm-lto/llvm-lto.cpp b/tools/llvm-lto/llvm-lto.cpp
index 27e5c5e122c..2458d3d123c 100644
--- a/tools/llvm-lto/llvm-lto.cpp
+++ b/tools/llvm-lto/llvm-lto.cpp
@@ -284,7 +284,7 @@ void printIndexStats() {
unsigned Calls = 0, Refs = 0, Functions = 0, Alias = 0, Globals = 0;
for (auto &Summaries : *Index) {
- for (auto &Summary : Summaries.second) {
+ for (auto &Summary : Summaries.second.SummaryList) {
Refs += Summary->refs().size();
if (auto *FuncSummary = dyn_cast<FunctionSummary>(Summary.get())) {
Functions++;