[LLVMdev] Any mechanism available for link time inlineing?
Nick Lewycky
nicholas at mxc.ca
Sat Feb 14 20:25:44 PST 2015
mobi phil wrote:
> thanks, sounds great, heard about llvm-lto, but was not following in
> details. I have an llvm-lto in my dev branch build....now what I do not
> find are some example on how to use it for link time inline-ing. In
> worst case have to deal with the overhead to experiment
With what linker?
LLVM LTO is available by default with Apple's XCode development
environment, just specify -O4.
For linux or similar, see llvm.org/docs/GoldPlugin.html . You may be
able to just use -O4 on linux too, depending on how your llvm and linker
are installed, and assuming you run "clang" for your link steps.
Inlining occurs because it's a standard part of the link time
optimization pipeline. If you need to turn off the rest of LTO, reducing
it down to only inlining, that would take more work.
Nick
More information about the llvm-dev
mailing list