[llvm] A Unified LTO Bitcode Frontend
authorMatthew Voss <matthew.voss@sony.com>
Wed, 5 Jul 2023 21:17:20 +0000 (14:17 -0700)
committerMatthew Voss <matthew.voss@sony.com>
Wed, 5 Jul 2023 21:53:14 +0000 (14:53 -0700)
commita1ca3af31eeec61cfb9d619f55b655b0eb0b9494
treef7127bd5940108b5fec1690ab872425afcb244a2
parent156913cb776438f87bd1580de862eac7be79ca2a
[llvm] A Unified LTO Bitcode Frontend

Here's a high level summary of the changes in this patch. For more
information on rational, see the RFC.
(https://discourse.llvm.org/t/rfc-a-unified-lto-bitcode-frontend/61774).

  - Add config parameter to LTO backend, specifying which LTO mode is
    desired when using unified LTO.
  - Add unified LTO flag to the summary index for efficiency. Unified
    LTO modules can be detected without parsing the module.
  - Make sure that the ModuleID is generated by incorporating more types
    of symbols.

Differential Revision: https://reviews.llvm.org/D123803
24 files changed:
llvm/include/llvm/Bitcode/BitcodeReader.h
llvm/include/llvm/IR/ModuleSummaryIndex.h
llvm/include/llvm/LTO/LTO.h
llvm/include/llvm/Passes/PassBuilder.h
llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
llvm/lib/IR/ModuleSummaryIndex.cpp
llvm/lib/LTO/LTO.cpp
llvm/lib/LTO/LTOBackend.cpp
llvm/lib/Passes/PassBuilder.cpp
llvm/lib/Passes/PassBuilderPipelines.cpp
llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
llvm/test/LTO/Resolution/X86/local-def-dllimport.ll
llvm/test/LTO/Resolution/X86/unified-lto-check.ll [new file with mode: 0644]
llvm/test/LTO/X86/cfi-func-remove.ll [new file with mode: 0644]
llvm/test/LTO/X86/unified-cfi.ll [new file with mode: 0644]
llvm/test/LTO/X86/unified-internalize.ll [new file with mode: 0644]
llvm/test/Other/new-pm-thinlto-prelink-defaults.ll
llvm/test/Transforms/ThinLTOBitcodeWriter/split-unified.ll [new file with mode: 0644]
llvm/tools/llvm-lto2/llvm-lto2.cpp
llvm/tools/opt/NewPMDriver.cpp
llvm/tools/opt/NewPMDriver.h
llvm/tools/opt/opt.cpp