[Mesa-dev] [PATCH 0/4] i965: use SSA values when we can

Connor Abbott cwabbott0 at gmail.com
Thu Jun 25 12:29:49 PDT 2015

Before, we were using a hack where when we converted out of SSA, we set
a "parent_instr" field of the nir_register to indicate that the register
was actually an SSA value. But in the future, we want to handle SSA
values directly, and right now we're creating an extra nir_register for
everything, even if it's not involved in a phi node. This series removes
that hack for i965 and gets us using SSA values directly in most cases.

The only other user of nir_convert_from_ssa() is vc4, which I believed I
changed correctly, and it doesn't seem to use
nir_register::parent_instr, based on my grepping. I tried to
compile-test it, but it assumed I was using the simulator and died, so
it would be nice to at least compile-test it.

The changes are also available at:

git://people.freedesktop.org/~cwabbott0/mesa i965-use-ssa

Connor Abbott (4):
  nir/from_ssa: add a flag to not convert everything to SSA
  i965/fs: use SSA values directly
  nir: remove nir_src_get_parent_instr()
  nir: remove parent_instr from nir_register

 src/gallium/drivers/vc4/vc4_program.c              |  2 +-
 src/glsl/nir/nir.c                                 |  1 -
 src/glsl/nir/nir.h                                 | 25 ++------
 src/glsl/nir/nir_from_ssa.c                        | 33 +++++-----
 src/mesa/drivers/dri/i965/brw_fs.h                 |  5 ++
 src/mesa/drivers/dri/i965/brw_fs_nir.cpp           | 73 ++++++++++++++--------
 src/mesa/drivers/dri/i965/brw_fs_visitor.cpp       |  1 +
 src/mesa/drivers/dri/i965/brw_nir.c                |  2 +-
 .../dri/i965/brw_nir_analyze_boolean_resolves.c    | 12 ++--
 9 files changed, 84 insertions(+), 70 deletions(-)


More information about the mesa-dev mailing list