ThinLTO is there. I think that should settle the final/virtual debate
ZombineDev via Digitalmars-d
digitalmars-d at puremagic.com
Sun Dec 4 02:59:18 PST 2016
On Sunday, 4 December 2016 at 01:36:50 UTC, deadalnix wrote:
> First, presentation:
> https://www.youtube.com/watch?v=9OIEZAj243g
>
> Some of this is available in LLVM today, and everything
> presented here will be in 4.0 . The long story short: ThinLTO
> can do most of what LTO does but with a price that is much
> closer to the one of a regular build than the one of a classic
> LTO build.
>
> LTO optimization can devirtualize all function that do not need
> to be virtual, and even use profile infos to speculatively
> devirtualize - aka JVM grade devirtualization.
>
> I would love to see this leveraged to finally put to rest the
> final vs virtual debate. If we use this tech properly,
> everything that do not need to be virtual can be finalized -
> except across shared object, which shouldn't be too much of an
> issue in practice.
ldc-1.1.0-beta5 --help | grep -A2 lto
-flto - Set LTO mode, requires linker support
=full - Merges all input into a single module
=thin - Parallel importing and codegen (faster than
'full')
-flto-binary=<file> - Set the linker LTO plugin
library file (e.g. LLVMgold.so (Unixes) or libLTO.dylib (Darwin))
-fprofile-instr-generate=<filename> - Generate
instrumented code to collect execution counts (e.g. for PGO)
-fprofile-instr-use=<filename> - Use instrumentation
data for profile-guided optimization
More information about the Digitalmars-d
mailing list