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>
(cherry picked from commit b3eb87aa65)
This commit is contained in:
Daniel Schürmann 2021-05-14 15:33:02 +02:00 committed by Eric Engestrom
parent fbc49e9116
commit 443854ecec
2 changed files with 2 additions and 1 deletions

View file

@ -112,7 +112,7 @@
"description": "radv: call nir_copy_prop() after load-store vectorization",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "1958381c9ae15dc252bcab8612f39fdca45d4843"
},

View file

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