[PATCH] D138560: [lld][LTO] Add assembly output to LTO save-temps

Pierre van Houtryve via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 25 00:19:37 PST 2022


Pierre-vh added a comment.

In D138560#3950141 <https://reviews.llvm.org/D138560#3950141>, @MaskRay wrote:

> I am unsure I am convinced with the motivation. Say you have two bitcode files a.o and b.o, can you just use `clang++ -fuse-ld=lld a.o b.o -Wl,--lto-emit-asm`? This can be used with `-Wl,--save-temps` as well. The output is named in term of the `-o` output file name, instead of `*.s`, but the slight difference doesn't warrant adding significant more complexity to LTOBackend.cpp as this patch does.

With your suggestion, does it also generate the final, linked output file? Or just the .S?
The idea is to be able to get both alongside each other.

Though, I am surprised that you see this as adding significant complexity, I tried to not make it too intrusive. Is it the whole change that's problematic, or just some part of it?
If yes, maybe I can re-do the parts you find problematic to simplify them. The way I see it, this kind of patch should just be a small feature addition that shouldn't increase complexity too much. If you think complexity has increased significantly then I definitely failed somewhere and I can try to correct it before discarding the idea entirely.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138560



More information about the llvm-commits mailing list