nir/opt_copy_prop_vars: don't clone copies if branch empty
authorTimothy Arceri <tarceri@itsqueeze.com>
Tue, 11 Jul 2023 03:21:57 +0000 (13:21 +1000)
committerMarge Bot <emma+marge@anholt.net>
Mon, 24 Jul 2023 02:29:54 +0000 (02:29 +0000)
commite9804bdc4c2f31db89ccbf435983b39c00c75c13
tree7b253d1e9466bee26a1be3db9a3e337ab6eecced
parent527cc3ad291d989976be5150b03f7ebedabd04b7
nir/opt_copy_prop_vars: don't clone copies if branch empty

There is no point doing an expensive clone of the copies if the
if-branch is empty.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24227>
src/compiler/nir/nir_opt_copy_prop_vars.c