[PATCH] D146776: [llvm] Preliminary fat-lto-objects support

Paul Kirth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 27 13:51:29 PDT 2023


paulkirth updated this revision to Diff 517705.
paulkirth added a comment.

Use separate modules and pipelies to optimize the bitcode and asembly sections.

- The EmbedBitcodePass (which maybe should be renamed now...) was updated to clone the current module and run a separate pipeline on the clone.
- The cloned module is then used to generate the `.llvm.tlo` bitcode section and discarded.
- The EmbedBitcodePass is initialized in the FatLTO pipeline with the corect pre-link LTO pipeline.
- The FatLTO pipeline now only runs the EmbedBitcodePass and then the `PerModuleDefaultPipeline`.
- The MPM used to optimize the cloned module is generated from the same pass builder as the defautl pipeline, so there shouldn't be any difference in configuration.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146776/new/

https://reviews.llvm.org/D146776

Files:
  llvm/docs/FatLTOSupport.rst
  llvm/docs/ReleaseNotes.rst
  llvm/docs/UserGuides.rst
  llvm/include/llvm/Bitcode/EmbedBitcodePass.h
  llvm/include/llvm/Passes/PassBuilder.h
  llvm/lib/Bitcode/Writer/CMakeLists.txt
  llvm/lib/Bitcode/Writer/EmbedBitcodePass.cpp
  llvm/lib/Object/ObjectFile.cpp
  llvm/lib/Passes/PassBuilder.cpp
  llvm/lib/Passes/PassBuilderPipelines.cpp
  llvm/lib/Passes/PassRegistry.def
  llvm/test/Bitcode/embed-multiple.ll
  llvm/test/Bitcode/embed-unsupported-object-format.ll
  llvm/test/Bitcode/embed.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146776.517705.patch
Type: text/x-patch
Size: 15370 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230427/1d5fcb76/attachment-0001.bin>


More information about the llvm-commits mailing list