[all-commits] [llvm/llvm-project] bd6531: [LTO] Introduce a new class ImportIDTable (#106503)

Kazu Hirata via All-commits all-commits at lists.llvm.org
Thu Aug 29 09:45:40 PDT 2024


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

  Changed paths:
    M llvm/include/llvm/Transforms/IPO/FunctionImport.h
    M llvm/unittests/Transforms/IPO/CMakeLists.txt
    A llvm/unittests/Transforms/IPO/ImportIDTableTests.cpp

  Log Message:
  -----------
  [LTO] Introduce a new class ImportIDTable (#106503)

The new class implements a deduplication table to convert import list
elements:

  {SourceModule, GUID, Definition/Declaration}

into 32-bit integers, and vice versa.  This patch adds a unit test but
does not add a use yet.

To be precise, the deduplication table holds {SourceModule, GUID}
pairs.  We use the bottom one bit of the 32-bit integers to indicate
whether we have a definition or declaration.

A subsequent patch will collapse the import list hierarchy --
FunctionsToImportTy holding many instances of FunctionsToImportTy --
down to DenseSet<uint32_t> with each element indexing into the
deduplication table above.  This will address multiple sources of
space inefficiency.



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