slang
slang copied to clipboard
Enable Link-Time-Code-Generation for Release builds
Closes https://github.com/shader-slang/slang/discussions/5632
This commit enables Link Time Code Generation, or LTCG for short, for the release builds.
Because "incremental" build is enabled, this ends up using "/LTCG:incremental" rather than the full "/LTCG". It is still expected to more performant than without any "/LTCG" at all.
In order to use the full LTCG, we will need to give up the incremental build option for the Release build. We will need to decide if we wants to do it later.
Closes https://github.com/shader-slang/slang/discussions/5632
One note: this PR doesn't close the linked discussion completely - it just closes a part of it regarding enabling LTO. The question about applying PGO and PLO to Slang remains open.
Closes #5632
One note: this PR doesn't close the linked discussion completely - it just closes a part of it regarding enabling LTO. The question about applying PGO and PLO to Slang remains open.
I think that will be tricky to apply unless we can get the profile data from a lot of use cases; or find more representative use cases.
With Profile guided optimization, the performance can shift and bias to only a few use cases if not careful.