[llvm-dev] whole linux kernel bitcode

Greg Bedwell via llvm-dev llvm-dev at lists.llvm.org
Wed Jan 6 11:55:12 PST 2016


> First, you can use llvm-link to link the bitcode files together.  This
> will require some manual changes to the Linux Makefiles.  Once you get a
> single bitcode file, you can run your analysis pass via opt.  This is the
> approach that I used for the original SVA system for Linux 2.4.22 back
> before we had libLTO.
>
>

When we first started investigating the feasibility of LTO on our target,
in order to avoid having to change build systems, we replaced our linker
executable with a python script that called llvm-link, opt, llc, and the
original linker.  The only build system change required was to add -flto to
the compiler command line options.  This worked surprisingly well as a
first attempt.  Depending on how invasive the Makefiles changes would be,
this method may be simpler for your purposes, although if you're able to
use libLTO that would be simpler still.  Gao's lightning talk "*Link-Time
Optimization without Linker Support" *from the 2013 developer meeting goes
into more detail of the approach: http://llvm.org/devmtg/2013-11/#light

-Greg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160106/760a7193/attachment.html>


More information about the llvm-dev mailing list