panfrost: Remove unneeded phi nodes
authorBoris Brezillon <boris.brezillon@collabora.com>
Mon, 6 Jan 2020 13:31:38 +0000 (14:31 +0100)
committerMarge Bot <eric+marge@anholt.net>
Mon, 13 Jan 2020 14:09:47 +0000 (14:09 +0000)
Add a pass to remove unneeded phi nodes as done in other drivers.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3294>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3294>

src/panfrost/midgard/midgard_compile.c

index 2dd58b714f834993b2e35350039fcd656788f25d..56a1138197a0ca5de8f99da321fd9d55d1481299 100644 (file)
@@ -487,6 +487,7 @@ optimise_nir(nir_shader *nir, unsigned quirks)
                 NIR_PASS(progress, nir, nir_lower_vars_to_ssa);
 
                 NIR_PASS(progress, nir, nir_copy_prop);
+                NIR_PASS(progress, nir, nir_opt_remove_phis);
                 NIR_PASS(progress, nir, nir_opt_dce);
                 NIR_PASS(progress, nir, nir_opt_dead_cf);
                 NIR_PASS(progress, nir, nir_opt_cse);