Module: Mesa
Branch: main
Commit: 7ff899dd6e830f7dd5e55261585c0a92c91403e0
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=7ff899dd6e830f7dd5e55261585c0a92c91403e0

Author: Emma Anholt <[email protected]>
Date:   Thu Mar 23 12:17:22 2023 -0700

glsl/softfp64: GC the temp vars after we lower them to SSA.

They don't serve any purpose other than taking up memory and cluttering
your compiler output at this point.

Reviewed-by: Marek Olšák <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22083>

---

 src/compiler/glsl/glsl_to_nir.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/compiler/glsl/glsl_to_nir.cpp 
b/src/compiler/glsl/glsl_to_nir.cpp
index 424e44a42f0..7886a908998 100644
--- a/src/compiler/glsl/glsl_to_nir.cpp
+++ b/src/compiler/glsl/glsl_to_nir.cpp
@@ -2852,6 +2852,7 @@ glsl_float64_funcs_to_nir(struct gl_context *ctx,
     * with compile times.
     */
    NIR_PASS_V(nir, nir_lower_vars_to_ssa);
+   NIR_PASS_V(nir, nir_remove_dead_variables, nir_var_function_temp, NULL);
    NIR_PASS_V(nir, nir_copy_prop);
    NIR_PASS_V(nir, nir_opt_dce);
    NIR_PASS_V(nir, nir_opt_cse);

Reply via email to