diff options
author | Connor Abbott <[email protected]> | 2015-11-14 20:26:47 -0500 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-06-18 06:43:30 -0700 |
commit | 47e7c6961a36549118166a4f38072cb7711e8d52 (patch) | |
tree | 90a8b0c65d84435a1faaef225642e8cb141728e8 /src/compiler/nir/meson.build | |
parent | c3558868daef2bfc6c075a9cd7bd8ebde07eb1de (diff) |
nir: add a vectorization pass
This effectively does the opposite of nir_lower_alus_to_scalar, trying
to combine per-component ALU operations with the same sources but
different swizzles into one larger ALU operation. It uses a similar
model as CSE, where we do a depth-first approach and keep around a hash
set of instructions to be combined, but there are a few major
differences:
1. For now, we only support entirely per-component ALU operations.
2. Since it's not always guaranteed that we'll be able to combine
equivalent instructions, we keep a stack of equivalent instructions
around, trying to combine new instructions with instructions on the
stack.
The pass isn't comprehensive by far; it can't handle operations where
some of the sources are per-component and others aren't, and it can't
handle phi nodes. But it should handle the more common cases, and it
should be reasonably efficient.
[Alyssa: Rebase on latest master, updating with respect to typeless
moves]
Acked-by: Alyssa Rosenzweig <[email protected]>
Acked-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/nir/meson.build')
-rw-r--r-- | src/compiler/nir/meson.build | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/nir/meson.build b/src/compiler/nir/meson.build index ad380e172f1..268acfeb2e6 100644 --- a/src/compiler/nir/meson.build +++ b/src/compiler/nir/meson.build @@ -192,6 +192,7 @@ files_libnir = files( 'nir_opt_shrink_load.c', 'nir_opt_trivial_continues.c', 'nir_opt_undef.c', + 'nir_opt_vectorize.c', 'nir_phi_builder.c', 'nir_phi_builder.h', 'nir_print.c', |