From: Daniel Schürmann Date: Thu, 19 Aug 2021 08:46:09 +0000 (+0200) Subject: nir/opt_shrink_vectors: update docstring X-Git-Tag: upstream/22.3.5~12061 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ca4595e01abf1d6ff15be6e762f55bb76e29196a;p=platform%2Fupstream%2Fmesa.git nir/opt_shrink_vectors: update docstring in order to reflect the various recent improvements. Reviewed-by: Emma Anholt Part-of: --- diff --git a/src/compiler/nir/nir_opt_shrink_vectors.c b/src/compiler/nir/nir_opt_shrink_vectors.c index 5fdcadf..e61f783 100644 --- a/src/compiler/nir/nir_opt_shrink_vectors.c +++ b/src/compiler/nir/nir_opt_shrink_vectors.c @@ -24,15 +24,19 @@ /** * @file * - * Trims off the unused trailing components of SSA defs. + * Removes unused components of SSA defs. * * Due to various optimization passes (or frontend implementations, * particularly prog_to_nir), we may have instructions generating vectors - * whose components don't get read by any instruction. As it can be tricky - * to eliminate unused low components or channels in the middle of a writemask - * (you might need to increment some offset from a load_uniform, for example), - * it is trivial to just drop the trailing components. For vector ALU only used - * by ALU, this pass eliminates arbitrary channels and reswizzles the uses. + * whose components don't get read by any instruction. + * + * For memory loads, while it can be tricky to eliminate unused low components + * or channels in the middle of a writemask (you might need to increment some + * offset from a load_uniform, for example), it is trivial to just drop the + * trailing components. + * For vector ALU and load_const, only used by other ALU instructions, + * this pass eliminates arbitrary channels as well as duplicate channels, + * and reswizzles the uses. * * This pass is probably only of use to vector backends -- scalar backends * typically get unused def channel trimming by scalarizing and dead code