-
Notifications
You must be signed in to change notification settings - Fork 11.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ThinLTO] Efficiency improvement when writing module path string table
Summary: When writing the combined index, we are walking the entire module path StringMap in the full index, and checking whether each one should be included in the index being written. For distributed backends, where we write an individual combined index for each file, each with only a few module paths, this is incredibly inefficient. Add a method that takes a callback and hides the details of whether we are writing the full combined index, or just a slice, and in the latter case it walks the set of modules to include instead of the entire index. For a huge application with around 23K files (i.e. where we were iterating through the 23K-entry modulePath StringMap 23K times), this change improved the thin link time by a whopping 48%. Reviewers: pcc Subscribers: Prazek, inglorion, llvm-commits Differential Revision: https://reviews.llvm.org/D33813 llvm-svn: 304516
- Loading branch information
1 parent
040e126
commit 7a27b13
Showing
1 changed file
with
60 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters