[llvmlinux] [llvm-dev] Whole program LLVM bitcode files
mehdi.amini at apple.com
Wed Jan 6 16:53:27 UTC 2016
> On Jan 5, 2016, at 3:22 PM, Kai Wang via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> Hi all,
> I'm trying to generate whole program bitcode files for linux kernel and do interprocedural analysis on kernel.
> I use llvmlinux to compile kernel with clang and generate a bunch of bitcode files successfully.
> I need to link all these bitcode files together into a single bitcode file, so that I can run whole program analysis.
> Can I use llvm-link to achieve this?
> Or should I use libLTO to link all these bitcode files together? I guess I have to modify the linux kernel's build scripts and Makefiles?
libLTO is used directly by *some* linkers to perform both linking the modules and optimizing the result. Depending on what you’re trying to achieve, it can be interesting for you.
In any case you can start with llvm-link to get your analysis working with opt, and it won’t be hard to integrate it in LTO later if needed.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the LLVMLinux