summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit5f85a9dedae7fd0aba1292c5e6b3882ca3ee1412 (patch)
treec8945176e5c818fa131b82665d582c2857736c76 /llvm/tools/llvm-lto
parent7c4eafa3ee6d28d6755f6af18f5e91c22ede87c7 (diff)
downloadbcm5719-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-lto')
-rw-r--r--llvm/tools/llvm-lto/llvm-lto.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/llvm-lto/llvm-lto.cpp b/llvm/tools/llvm-lto/llvm-lto.cpp
index 27e5c5e122c..2458d3d123c 100644
--- a/llvm/tools/llvm-lto/llvm-lto.cpp
+++ b/llvm/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++;
OpenPOWER on IntegriCloud