nir: Add a helper for chasing movs with nir_ssa_scalar().
authorEmma Anholt <emma@anholt.net>
Fri, 25 Jun 2021 20:58:04 +0000 (13:58 -0700)
committerMarge Bot <eric+marge@anholt.net>
Mon, 28 Jun 2021 16:26:24 +0000 (16:26 +0000)
commit0afab39af9bcf5448d74b9b849c13085fdf92983
tree9a15c42dbd2d231a77815a9c7612988b852caf58
parent9133999430e67b7bae6788d0a8c03d9dc1074bdc
nir: Add a helper for chasing movs with nir_ssa_scalar().

Sometimes you might want to find a constant source without going through
all the copy prop and constant folding to make your source be a
load_const.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11613>
src/compiler/nir/nir.c
src/compiler/nir/nir.h
src/compiler/nir/nir_opt_copy_propagate.c