[all-commits] [llvm/llvm-project] 531ed6: [LTO][COFF] Use bitcode file names in lto native o...

Zequan Wu via All-commits all-commits at lists.llvm.org
Tue Nov 22 10:20:13 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 531ed6d5aa65f41c6dfe2e74905d5c6c88fc95a7
      https://github.com/llvm/llvm-project/commit/531ed6d5aa65f41c6dfe2e74905d5c6c88fc95a7
  Author: Zequan Wu <zequanwu at google.com>
  Date:   2022-11-22 (Tue, 22 Nov 2022)

  Changed paths:
    M clang/lib/CodeGen/BackendUtil.cpp
    M clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
    M lld/COFF/LTO.cpp
    M lld/COFF/LTO.h
    M lld/ELF/LTO.cpp
    M lld/MachO/LTO.cpp
    M lld/test/COFF/lto-obj-path.ll
    M lld/test/COFF/pdb-thinlto.ll
    M lld/test/COFF/thinlto.ll
    M lld/wasm/LTO.cpp
    M lldb/source/Core/DataFileCache.cpp
    M llvm/include/llvm/Support/Caching.h
    M llvm/lib/Debuginfod/Debuginfod.cpp
    M llvm/lib/LTO/LTO.cpp
    M llvm/lib/LTO/LTOBackend.cpp
    M llvm/lib/LTO/LTOCodeGenerator.cpp
    M llvm/lib/Support/Caching.cpp
    M llvm/tools/llvm-lto/llvm-lto.cpp
    M llvm/tools/llvm-lto2/llvm-lto2.cpp

  Log Message:
  -----------
  [LTO][COFF] Use bitcode file names in lto native object file names.

Currently the lto native object files have names like main.exe.lto.1.obj. In
PDB, those names are used as names for each compiland. Microsoft’s tool
SizeBench uses those names to present to users the size of each object files.
So, names like main.exe.lto.1.obj is not user friendly.

This patch makes the lto native object file names more readable by using
the bitcode file names as part of the file names. For example, if the input
bitcode file has path like "path/to/foo.obj", its corresponding lto native
object file path would be "path/to/main.exe.lto.foo.obj". Since the lto native
object file name only bothers PDB, this patch only changes the lld-linker's
behavior.

Reviewed By: tejohnson, MaskRay, #lld-macho

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




More information about the All-commits mailing list