vc4: Enable dead CF elimination.
authorEric Anholt <eric@anholt.net>
Sun, 26 Jun 2016 01:45:28 +0000 (18:45 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 4 Jul 2016 23:33:22 +0000 (16:33 -0700)
Now that we're about to start generating control flow in our NIR, we want
this in place.  It optimizes things frequently in the CS, when the GL VS
has control flow that doesn't affect the vertex position.

src/gallium/drivers/vc4/vc4_program.c

index 5d036eb2604b6a8859d18200d0d1041b98a2918d..8305459454b63cfeb021d08dfb97363be469d2ad 100644 (file)
@@ -1337,6 +1337,7 @@ vc4_optimize_nir(struct nir_shader *s)
 
                 NIR_PASS(progress, s, nir_copy_prop);
                 NIR_PASS(progress, s, nir_opt_dce);
+                NIR_PASS(progress, s, nir_opt_dead_cf);
                 NIR_PASS(progress, s, nir_opt_cse);
                 NIR_PASS(progress, s, nir_opt_peephole_select);
                 NIR_PASS(progress, s, nir_opt_algebraic);