[Mesa-dev] [PATCH 0/3] nir: Rewrite the register-based into-SSA pass to use

Jason Ekstrand jason at jlekstrand.net
Wed Dec 14 18:38:37 UTC 2016


Ever since I wrote the phi builder and converted vars_to_ssa to use it,
I've been meaning to convert the other into-SSA pass to use it as well.
This little series does just that.  While I was at it, I also renamed it to
nir_lower_regs_to_ssa to match nir_lower_vars_to_ssa.

Since the third commit is basically a full rewrite (I kept a few bits but
not many), it's probably easiest to just pull my branch and review it as if
it's a new pass.  Fortunately, this one is way easier to read/review than
the old one thanks to using the phi builder.

https://cgit.freedesktop.org/~jekstrand/mesa/log/?h=review/regs-to-ssa

Rob & Eric, I would like you to at least test this as I can only test it
with ARB programs which don't have control-flow.

Cc: Eric Anholt <eric at anholt.net>
Cc: Rob Clark <robclark at gmail.com>

Jason Ekstrand (3):
  nir: Rename convert_to_ssa lower_regs_to_ssa
  nir: Add a foreach_register helper
  nir: Rewrite lower_regs_to_ssa to use the phi builder

 src/compiler/Makefile.sources               |   2 +-
 src/compiler/nir/nir.h                      |   7 +-
 src/compiler/nir/nir_lower_regs_to_ssa.c    | 269 ++++++++++++++
 src/compiler/nir/nir_to_ssa.c               | 540 ----------------------------
 src/gallium/drivers/freedreno/ir3/ir3_nir.c |   2 +-
 src/gallium/drivers/vc4/vc4_program.c       |   2 +-
 src/mesa/drivers/dri/i965/brw_program.c     |   2 +-
 7 files changed, 277 insertions(+), 547 deletions(-)
 create mode 100644 src/compiler/nir/nir_lower_regs_to_ssa.c
 delete mode 100644 src/compiler/nir/nir_to_ssa.c

-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list