[PATCH] D28143: [ThinLTO] Thin link efficiency: Pre-compute set of non-exportable GVs
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 28 14:19:25 PST 2016
tejohnson created this revision.
tejohnson added a reviewer: mehdi_amini.
tejohnson added a subscriber: llvm-commits.
Rather than looking up each referenced GUID in the index for each
value we consider importing, in order to see if it is not exportable
(e.g. needs renaming but can't be renamed), pre-compute the set of GUIDs
that can't be exported and consult that.
For a large application with aggressive importing thresholds, the index
lookup findGlobalValueSummaryList in canBeExternallyReferenced was
at the top of the profile. This change reduced the thin link time by
19% on average (the improvement was <1% on average with default
importing thresholds). For my large app, with default thresholds, there
were previously 6.1M index lookups in canBeExternallyReferenced, but with
aggressive importing thresholds there were 195M checks. The index
has 2.8M entries, while the pre-computed DoNotExport set has 13K entries.
There was no significant memory increase from the extra set.
https://reviews.llvm.org/D28143
Files:
include/llvm/IR/ModuleSummaryIndex.h
include/llvm/Transforms/IPO/FunctionImport.h
lib/IR/ModuleSummaryIndex.cpp
lib/LTO/LTO.cpp
lib/LTO/ThinLTOCodeGenerator.cpp
lib/Transforms/IPO/FunctionImport.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28143.82620.patch
Type: text/x-patch
Size: 19459 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161228/92b4c612/attachment.bin>
More information about the llvm-commits
mailing list