radv: call nir_copy_prop() after load-store vectorization

The load-store vectorizer can create a large amount
of unnecessary nir_op_vec and nir_op_mov instructions.
This prevents nir_opt_move from stalling to much and
potentially also helps other passes.

Closes: #4778
Fixes: 1958381c9a ('radv: Reorder some NIR optimizations in preparation for the I/O changes.')
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10804>
This commit is contained in:
Daniel Schürmann
2021-05-14 15:33:02 +02:00
committed by Marge Bot
parent d659ce0d6c
commit b3eb87aa65

View File

@@ -3402,6 +3402,7 @@ radv_create_shaders(struct radv_pipeline *pipeline, struct radv_device *device,
} }
if (nir_opt_load_store_vectorize(nir[i], &vectorize_opts)) { if (nir_opt_load_store_vectorize(nir[i], &vectorize_opts)) {
NIR_PASS_V(nir[i], nir_copy_prop);
lower_to_scalar = true; lower_to_scalar = true;
/* Gather info again, to update whether 8/16-bit are used. */ /* Gather info again, to update whether 8/16-bit are used. */