nir/opt_shrink_vectors: reverse iteration order

This pass should be backwards in order to reach the fixed point
in linear time.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11411>
This commit is contained in:
Daniel Schürmann 2021-06-16 09:20:01 +02:00 committed by Marge Bot
parent d27417b597
commit 8317fe314c

View file

@ -258,8 +258,8 @@ nir_opt_shrink_vectors(nir_shader *shader, bool shrink_image_store)
nir_builder b;
nir_builder_init(&b, function->impl);
nir_foreach_block(block, function->impl) {
nir_foreach_instr(instr, block) {
nir_foreach_block_reverse(block, function->impl) {
nir_foreach_instr_reverse(instr, block) {
progress |= opt_shrink_vectors_instr(&b, instr, shrink_image_store);
}
}