News for hackers. Stuff that matters.
Re:LLVM 3.9 Release Notes by rurban on Friday September 02, 2016 @05:20PM (#12416368)
ThinLTO sounds good in theory, but is still too hard to use in practice compared to gcc -flto=4.

While clang -flto can produce up to ~15% faster binaries than with gcc, it's still not usable for bigger projects which put a lot of their API into a shared library.

Some of those functions in a shared library are eventually inlined, but with clang -flto the exported copies of the functions are optimized away, whilst gcc keeps the copies additionally to the inlined variants. So you can try to keep those inlined API calls in the shared library with __attribute__((used)), but then they are not inlined anymore with performance regressions up to %50.

Not fixed in clang 3.8 and not in 3.9. I hope it will become usable in 4.0 as the performance benefits would be dramatic and the implementation efforts to keep the ((used)), i.e. exported copy, minimal.

There are no comments on this comment yet.