nir: return early when lowering a return at the end of a function
authorTimothy Arceri <tarceri@itsqueeze.com>
Sun, 8 Apr 2018 11:47:32 +0000 (21:47 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Tue, 17 Apr 2018 04:17:56 +0000 (14:17 +1000)
commit6e22ad6edc34dc07a08b41a781f1c37ff3c536e7
tree99e715991b57c134958afa9e737af5ab6f3b0ea3
parentd3cafc18fced872ce60060e792f6faf2b97cc3a9
nir: return early when lowering a return at the end of a function

Otherwise we create unused conditional return flags and things
get unnecessarily ugly fast when lowering nested functions.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir_lower_returns.c