[llvm-dev] getting nowhere with thinLTO

Davis, Alan via llvm-dev llvm-dev at lists.llvm.org
Wed Nov 8 14:31:19 PST 2017

I'm trying to incorporate thinLTO into our proprietary linker. I can't seem to make it work at all (although I do have the 'thick' form working). When I try to invoke the ThinGenerator API it crashes somewhere way down in the bowels of IPO. So stepping away from the linker, I am just trying to explore the processing steps using standalone off-the shelf llvm built from tip-of-tree.

1. When I do 'clang -c -flto=thin t1.c' on a simple input file, the resulting .o file is a bitcode file as expected, but when I llvm-dis it there is no evidence of the module summary information. Is there a way to view the summary index for a given module?

2. When I take two or three .o files generated using -flto=thin and pass them to the standalone llvm-lto tool, as in:
   llvm-lto --thinlto t2.o t3.o --exported-symbol=t2 -o index
the combined index is (apparently) empty.

3. When I take a program and pass all the .o files to llvm-lto --thinlto-action=run, I get recompiled .o files for each but there seems to be no IPO (no inlining, etc).

What am I missing?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171108/a3bc569e/attachment-0001.html>

More information about the llvm-dev mailing list