LunarG Adds New Size Option To Further Reduce Size Of SPIR-V
LunarG has been working to reduce the size of the SPIR-V intermediate representation used by Vulkan (and OpenCL 2.1+) through improvements to the SPIRV-Tools project.
For easing the optimization process to yield the smallest generated SPIR-V code size as possible, LunarG has added a -Os switch -- just like what's found in GCC and other code compilers -- if wishing to run the optimization passes for minimum code size.
With the optimization passes set by -Os for dead code elimination, dropping unnecessary stores/loads, and replicated code, they are dropping the size of raw SPIR-V by 60%. LunarG says these SPIR-V sizes are now within 40% the size of Direct3D bytecode.
More details on LunarG's SPIR-V optimization work via this blog post while the work is now present in the latest SPIRV-Tools repository.
For easing the optimization process to yield the smallest generated SPIR-V code size as possible, LunarG has added a -Os switch -- just like what's found in GCC and other code compilers -- if wishing to run the optimization passes for minimum code size.
With the optimization passes set by -Os for dead code elimination, dropping unnecessary stores/loads, and replicated code, they are dropping the size of raw SPIR-V by 60%. LunarG says these SPIR-V sizes are now within 40% the size of Direct3D bytecode.
More details on LunarG's SPIR-V optimization work via this blog post while the work is now present in the latest SPIRV-Tools repository.
2 Comments