[all-commits] [llvm/llvm-project] d535a0: [ThinLTO] During module importing, close one sourc...

wmi-11 via All-commits all-commits at lists.llvm.org
Tue Mar 30 14:42:20 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d535a05ca1a6b959399762d5e14efde1fcfe6af8
      https://github.com/llvm/llvm-project/commit/d535a05ca1a6b959399762d5e14efde1fcfe6af8
  Author: Wei Mi <wmi at google.com>
  Date:   2021-03-30 (Tue, 30 Mar 2021)

  Changed paths:
    M clang/lib/CodeGen/BackendUtil.cpp
    M clang/test/CodeGen/thinlto_backend.ll
    M llvm/include/llvm/LTO/LTOBackend.h
    M llvm/lib/LTO/LTO.cpp
    M llvm/lib/LTO/LTOBackend.cpp

  Log Message:
  -----------
  [ThinLTO] During module importing, close one source module before open
another one for distributed mode.

Currently during module importing, ThinLTO opens all the source modules,
collect functions to be imported and append them to the destination module,
then leave all the modules open through out the lto backend pipeline. This
patch refactors it in the way that one source module will be closed before
another source module is opened. All the source modules will be closed after
importing phase is done. It will save some amount of memory when there are
many source modules to be imported.

Note that this patch only changes the distributed thinlto mode. For in
process thinlto mode, one source module is shared acorss different thinlto
backend threads so it is not changed in this patch.

Differential Revision: https://reviews.llvm.org/D99554




More information about the All-commits mailing list