slang icon indicating copy to clipboard operation
slang copied to clipboard

Enable Link-Time-Code-Generation for Release builds

Open jkwak-work opened this issue 1 year ago • 2 comments

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.

jkwak-work avatar Nov 25 '24 23:11 jkwak-work

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Nov 25 '24 23:11 CLAassistant

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.

zamazan4ik avatar Nov 25 '24 23:11 zamazan4ik

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.

jkwak-work avatar Nov 26 '24 05:11 jkwak-work