nir: Add return lowering pass
authorJason Ekstrand <jason.ekstrand@intel.com>
Sun, 14 Feb 2016 01:08:57 +0000 (17:08 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 24 Mar 2016 22:20:44 +0000 (15:20 -0700)
commit79dec93ead6e3b95b1240a9d843d617a88ee9179
treeaac952fb882917da62644f5028826e8cf0ee3dca
parent8d61d7252433a0470b441c70085391d3dd4c04bb
nir: Add return lowering pass

This commit adds a NIR pass for lowering away returns in functions.  If the
return is in a loop, it is lowered to a break.  If it is not in a loop,
it's lowered away by moving/deleting code as needed.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/compiler/Makefile.sources
src/compiler/nir/Makefile.sources
src/compiler/nir/nir.h
src/compiler/nir/nir_lower_returns.c [new file with mode: 0644]