microsoft/compiler: Better and simpler bitcast reduction
authorJesse Natalie <jenatali@microsoft.com>
Tue, 16 May 2023 19:25:12 +0000 (12:25 -0700)
committerMarge Bot <emma+marge@anholt.net>
Fri, 19 May 2023 22:19:38 +0000 (22:19 +0000)
commit25c7181f1b81711150c695bb86b3826991f61199
treec8bf69cd5319ec9d594069b8ef3d79abd229b866
parent50c8836bf02e3026e294d1e32562b406089c1f79
microsoft/compiler: Better and simpler bitcast reduction

Using nir_gather_ssa_types works much better. There's 2 differences
compared to what I was doing before:
1. Multiple passes to allow data to propagate forward and backward
   through the whole shader.
2. Allowing a value to have indeterminate types due to having both
   int and float usages.

So this deletes some code and gets better results. Wish I'd known
this existed last week.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23062>
src/microsoft/compiler/dxil_nir.c
src/microsoft/compiler/dxil_nir.h
src/microsoft/compiler/nir_to_dxil.c