summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_lower_returns.c
Commit message (Collapse)AuthorAgeFilesLines
* nir: Switch the arguments to nir_foreach_functionJason Ekstrand2016-04-281-1/+1
| | | | | | | | | This matches the "foreach x in container" pattern found in many other programming languages. Generated by the following regular expression: s/nir_foreach_function(\([^,]*\),\s*\([^,]*\))/nir_foreach_function(\2, \1)/ Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* nir: Add return lowering passJason Ekstrand2016-03-241-0/+246
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>