[all-commits] [llvm/llvm-project] 594bc5: [lld] Change `--lto-emit-llvm` to use the pre-code...

Joseph Huber via All-commits all-commits at lists.llvm.org
Tue Jul 2 16:12:09 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 594bc520a8a14617bdfc158f4c78fa70567dab19
      https://github.com/llvm/llvm-project/commit/594bc520a8a14617bdfc158f4c78fa70567dab19
  Author: Joseph Huber <huberjn at outlook.com>
  Date:   2024-07-02 (Tue, 02 Jul 2024)

  Changed paths:
    M lld/ELF/LTO.cpp
    M lld/test/ELF/lto/emit-llvm.ll

  Log Message:
  -----------
  [lld] Change `--lto-emit-llvm` to use the pre-codegen module (#97480)

Summary:
Currently the `--lto-emit-llvm` option writes out the
post-internalization bitcode. This is the bitcode before any
optimizations or other pipelines have been run on it. This patch changes
that to use the pre-codegen module, which is the state of the LLVM-IR
after the optimizations have been run.

I believe that this makes sense as the `--lto-emit-llvm` option seems to
imply that we should emit the final output of the LLVM pass as if it
were the desired output. This should include optimizations at the
requested optimization level. My main motivation for this change is to
be able to use this to link several LLVM-IR files into a single one that
I can then pass back to `ld.lld` later (for JIT purposes).



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