microsoft/clc: Try harder to optimize memcpys before lowering them
authorJesse Natalie <jenatali@microsoft.com>
Thu, 18 May 2023 17:49:04 +0000 (10:49 -0700)
committerMarge Bot <emma+marge@anholt.net>
Tue, 13 Jun 2023 00:43:36 +0000 (00:43 +0000)
commite9b2bb244bab82c4638ead8cee57c9507d793239
treeebf38f0617e6595829b86d3706114cc98681d11b
parentfba82797d720c930051d1593062840713e874250
microsoft/clc: Try harder to optimize memcpys before lowering them

For the case of memset, the SPIR-V translator produces a copy from
a byte array of 0s. If we wait to lower memcpys until after types
are sized, we can potentially turn those 0s into SSA zeros and remove
the entire constant array.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23173>
src/microsoft/clc/clc_compiler.c