nir: Add a couple quick-and-dirty out-of-SSA helpers
authorJason Ekstrand <jason@jlekstrand.net>
Tue, 20 Dec 2016 04:11:47 +0000 (20:11 -0800)
committerTimothy Arceri <timothy.arceri@collabora.com>
Thu, 22 Dec 2016 23:15:35 +0000 (10:15 +1100)
commita620f66872c27fa24a1ccdd1d0a6e563eefbaad6
tree25cdf2b7d26399a7906e54857ed1bf2e1ba60c6c
parent99de7b752546c3f87aa8a18f72fd46856270555f
nir: Add a couple quick-and-dirty out-of-SSA helpers

These are designed for use within an optimization pass when SSA becomes
more pain than it's worth.  They're very naive and don't generate
anything close to optimal register-based NIR.  Also, they may result in
shaders which do not validate because of, for instance, registers in phi
sources.  However, the register-based into-SSA pass should be pretty
efficient at cleaning up the mess.

Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
src/compiler/nir/nir.h
src/compiler/nir/nir_from_ssa.c