[PATCH] D18945: [ThinLTO] Only compute imports for current module in FunctionImport pass

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 12 07:41:51 PDT 2016


tejohnson updated this revision to Diff 53392.
tejohnson added a comment.

Refactor function info map build into collectDefinedFunctionsForModule
method on the ModuleSummaryIndex, similar to the refactoring done in
http://reviews.llvm.org/D18908 for the full-index case.

To give an idea of the impact of this change: I have a large application
containing 13719 source modules, and a 114M module summary index with
2283915 function summaries and 1166281 globalvar init summaries.
For a single source module's ThinLTO distributed backend compile step,
the Function Importing pass time before this change was 46.7s, and after
this change was only 0.3s. And that ~46s cost was being paid by all
13719 source modules!


http://reviews.llvm.org/D18945

Files:
  include/llvm/IR/ModuleSummaryIndex.h
  include/llvm/Transforms/IPO/FunctionImport.h
  lib/IR/ModuleSummaryIndex.cpp
  lib/Transforms/IPO/FunctionImport.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18945.53392.patch
Type: text/x-patch
Size: 9310 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160412/4b97378c/attachment.bin>


More information about the llvm-commits mailing list