Re: [Mesa-dev] [PATCH 2/2] nir: Add a global dead write var removal pass

2018-08-15 Thread Caio Marcelo de Oliveira Filho
Disregard this patch. I'm sending a replacement for it. For the record: > The pass works by walking through the control flow nodes, and traverse > the instructions keeping track of the write instructions whose > destination were not overwritten by other instructions (called "live > writes").

Re: [Mesa-dev] [PATCH 2/2] nir: Add a global dead write var removal pass

2018-07-27 Thread Caio Marcelo de Oliveira Filho
> --- > src/compiler/Makefile.sources | 1 + > src/compiler/nir/meson.build | 1 + > src/compiler/nir/nir.h | 2 + > src/compiler/nir/nir_opt_copy_prop_vars.c | 67 +--- > src/compiler/nir/nir_opt_dead_write_vars.c | 379 +

[Mesa-dev] [PATCH 2/2] nir: Add a global dead write var removal pass

2018-07-27 Thread Caio Marcelo de Oliveira Filho
Replaces the existing dead write var removal that is done as part of nir_opt_copy_prop_vars pass. The previous pass was per-block, so it would not remove the dead write in a program like int total = gl_VertexIndex * 10; float r = gl_VertexIndex; for (int i = 0; i < total; i++) {