[all-commits] [llvm/llvm-project] 0359b9: [LTO] Introduce a helper function collectImportSta...

Kazu Hirata via All-commits all-commits at lists.llvm.org
Tue Aug 27 08:40:10 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0359b9a2306566a872cede1fcdaa4edc34e9398e
      https://github.com/llvm/llvm-project/commit/0359b9a2306566a872cede1fcdaa4edc34e9398e
  Author: Kazu Hirata <kazu at google.com>
  Date:   2024-08-27 (Tue, 27 Aug 2024)

  Changed paths:
    M llvm/lib/Transforms/IPO/FunctionImport.cpp

  Log Message:
  -----------
  [LTO] Introduce a helper function collectImportStatistics (NFC) (#106179)

This patch introduces a helper function collectImportStatistics.  The
new function computes statistics of imports for
ComputeCrossModuleImport and dumpImportListForModule with no
functional change.

The background is as follows.  I'm planning to reduce the memory
footprint of ThinLTO indexing by changing ImportMapTy, the data
structure used for an import list.  The new list will be a hash set of
tuples (SourceModule, GUID, ImportType) represented in a space
efficient manner.  That means that obtaining statistics like the
number of definitions per source module requires us to go through the
entire import list (for a given destination module).

Introducing a helper function now makes the callers more independent
of the underlying data structures used in ImportMapT.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list